bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34939: Some minibuffer behaviour is annoying


From: Drew Adams
Subject: bug#34939: Some minibuffer behaviour is annoying
Date: Tue, 9 Apr 2019 11:26:31 -0700 (PDT)

> > But you _can_ see it.  Before and after the `message',
> > which disappears as soon as you type your next input
> > char or perform some other action.  Seeing happens
> > in time, over time.
> 
> Yeah, it's annoying and creates a bad image for the
> editor. Just see the original report.

One user does not speak for all Emacs users.

Bad image of the editor is in the eye of the beholder,
and it should not be our primary concern.  Usefulness
for users (including Elisp programmers) should be our
main concern.

Different users make different uses of Emacs.  One
size - even the one size you think is great - does
not fit all.

> >> I'd think that much would be obvious.
> >
> > It's too general and abstract.  Too blanket, too
> > black-&-white.  Too simplistic, dogmatic.
> >
> > Sometimes in a dialog what's _wanted_ is to interrupt.
> > And there are different ways of interrupting, each of
> > which can be useful, helpful.
> 
> If we do get around to having message always delegate to
> minibuffer-message, there will be another function for "interrupting"
> messages. It would require you to do some compatibility shimming in your
> code, though.

I made my points.  I'm not going to argue with you.
As you do, you will just do what you want anyway.

I will say this though.

1. Whatever you do, please do it in Lisp, not C, so
   users can advise, redefine, remove, or improve
   on it according to their needs using Lisp.

2. Please make the behavior controllable by users
   and by code (Lisp).

3. Since 2009 I've used the following simple
   function in my code.  It lets code and users
   control the behavior.

   It is in _addition_ to `minibuffer-message'
   and `message', as another alternative.  IOW,
   sometimes I call `minibuffer-message',
   sometimes`message', and sometimes this function.

   An example of code controlling the behavior is
   binding `icicle-minibuffer-message-ok-p' to nil
   (conditionally) to avoid delays from using
   `minibuffer-message' or to inhibit possible
   message display.

   I have over a hundred calls to this function,
   so you can see that I am sensitive to the need
   to often use `minibuffer-message' when the
   minibuffer is active.  What I disagree with is
   your black-&-white view of things, which leads
   you to want to always impose the single behavior
   of `minibuffer-message'.

(defun icicle-msg-maybe-in-minibuffer (format-string &rest args)
  "Display FORMAT-STRING as a message.
If called with the minibuffer inactive, use `message'.
Otherwise:
 If `icicle-minibuffer-message-ok-p', then use `minibuffer-message'.
 Else do nothing (no message display)."
  (if (active-minibuffer-window)
      (when icicle-minibuffer-message-ok-p
        (save-selected-window
          (select-window (minibuffer-window))
          (minibuffer-message
            (apply #'format (concat "  [" format-string "]")
                            args))))
    (apply #'message format-string args)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]