From: Ihor Radchenko <yantar92@gmail.com>
To: tony aldon <tony.aldon.adm@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ol: Fix org-link-search
Date: Thu, 21 Apr 2022 13:39:56 +0800 [thread overview]
Message-ID: <87tuan3sgj.fsf@localhost> (raw)
In-Reply-To: <CACWitSDq6W+=0hhBV6NS1iydHSmCK5jmgosV45hS=_aF_kMshA@mail.gmail.com>
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
next prev parent reply other threads:[~2022-04-21 5:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 16:10 [PATCH] ol: Fix org-link-search tony aldon
2022-04-21 5:39 ` Ihor Radchenko [this message]
[not found] ` <CACWitSA6eYp68L3u3HFxA-U-EE=s9ZDQxKaHmaFPdL+UxXVEOw@mail.gmail.com>
2022-04-21 10:25 ` tony aldon
2022-04-21 13:00 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuan3sgj.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=tony.aldon.adm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).