Bug: Link names fail to update


I use your excellent program both as a scientific notebook and as a code-planning notebook. It works beautifully. I have noticed one issue however:

  1. In a Scrivener document called ONE, make a link to another Scrivener document called TWO

  2. Rename the target document from TWO to FIVE

Expected behavior: The text of the link in ONE will change from TWO to FIVE.

Observed behavior: Renaming the target does not break the link, but the link text in ONE is still called TWO. It does not update.

This is a bit of a problem in cases where a lot of things refer to a document, and then one realizes that that target document is misnamed. Without automatic updating, one would have to somehow remember every place that makes reference to the target and change each one by hand.

I’m not sure if this is a bug report or a feature request, but I thought that Scrivener was one of the programs that could do this: See for example Links to files: update the names - Tips - DEVONtechnologies Community, where the person asking the question points out that Scrivener does this for its internal documents.

Thank you for thinking about this,

Scrivener Version: 3.2.2 (14632)
MacOS 10.15.7
MacBook Pro (16-inch, 2019)

Try Edit â–¸ Text Tidying â–¸ Update Document Links to Use Target Titles. Does that help?

Apologies. I didn’t search enough before asking my question. I see that this is the intended behavior
(Internal Scrivener link is not being updated - #2 by AmberV). I can see the argument for not updating the text, but depending on how one is using Scrivener, having the title text update itself is important. Perhaps it’s of enough benefit to some of us that it is worth a setting checkbox.

I see that option, thank you. That does help a bit. However, one would need to know all the different docs that had a link to the renamed target and go through them one by one.

Since you’re on Mac, you can make a massive Scrivenings session and select all the text. It may take a while to process, but it gets there. Alternatively, do a project search for the old name, select all the returned documents (thus making a Scrivenings session) select all the text, and execute the command. You may have a few documents that didn’t need the update, but so what?

Fair enough. Thanks for the workaround ideas!
I think a checkbox to change the default behavior makes sense, but I’ll leave that for the experts.

You’re welcome! :wink: Glad to help.

I think the best solution to this problem is to leave hyperlinks alone, leaving them to their primary role: an editing tool that readers don’t see, as well as a way of adding URL links. The current approach of mixing that kind of editorial tool with formal cross-referencing for the reader is messy and never made a whole lot of sense to me. Thankfully, as a Markdown user, I can use links for both purposes since I get to choose when a link is functional for the reader, by putting square brackets around it.

For what you seem to be using hyperlinks exclusively for, there should ideally be an actual cross-reference feature, as is typical in most other places. This isn’t a problem in something like LibreOffice for example, because there is a dedicated referencing feature which produces a dynamic field value at the point of linking, which can be modified to print itself however you need (section title, page number, whatever).

I wouldn’t say that approach specifically is a good fit for Scrivener—it should be streamlined and fit into the compiler ethos—but I think that’s a better place to push for than adding more duct tape on top of the hyperlink system, and leaving it in its current condition where one must sacrifice a valuable writing tool if they at all need cross-refs in the output.

1 Like