all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Moving point around empty overlays with 'after-text
Date: Mon, 10 Apr 2023 11:03:16 +0300	[thread overview]
Message-ID: <831qkscgfv.fsf@gnu.org> (raw)
In-Reply-To: <353c12ab-fddd-c7da-c8bc-065a2c8a26e9@gmail.com> (message from Platon Pronko on Mon, 10 Apr 2023 13:37:37 +0800)

> Date: Mon, 10 Apr 2023 13:37:37 +0800
> From: Platon Pronko <platon7pronko@gmail.com>
> 
> On 2023-04-10 13:09, Eli Zaretskii wrote:
> > How is this different from the front-advance and rear-advance
> > arguments you can specify when creating the overlay.
> 
> front-advance and rear-advance control if the typed text should be included in overlay. In case of inline type hints, typed text never needs to be included.

Is that the only effect of front-advance and rear-advance in this
case?

> > Did you look at how set-minibuffer-message succeeds in setting the
> > cursor? did you try using the same technique?
> > 
> > Did you try both before-string and after-string overlays?
> > 
> > Did you try non-"empty" overlays, i.e. those whose start and end are
> > not the same buffer position?  They can have before-string and
> > after-string properties as well.
> 
> I did. All these examples are about consitently positioning cursor before or after overlay at all times, and they of course work. But none of them allow cursor position to move from beginning to the end of overlay without nasty hacks with detecting cursor position and manually changing overlay properties.

I'm not sure which part(s) are considered "nasty hacks" in your eyes,
given that you are already okay with using "empty" overlays for
displaying the hints.  In any case, an overlay can have a 'keymap'
property, where you could perhaps redefine what C-f, C-b, and perhaps
some other relevant movement commands do.  Did you try that?



  reply	other threads:[~2023-04-10  8:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-08  5:46 Moving point around empty overlays with 'after-text Ash
2023-04-08 10:06 ` Eli Zaretskii
2023-04-08 10:14   ` Platon Pronko
2023-04-08 10:10 ` Platon Pronko
2023-04-08 23:06   ` Ash
2023-04-09 12:15     ` Platon Pronko
2023-04-09 14:49       ` tomas
2023-04-10  1:52         ` Platon Pronko
2023-04-10  4:56           ` Eli Zaretskii
2023-04-10  5:22             ` Platon Pronko
2023-04-10  9:56               ` Yuri Khan
2023-04-11  8:49                 ` Platon Pronko
2023-04-11  9:41                   ` Yuri Khan
2023-04-10  5:35           ` tomas
2023-04-10  5:48             ` Platon Pronko
2023-04-09 20:44       ` Ash
2023-04-10  2:00         ` Platon Pronko
2023-04-10  3:21           ` Ash
2023-04-10  3:31             ` Platon Pronko
2023-04-11  0:22               ` Ash
2023-04-10  5:09             ` Eli Zaretskii
2023-04-10  5:37               ` Platon Pronko
2023-04-10  8:03                 ` Eli Zaretskii [this message]
2023-04-10  9:05                   ` Platon Pronko
2023-04-10  5:01           ` Eli Zaretskii
2023-04-10  5:26             ` Platon Pronko

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=831qkscgfv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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.