all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Bach <sjbach@sjbach.com>
Cc: 41513@debbugs.gnu.org
Subject: bug#41513: `compute-motion' can miscount buffer positions in the presence of 'before-string/'after-string overlays
Date: Tue, 26 May 2020 22:09:23 +0300	[thread overview]
Message-ID: <83o8qatsws.fsf@gnu.org> (raw)
In-Reply-To: <CAB5Eu-PtpHKnfWmX0r0zRPdmE8n48GXuVFVRDi5fkTsHZ67kAw@mail.gmail.com> (message from Stephen Bach on Tue, 26 May 2020 14:12:10 -0400)

> From: Stephen Bach <sjbach@sjbach.com>
> Date: Tue, 26 May 2020 14:12:10 -0400
> Cc: 41513@debbugs.gnu.org
> 
> Do you have any points of advice for avoiding side-effects when moving
> the cursor around the buffer programmatically?
> 
> What I have so far:
> - Wrap in save-excursion
> - Bind to t:
>   - inhibit-point-motion-hooks
>   - cursor-sensor-inhibit
>   - inhibit-field-text-motion (for precision, might be superfluous)
> - Bind to nil:
>   - goal-column (probably superfluous)

save-excursion should do, usually.

> Thanks Eli, I appreciate the help and also the work you do for Emacs.

You are welcome.





  reply	other threads:[~2020-05-26 19:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 18:30 bug#41513: `compute-motion' can miscount buffer positions in the presence of 'before-string/'after-string overlays Stephen Bach
2020-05-24 19:09 ` Eli Zaretskii
2020-05-24 19:55   ` Stephen Bach
2020-05-25 15:23     ` Eli Zaretskii
2020-05-25 20:16       ` Stephen Bach
2020-05-26 16:21         ` Eli Zaretskii
2020-05-26 18:12           ` Stephen Bach
2020-05-26 19:09             ` Eli Zaretskii [this message]
2020-08-24  0:26               ` 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=83o8qatsws.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=41513@debbugs.gnu.org \
    --cc=sjbach@sjbach.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 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.