emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ol: Fix org-link-search


From: tony aldon
Subject: Re: [PATCH] ol: Fix org-link-search
Date: Thu, 21 Apr 2022 12:25:05 +0200



On Thu, Apr 21, 2022 at 12:23 PM tony aldon <tony.aldon.adm@gmail.com> wrote:
You're right I was effectively missing affiliated keywords and so my
patch is wrong.

Thank you for your quick feedback and insight.

Have a nice day,
Tony Aldon

On Thu, Apr 21, 2022 at 7:39 AM Ihor Radchenko <yantar92@gmail.com> wrote:
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]