From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] New package proposal: visual-path-abbrev.el
Date: Fri, 08 Mar 2019 14:01:56 -0500 [thread overview]
Message-ID: <jwv7ed919mh.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <875zstz2wc.fsf@gnu.org> (Tassilo Horn's message of "Fri, 08 Mar 2019 18:34:11 +0100")
> Ok, now after the hymn of praise, here's the caveat which I couldn't
> solve so far: When point leaves one of my overlays and immediately
> appears in another one, the `cursor-sensor-functions' are NOT CALLED.
> Of course, I expected to get a one call with 'left followed by a call
> with 'entered.
IIRC you should indeed get 2 calls (one for leave and one for enter),
unless the overlays are adjacent I think (the code looks at
char-properties so doesn't pay much attention to overlay boundaries
themselves).
> Can we consider that a bug in cursor-sensor or is that the expected
> behavior? And more importantly, can I influence it so that it works for
> my use-case?
Not sure if it's a bug, but if the problem is that your overlays are
adjacent (so that all the chars between the old and the new positions
have the same `cursor-sensor-functions` property), then you can fix it
in one of two ways:
- change your overlay's boundaries so as to leave some chars between
the overlays.
- use artificially non-eql values of the functions placed on
`cursor-sensor-functions` (e.g. using closures that close over the
overlay itself).
> An easy recipe for reproduction is to run M-x rgrep, then activate my
> mode in the *grep* buffer, and then move up and down using C-p / C-n.
Haven't tried it yet, but it sounds like maybe it's just a plain bug in
cursor-sensor.
Stefan
next prev parent reply other threads:[~2019-03-08 19:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-02 11:05 [ELPA] New package proposal: visual-path-abbrev.el Tassilo Horn
2019-03-02 11:34 ` Eli Zaretskii
2019-03-02 14:59 ` Tassilo Horn
2019-03-03 9:46 ` Tassilo Horn
2019-03-03 13:48 ` Stefan Monnier
2019-03-03 15:11 ` Eli Zaretskii
2019-03-03 15:52 ` Tassilo Horn
2019-03-03 17:18 ` Eli Zaretskii
2019-03-03 17:55 ` Tassilo Horn
2019-03-04 18:03 ` Eli Zaretskii
2019-03-05 10:01 ` Tassilo Horn
2019-03-05 16:21 ` Eli Zaretskii
2019-03-05 18:32 ` Tassilo Horn
2019-03-08 5:49 ` Stefan Monnier
2019-03-08 14:02 ` Tassilo Horn
2019-03-08 17:34 ` Tassilo Horn
2019-03-08 19:01 ` Stefan Monnier [this message]
2019-03-08 22:18 ` Stefan Monnier
2019-03-09 6:52 ` Tassilo Horn
2019-03-08 18:52 ` Stefan Monnier
2019-03-02 21:25 ` Leo Liu
2019-03-03 9:25 ` Tassilo Horn
2019-03-04 0:23 ` Leo Liu
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=jwv7ed919mh.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@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 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.