GNU bug report logs - #51614
29.0.50; [PATCH] vc-switches ignore file or directory variables

Previous Next

Package: emacs;

Reported by: Aleksandr Vityazev <avityazev <at> posteo.org>

Date: Fri, 5 Nov 2021 16:40:02 UTC

Severity: normal

Found in version 29.0.50

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Aleksandr Vityazev <avityazev <at> posteo.org>
Cc: 51614 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#51614: 29.0.50; [PATCH] vc-switches ignore file or
 directory variables
Date: Sat, 10 Sep 2022 06:43:36 +0200
Aleksandr Vityazev <avityazev <at> posteo.org> writes:

> The current implementation of the vc-switches function from
> lisp/vc/vc.el ignores the values ​​of vc-BACKEND-diff-switches,
> vc-diff-switches set as local directory or file variables.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

> Perhaps the attached patch can solve the problem.

[...]

> +  (let* ((buffer (other-buffer (current-buffer) t))
> +         (switches
> +	  (or (when backend
> +	        (let ((sym (vc-make-backend-sym
> +			    backend (intern (concat (symbol-name op)
> +						    "-switches")))))
> +		  (when (boundp sym) (buffer-local-value sym buffer))))
> +	      (let ((sym (intern (format "vc-%s-switches" (symbol-name op)))))
> +	        (when (boundp sym) (buffer-local-value sym buffer)))
> +	      (cond
> +	       ((eq op 'diff) diff-switches)))))

I don't think using `other-buffer' here is a reliable way of getting the
buffer we're interested in here, so I think this would have to be fixed
in a different way.

I'm adding Dmitry to the CCs; perhaps he has some comments here.




This bug report was last modified 1 year and 287 days ago.

Previous Next


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