Make invisible targets anchors in the headlines or items.
commita4f9f8c93b0afdfe938c8e6944ad50fcdf857f5e
authorCarsten Dominik <carsten.dominik@gmail.com>
Sun, 16 Nov 2008 21:12:57 +0000 (16 22:12 +0100)
committerCarsten Dominik <carsten.dominik@gmail.com>
Sun, 16 Nov 2008 21:18:33 +0000 (16 22:18 +0100)
tree71e291c8f89954d0c0e4342b00310a5fa5e03016
parent423ce71439a92352b8f5da11c3da3b94f82a2224
Make invisible targets anchors in the headlines or items.

Org allows to define invisible anchors in a document in comment lines
like

If such a line is directly before or after a headline, previously this
anchor was removed, and all references to it were replaced with
references to the anchor that the headline had anyway.

Matthew Lundin pointed out that this makes it impossible to have
permanent links to headlines that can also be used from outside the
current page.

This patch changes his situation by adding the additional targets as
empty anchors to the section heading.  If works by creating, during
preprocessing, an alist with targets that do have aliases.  During
publishing, these aliases are looked up and converted into anchors.
In LaTeX export, these additional targets become additional labels.
lisp/ChangeLog
lisp/org-exp.el
lisp/org-export-latex.el