From: Benjamin McMillan <mcmillanbb@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace
Date: Sat, 5 Oct 2024 15:52:00 +0900 [thread overview]
Message-ID: <CALo8A5VtbtB0P6RkHuShyFV4qBAMTeujVVpjsH_gY1sY4FwNDQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
Specifically, a call to (org-end-of-meta-data t) with point at the > on the
following tree will go all the way to the next heading.
In contrast, a call to just (org-end-of-meta-data), without the FULL flag,
will go to the beginning of heading content, as expected.
* >heading
* another heading
The issue arises from the code for skipping clock lines, which does so by
checking if point is looking at (concat "[ \t]*$" "\\|" org-clock-line-re).
I'm not sure of the intention of the first alternative, the "[ \t]*$", but
it matches an empty line, and so the loop advances point to the next line,
until reaching the next heading in the case above.
Removing that from the regexp appears to fix the issue.
If this change is fine, then I am happy to provide a patch.
Thanks,
Ben
[-- Attachment #2: Type: text/html, Size: 937 bytes --]
next reply other threads:[~2024-10-05 6:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-05 6:52 Benjamin McMillan [this message]
2024-10-12 11:45 ` [BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace Ihor Radchenko
2024-10-17 11:55 ` Benjamin McMillan
2024-10-17 17:58 ` Ihor Radchenko
2024-10-20 6:28 ` Benjamin McMillan
2024-10-20 9:05 ` Ihor Radchenko
2024-10-22 13:25 ` Benjamin McMillan
2024-10-22 17:28 ` 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=CALo8A5VtbtB0P6RkHuShyFV4qBAMTeujVVpjsH_gY1sY4FwNDQ@mail.gmail.com \
--to=mcmillanbb@gmail.com \
--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).