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 :).


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).