[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ol: Fix org-link-search
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] ol: Fix org-link-search |
Date: |
Thu, 21 Apr 2022 13:39:56 +0800 |
tony aldon <tony.aldon.adm@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