tony aldon <tony.aldon....@gmail.com> writes: > If I'm not wrong, name defined after #+NAME: should be match first > before trying a fuzzy search in the function `org-link-search`. > ... > - (name (org-element-property :name element))) > + (name (org-element-property :value element)))
I think you are missing something. A standaline #+name: some name is a keyword, not an element name, but a generic keyword element. Named elements are the elements with affiliated keywords (not ordinary keywords): #+name: some other name Some element that can have affiliated keywords. It may be a paragraph, like here or e.g. source block. Link search should not try to search standalone keywords and hence it is sufficient to check for :name element property. :value will miss e.g. named source blocks. Try running (org-element-at-point) on the first and second #+name in org buffer. Best, Ihor