From: Rainer Dunker <rainer.dunker@mailbox.org>
To: emacs-orgmode@gnu.org
Subject: org-open-at-point while on "normal" text
Date: Sun, 28 Jan 2024 17:35:34 +0100 [thread overview]
Message-ID: <ZbaCVhcNZ95XGnax@mailbox.org> (raw)
Hello All,
typing C-c C-o to follow a link while point is on "normal" text instead of a link, this results in error "no link found"; okay.
Recently there was an Org Mode upgrade from version 9.4.4 to 9.6.6 on my machine, and since then, C-c C-o on "normal" text behaves differently: Instead of raising the no link error, it opens the "Select link to open" menu. As I understand, this behaviour should occur when point is on the section's headline, but not when it's just somewhere within the section.
I tracked this down to a changed behaviour of the org-element-at-point function. Suppose I have a buffer in Org Mode containing these two lines:
* headline
text
If I place point within the word "text" and evaluate the expression ...
(org-element-property :parent (org-element-property :parent (org-element-at-point)))
... this results in "(headline (:raw-value "headline" :begin 1 ...", apparently meaning that I just navigated the document structure tree from the text paragraph up to the section headline.
Doing the same test on another machine with Org Mode 9.4.4, the expression results in nil. And as far as I understand, this is the expected behaviour: Starting with (org-element-at-point) and following the chain of parent relations in the structure tree should not reach the headline. I found this explanation in both the Org Element API reference in section 1.1 ...
https://orgmode.org/worg/dev/org-element-api.html#local
... as well as in this mailing list post:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00226.html
I also noticed that, between these two Org Mode versions, the org-element-at-point function has been completely rewritten. Now my question is: Is the changed behaviour--and, as a consequence, also that of org-open-at-point--intended or rather a bug?
Regards,
Rainer Dunker
next reply other threads:[~2024-01-28 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-28 16:35 Rainer Dunker [this message]
2024-01-28 18:48 ` org-open-at-point while on "normal" text Ihor Radchenko
2024-01-29 19:58 ` Rainer Dunker
2024-01-30 11:32 ` 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=ZbaCVhcNZ95XGnax@mailbox.org \
--to=rainer.dunker@mailbox.org \
--cc=emacs-orgmode@gnu.org \
/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).