From: Ihor Radchenko <yantar92@posteo.net>
To: Benjamin McMillan <mcmillanbb@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace
Date: Thu, 17 Oct 2024 17:58:52 +0000 [thread overview]
Message-ID: <877ca6zk4j.fsf@localhost> (raw)
In-Reply-To: <CALo8A5VBoKAtwbf4++s4YOLePTLOfePhhU+EkiLDX3OZxHzBFw@mail.gmail.com>
Benjamin McMillan <mcmillanbb@gmail.com> writes:
> My understanding is that org-end-of-meta-data should put point at the start
> of the 'real' contents of a heading. Meaning the first point where I might
> start making notes under a heading.
Nope. It should "Skip planning line and properties drawer in current
entry.", as per docstring. In other words, after the
metadata. Sometimes, "after metadata" is on the next headline.
For example, when headline has no contents at all:
* Heading 1
* Immediately heading 2
> I presume the test is to capture desired behavior when
> org-blank-before-new-entry is true?
I doubt so. But I do not know exact reason.
> If that's correct, then when org-blank-before-new-entry is true, maybe a
> call of (end-of-meta-data t) should skip to two lines after the metadata
> (possibly adding lines if necessary?)
> In contrast, I disable org-blank-before-new-entry, and want point to go
> literally to the end of meta data, even if I have some blanks before
> existing contents.
Surely not. (1) I still see not reason to break the existing behavior (and
annoy users used to the existing one); (2) metadata is often followed by
actual text in entry - org-blank-before-new-entry makes 0 sense in such
scenarios; (3) org-end-of-metadata must not edit the buffer. It would be
unexpected.
> I apologize if this seems nitpicky, but the structured nature of an org
> document allows for extremely accurate motion commands, and use of
> end-of-meta-data is an important part of that.
You are free to move back if you are using `org-end-of-meta-data' from
Elisp. This will be just as accurate.
For now, I see no bug in your report. Everything works as per docstring.
Canceled.
I suspect that the problem you are really trying to solve is not with
`org-end-of-meta-data', but with some other function/command that is
using it. If I am right, we may better discuss that problem.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2024-10-17 17:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-05 6:52 [BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace Benjamin McMillan
2024-10-12 11:45 ` Ihor Radchenko
2024-10-17 11:55 ` Benjamin McMillan
2024-10-17 17:58 ` Ihor Radchenko [this message]
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=877ca6zk4j.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=mcmillanbb@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).