From: Eli Zaretskii <eliz@gnu.org>
To: Xinyang Chen <chenxy@mit.edu>
Cc: 61361@debbugs.gnu.org
Subject: bug#61361: cursor cannot be at the start of overlay that starts with a newline
Date: Wed, 08 Feb 2023 17:09:22 +0200 [thread overview]
Message-ID: <83k00snqhp.fsf@gnu.org> (raw)
In-Reply-To: <CAKGiUYy8m+nD6Z7wmOpPmGCvvVzuixcdhQathCK8hr4KAFpcCw@mail.gmail.com> (message from Xinyang Chen on Wed, 8 Feb 2023 09:25:07 -0500)
> From: Xinyang Chen <chenxy@mit.edu>
> Date: Wed, 8 Feb 2023 09:25:07 -0500
>
> I'm not seeing the point here though; what happens if you have a line with a single newline? What allows
> placing a cursor there in that case?
In that case, Emacs _knows_ that point is positioned at the newline,
so it does an extra-special trick of placing the cursor after the last
character of the line.
But the 'cursor' property just supplies the index in the display
string where your Lisp program wants to place the cursor. Emacs
cannot place point inside a display string. So the display engine
needs to find where that index is on display. And it cannot find that
place because there's no glyph that corresponds to the newline.
next prev parent reply other threads:[~2023-02-08 15:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 4:29 bug#61361: cursor cannot be at the start of overlay that starts with a newline Xinyang Chen
2023-02-08 13:08 ` Eli Zaretskii
2023-02-08 14:41 ` Dmitry Gutov
2023-02-08 15:12 ` Eli Zaretskii
[not found] ` <CAKGiUYy8m+nD6Z7wmOpPmGCvvVzuixcdhQathCK8hr4KAFpcCw@mail.gmail.com>
2023-02-08 15:09 ` Eli Zaretskii [this message]
2023-02-08 15:16 ` Dmitry Gutov
2023-02-08 15:50 ` Eli Zaretskii
2023-02-08 22:06 ` Dmitry Gutov
2023-09-04 21:08 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k00snqhp.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=61361@debbugs.gnu.org \
--cc=chenxy@mit.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.