Subject: Re: bug#75093: 31.0.50; Incorrent pointer position with minibuffer messages

From: the_wurfkreuz <[email-masked]>
Date: Wed, 01 Jan 2025 13:37:20 +0000

So i wasn't able to encounter such situation in a "normal" use of emacs. But if i tinker or debug something in a minibuffer, i might use a hook like this:

(defun my/show-typing-messages ()
  "Show messages while typing in minibuffer."
  (add-hook 'post-command-hook
            (lambda ()
              (when (minibufferp)
                (message "Typing: %s" (minibuffer-contents))))
            nil t))

(add-hook 'minibuffer-setup-hook #'my/show-typing-messages)

Which leads to the described situation. And to reproduce it, i use the code with these settings:

  (icomplete-vertical-mode)
  (setq icomplete-compute-delay 0)
  (setq icomplete-show-matches-on-no-input t)

On Thursday, December 26th, 2024 at 11:57 AM, the_wurfkreuz <[email-masked]> wrote:

> If my memory is not making things up right now, there might be situations where these kind of messages appear at the same time as you type. Which leads to a situation where characters are typed not at the current visual position of the cursor.
> 
> But i don't remember how exactly to reproduce this.
> 
> 
> Sent with Proton Mail secure email.
> 
> 
> On Thursday, December 26th, 2024 at 9:02, Eli Zaretskii [email-masked] wrote:
> 
> > > Date: Wed, 25 Dec 2024 19:23:44 +0000
> > > From: the_wurfkreuz via "Bug reports for GNU Emacs,
> > > the Swiss army knife of text editors" [email-masked]
> > > 
> > > If i don't have icomplete-vertical-mode enabled, i get minibuffer messages after the pointer:
> > > 
> > > But if i enable it:
> > > 
> > > (icomplete-vertical-mode)
> > > (setq icomplete-compute-delay 0)
> > > (setq icomplete-show-matches-on-no-input t)
> > > Then the pointer will be after a minibuffer message:
> > 
> > I think this is because we cannot display the minibuffer messages at
> > the end of the minibuffer contents (which is not visible) in the
> > vertical case.
> > 
> > Why is it a problem where we show the cursor in these cases? What is
> > important is that the minibuffer message be visible and does not
> > interfere with typing at the minibuffer prompt.