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: Juri Linkov
Subject: bug#34939: Some minibuffer behaviour is annoying
Date: Sun, 31 Mar 2019 23:29:11 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> (1) when I press backspace and the prompt is empty, minibuffer tells me
>> "Text is read-only". You. Don't. Say.
>
> Messages in the echo area should not conceal the minibuffer.  Period.
>
> There is a special function minibuffer-message for this purpose:

There is another place where messages conceal the minibuffer:
running a version-control command that asks for a branch name
and typing TAB for completion runs a command to fetch branch names.
Its output conceals the minibuffer when vc-command-messages is non-nil.
Here is a fix:

diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index edbb83f3df..c4b327a3f0 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -324,7 +324,8 @@ vc-do-command
                       (apply 'start-file-process command (current-buffer)
                               command squeezed))))
                (when vc-command-messages
-                 (message "Running in background: %s" full-command))
+                 (let ((inhibit-message (eq (selected-window) 
(active-minibuffer-window))))
+                   (message "Running in background: %s" full-command)))
                 ;; Get rid of the default message insertion, in case we don't
                 ;; set a sentinel explicitly.
                (set-process-sentinel proc #'ignore)
@@ -332,11 +333,13 @@ vc-do-command
                (setq status proc)
                (when vc-command-messages
                  (vc-run-delayed
-                   (let ((message-truncate-lines t))
+                   (let ((message-truncate-lines t)
+                         (inhibit-message (eq (selected-window) 
(active-minibuffer-window))))
                      (message "Done in background: %s" full-command)))))
            ;; Run synchronously
            (when vc-command-messages
-             (message "Running in foreground: %s" full-command))
+             (let ((inhibit-message (eq (selected-window) 
(active-minibuffer-window))))
+               (message "Running in foreground: %s" full-command)))
            (let ((buffer-undo-list t))
              (setq status (apply 'process-file command nil t nil squeezed)))
            (when (and (not (eq t okstatus))
@@ -350,7 +353,8 @@ vc-do-command
                     (if (integerp status) (format "status %d" status) status)
                     full-command))
            (when vc-command-messages
-             (message "Done (status=%d): %s" status full-command))))
+             (let ((inhibit-message (eq (selected-window) 
(active-minibuffer-window))))
+               (message "Done (status=%d): %s" status full-command)))))
        (vc-run-delayed
          (run-hook-with-args 'vc-post-command-functions
                              command file-or-list flags))





reply via email to

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