Update links to section headings after automatic rename

Use case or problem

I realize this may not be a very common scenario, but here is one, and it seems that the “ingredients” of the solution already exist, they just do not come together in the right way in this case. (I was thinking of putting it in the Bugs category first, but it’s not really a bug.)

  1. Take two files, A and B, where a section heading in B (call it Bbh, as the heading of section Bb) is itself a link to A, and A also has a section in which it embeds or links to section Bb.
    (Cf. below for a real-life example.)

  2. I’m renaming A to A’.

  3. Greatly, the links to A also update, including my section heading Bbh, to Bbh’.

  4. There is now a feature of updating links to section headings when those headings are renamed, but unfortunately this does not seem to work when those headings are renamed automatically, like in this case.

  5. As a result, the link in Bbh’ to A’ works, but the link/embed in A’ to Bbh’ does not work any more (since it still links to the original Bbh).

(EDIT: think about it this way. You have a phone book (file B), with an entry to each person and their phone number, where each entry heading links to a person’s page that is a separate document (file A, etc., there are as many files as there are people). The person’s page contains all other info besides phone numbers, but it also has a link back to the entry in the phone book. Then one of your people in the phone book changes her name, so you rename file A. (This is not my particular use-case, but same principles.) )

Proposed solution

Extend the “Rename this heading…” benefits when the section heading is renamed automatically due to its being a link to a renamed file.

Current workaround (optional)

Update manually.

Related feature requests (optional)

Not aware of any, and it’s probably not a frequent case – but still real :).

9 Likes

I also think this would be incredibly valuable. Translcuded sections break if you decide to update the heading; since we already have the auto-refactoring functionality for filenames, perhaps it would be a simpler task to extend the functionality to note headings (and link blocks too, for that matter).

I also think this is a really important feature – section links and and transclusions become dangerous to use if the aren’t protected from link rot. Automatic page link updating is fantastic, and it would be excellent if it supported section links as well.

Without automatic updating links to headings when a heading is renamed, linking to headings is difficult to use. It is very easy to forget to search the command to rename a heading instead of just manually renaming the heading.

IMHO, either disable linking to headings completely, or implement automatically updating links to headings when the heading gets renamed.

are there any news on this important issue?