GNU bug report logs - #52518
Log only vc-command-messages

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 15 Dec 2021 17:33:02 UTC

Severity: wishlist

Tags: patch

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 52518 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>
Cc: 52518 <at> debbugs.gnu.org
Subject: Re: bug#52518: Log only vc-command-messages
Date: Wed, 15 Dec 2021 14:02:32 -0800
Juri Linkov <juri <at> linkov.net> writes:

> It's useful to customize vc-command-messages to t
> to be able to inspect the performed vc commands
> in the *Messages* buffer.  When something goes wrong,
> it's clearly visible what command caused the problem.
>
> But displaying such all vc commands in the echo area
> causes too much noise.  Here is an option to not
> display such messages, only log in the *Messages* buffer:

Good idea.

>  		(when vc-command-messages
> -		  (let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
> +		  (let ((inhibit-message
> +			 (or (eq vc-command-messages 'log)
> +			     (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.
> @@ -345,11 +351,15 @@ vc-do-command
>  		(when vc-command-messages
>  		  (vc-run-delayed
>  		    (let ((message-truncate-lines t)
> -			  (inhibit-message (eq (selected-window) (active-minibuffer-window))))
> +			  (inhibit-message
> +			   (or (eq vc-command-messages 'log)
> +			       (eq (selected-window) (active-minibuffer-window)))))
>  		      (message "Done in background: %s" full-command)))))
>  	    ;; Run synchronously
>  	    (when vc-command-messages
> -	      (let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
> +	      (let ((inhibit-message
> +		     (or (eq vc-command-messages 'log)
> +			 (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)))
> @@ -364,7 +374,9 @@ vc-do-command
>  		     (if (integerp status) (format "status %d" status) status)
>  		     full-command))
>  	    (when vc-command-messages
> -	      (let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
> +	      (let ((inhibit-message
> +		     (or (eq vc-command-messages 'log)
> +			 (eq (selected-window) (active-minibuffer-window)))))

Should these be refactored into a function of their own?  It seems
a tad repetitive as is.




This bug report was last modified 3 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.