From: Zack Weinberg <zackw@panix.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 45054@debbugs.gnu.org
Subject: bug#45054: 27.1; Can get point into the middle of a run of characters with a replacing display spec
Date: Sat, 5 Dec 2020 15:00:30 -0500 [thread overview]
Message-ID: <CAKCAbMjuZkCssHYvq_JcAek2M_3TgQQ9i6pVS=QcJffKa_ksuQ@mail.gmail.com> (raw)
In-Reply-To: <83sg8kb514.fsf@gnu.org>
On Sat, Dec 5, 2020 at 11:18 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > 1. Is this indeed a bug in Emacs?
>
> Probably a bug in adjust_point_for_property. Try your recipe after
> setting global-disable-point-adjustment non-nil.
No change, but set-variable doesn't recognize that variable (so I used
setq instead) Is this variable possibly only available in development
trunk and/or in an Emacs compiled with internal debugging enabled?
I'm using 27.1 as packaged by Debian, right now.
> > 2. Assuming it is, can you suggest a workaround? I’m hoping for a
> > viable solution within my code that’s compatible at least as far back
> > as Emacs 24.
>
> A workaround in Lisp? Try making the affected text, or some of it,
> invisible, i.e. give it the 'invisible' text property as well. (I
> didn't try to test this solution, so I cannot promise it will work.)
That makes the situation worse: with the mode enabled, I can separate
point from the visible cursor just by attempting to move the visible
cursor over the displayed ¶. Also, if the ¶ is at the beginning of a
line and point is at the end of that line, C-a moves only to after the
(invisible) 6. And redisplay gets screwed up if I delete one of the
invisible characters.
> > 3. I think it would be better UI if the C-d in the recipe deleted the
> > entire run of text that’s getting hidden (more generally, deletion
> > commands should behave as if the ¶ is really what’s in the buffer).
> > I can’t figure out how to implement that, can you suggest anything?
>
> Why can't you delete every character around point that has this
> special property?
I don't know how to do that. My best guess is this would be done in a
change hook, but I'm not sure of that, and I don't understand how to
write change hooks, either. Is there a good example or guide-level
documentation you could point me at?
zw
next prev parent reply other threads:[~2020-12-05 20:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 15:54 bug#45054: 27.1; Can get point into the middle of a run of characters with a replacing display spec Zack Weinberg
2020-12-05 15:59 ` Zack Weinberg
2020-12-05 16:18 ` Eli Zaretskii
2020-12-05 20:00 ` Zack Weinberg [this message]
2020-12-05 20:12 ` Eli Zaretskii
2020-12-05 20:30 ` Eli Zaretskii
[not found] ` <CAKCAbMipxyka3DNGYOswAewqN8PCGknMdnp3pkAVDi5V-Pcrxg@mail.gmail.com>
2020-12-05 22:12 ` Zack Weinberg
2020-12-06 5:41 ` Eli Zaretskii
2020-12-09 18:56 ` Zack Weinberg
2020-12-09 19:14 ` Eli Zaretskii
2020-12-09 19:20 ` Zack Weinberg
2020-12-09 19:50 ` Eli Zaretskii
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKCAbMjuZkCssHYvq_JcAek2M_3TgQQ9i6pVS=QcJffKa_ksuQ@mail.gmail.com' \
--to=zackw@panix.com \
--cc=45054@debbugs.gnu.org \
--cc=eliz@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.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).