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

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

bug#19045: 25.0.50; [PATCH] vc-git-print-log use --follow


From: Juri Linkov
Subject: bug#19045: 25.0.50; [PATCH] vc-git-print-log use --follow
Date: Tue, 06 Feb 2018 23:04:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> Would binding resize-mini-windows to nil instead fix that?  If it
> would, then I think it's a better way, because it doesn't affect what
> is being recorded in *Messages*.

I created a patch below that let-binds resize-mini-windows to nil,
but it has no effect and always resizes the echo area.
Should I create a separate bug report for this?

Also there is still a problem of hiding the trailing part with
“in background... done” when it is not displayed at the end of
the message, and I have no idea how to reformulate this phrase.

diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index b0d2221..a3d8e3d 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -290,16 +290,12 @@ vc-do-command
   (let* ((files
          (mapcar (lambda (f) (file-relative-name (expand-file-name f)))
                  (if (listp file-or-list) file-or-list (list file-or-list))))
+        (resize-mini-windows nil)
         (full-command
-         ;; What we're doing here is preparing a version of the command
-         ;; for display in a debug-progress message.  If it's fewer than
-         ;; 20 characters display the entire command (without trailing
-         ;; newline).  Otherwise display the first 20 followed by an ellipsis.
          (concat (if (string= (substring command -1) "\n")
                      (substring command 0 -1)
                    command)
-                 " "
-                 (vc-delistify (mapcar (lambda (s) (if (> (length s) 20) 
(concat (substring s 0 2) "...")  s)) flags))
+                 " " (vc-delistify flags)
                  " " (vc-delistify files))))
     (save-current-buffer
       (unless (or (eq buffer t)
@@ -332,7 +328,8 @@ vc-do-command
                (setq status proc)
                (when vc-command-messages
                  (vc-run-delayed
-                  (message "Running %s in background... done" full-command))))
+                   (let ((resize-mini-windows nil))
+                     (message "Running %s in background... done" 
full-command)))))
            ;; Run synchronously
            (when vc-command-messages
              (message "Running %s in foreground..." full-command))





reply via email to

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