X-Loop: help-debbugs@HIDDEN Subject: bug#51614: 29.0.50; [PATCH] vc-switches ignore file or directory variables Resent-From: Aleksandr Vityazev <avityazev@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 05 Nov 2021 16:40:02 +0000 Resent-Message-ID: <handler.51614.B.163613039419957 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 51614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 51614 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.163613039419957 (code B ref -1); Fri, 05 Nov 2021 16:40:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Nov 2021 16:39:54 +0000 Received: from localhost ([127.0.0.1]:46986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1mj2Ft-0005Bp-LJ for submit <at> debbugs.gnu.org; Fri, 05 Nov 2021 12:39:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:57186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <avityazev@HIDDEN>) id 1mj2Fo-0005Bd-RU for submit <at> debbugs.gnu.org; Fri, 05 Nov 2021 12:39:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <avityazev@HIDDEN>) id 1mj2Fo-0004Tp-1d for bug-gnu-emacs@HIDDEN; Fri, 05 Nov 2021 12:39:48 -0400 Received: from mout02.posteo.de ([185.67.36.66]:49499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <avityazev@HIDDEN>) id 1mj2Fk-000402-Ao for bug-gnu-emacs@HIDDEN; Fri, 05 Nov 2021 12:39:47 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 18B5A240101 for <bug-gnu-emacs@HIDDEN>; Fri, 5 Nov 2021 17:39:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1636130378; bh=vq13Kot2f0rDdJTsSlECxTp1KSIy9sU0JFyjaZ4YfWU=; h=From:To:Subject:Date:From; b=Hcm5zQgzgp7L8lW1vlDfnJX2ak06cPBmpUxa7MoLpWUVziIecCtgO8HMwQ548u5bN UHXIGoqIBDm+P6jLBYP9igGzC6H9tZr09rx/mz7KXAJSKTpWUV7xr8fxQZA50uFZOM 0m2pmOdzvlTYUfNknvtcVc58L6nhii8DXnQqVAR6npH9evFpoX18HXnHuwFozKLe/p +1kE6yHZ+/nZmAZLP/AWTlmIDDpWCrZTNxtUUSqLRS9FM5hVvQuakajAwQRj6wFdYE NOQdVa8IHUYgMJYFw1ZVAw1fKgLkO9F2dtSiR7pjqwcHZ07i0ArOgFDRMCRrNlfIAb toFFBZtjSR3hQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Hm5nh55Qrz9rxB for <bug-gnu-emacs@HIDDEN>; Fri, 5 Nov 2021 17:39:36 +0100 (CET) From: Aleksandr Vityazev <avityazev@HIDDEN> Date: Fri, 05 Nov 2021 16:39:49 +0000 Message-ID: <875yt68skq.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=avityazev@HIDDEN; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, The current implementation of the vc-switches function from lisp/vc/vc.el ignores the values =E2=80=8B=E2=80=8Bof vc-BACKEND-diff-switc= hes, vc-diff-switches set as local directory or file variables. Here's a reproduction: 1. Run "emacs -Q" 2. "C-x C-f" to open file /tmp/test-project/.dir-locals.el 3. Type this into the buffer: ((nil ((vc-git-diff-switches . ("--binary" "--textconv"))))) 4. "C-x C-s" to save the buffer 5. "C-x C-f" to open the file /tmp/test-project/test.gpg. Without --binary and --textconv, diff will not be displayed for a file with a .gpg extension. 6. Type something in the buffer for example: "Just a test" 7. "C-x C-s" to save the file 8. "C-x v v" to choose VCS backend: in this case, Git and register the file under VCS 9. "C-x v v" to commit changes 10. Type commit message and "C-c C-c" 11. Type something in the buffer with file /tmp/test-project/test.gpg 12. "C-x C-s" to save the buffer 13. "C-x v =3D" to show the diff 14. Bug occurs: diff is not displayed. Perhaps the attached patch can solve the problem. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-vc-vc.el-vc-switches-Handle-dir-local-variables.patch Content-Description: lisp/vc/vc.el From 9b031423294224a6fe142abf6bd469b5cfa99c83 Mon Sep 17 00:00:00 2001 From: Alexandr Vityazev <avityazev@HIDDEN> Date: Thu, 28 Oct 2021 22:43:28 +0300 Subject: [PATCH] * lisp/vc/vc.el (vc-switches): Handle dir local variables. * lisp/vc/vc.el (vc-switches): Handle vc-BACKEND-diff-switches, vc-diff-switches set as local directory or file variables. --- lisp/vc/vc.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 927a241a60..a858cbc451 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1700,16 +1700,17 @@ diff only, `diff-switches'. If the chosen value is not a string or a list, return nil. This is so that you may set, e.g. `vc-svn-diff-switches' to t in order to override the value of `vc-diff-switches' and `diff-switches'." - (let ((switches - (or (when backend - (let ((sym (vc-make-backend-sym - backend (intern (concat (symbol-name op) - "-switches"))))) - (when (boundp sym) (symbol-value sym)))) - (let ((sym (intern (format "vc-%s-switches" (symbol-name op))))) - (when (boundp sym) (symbol-value sym))) - (cond - ((eq op 'diff) diff-switches))))) + (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))))) (if (stringp switches) (list switches) ;; If not a list, return nil. ;; This is so we can set vc-diff-switches to t to override -- 2.33.1 --=-=-= Content-Type: text/plain -- Best regards, Aleksandr Vityazev --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Aleksandr Vityazev <avityazev@HIDDEN> Subject: bug#51614: Acknowledgement (29.0.50; [PATCH] vc-switches ignore file or directory variables) Message-ID: <handler.51614.B.163613039419957.ack <at> debbugs.gnu.org> References: <875yt68skq.fsf@HIDDEN> X-Gnu-PR-Message: ack 51614 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 51614 <at> debbugs.gnu.org Date: Fri, 05 Nov 2021 16:40:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 51614 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 51614: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51614 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#51614: 29.0.50; [PATCH] vc-switches ignore file or directory variables Resent-From: Lars Ingebrigtsen <larsi@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 10 Sep 2022 04:44:01 +0000 Resent-Message-ID: <handler.51614.B51614.16627850316133 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 51614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Aleksandr Vityazev <avityazev@HIDDEN> Cc: 51614 <at> debbugs.gnu.org, Dmitry Gutov <dgutov@HIDDEN> Received: via spool by 51614-submit <at> debbugs.gnu.org id=B51614.16627850316133 (code B ref 51614); Sat, 10 Sep 2022 04:44:01 +0000 Received: (at 51614) by debbugs.gnu.org; 10 Sep 2022 04:43:51 +0000 Received: from localhost ([127.0.0.1]:36104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oWsLP-0001ap-8l for submit <at> debbugs.gnu.org; Sat, 10 Sep 2022 00:43:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1oWsLJ-0001aX-Nc for 51614 <at> debbugs.gnu.org; Sat, 10 Sep 2022 00:43:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=YnMXw/upbcnoJQC5Q9sbfAmgmde82TA0fWNGA0vtow0=; b=ARkrwaIMQtA3J2FQS5hhp0aSs+ pEdTTHRyoz7Mz7u8xQ3RvGy/VD1lhLHqrLo4SshEHsrA5vtTtwg8Whdj1tSoz0BmqQHKem7tM/Ltn SIXLHITV7b6ePm0MNTtKHB1/YF0aTcXdlRJyCEVGDSpOqek1ixkD+02KyAC/hHMH6PRo=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1oWsLB-0006Kv-5T; Sat, 10 Sep 2022 06:43:39 +0200 From: Lars Ingebrigtsen <larsi@HIDDEN> In-Reply-To: <875yt68skq.fsf@HIDDEN> (Aleksandr Vityazev's message of "Fri, 05 Nov 2021 16:39:49 +0000") References: <875yt68skq.fsf@HIDDEN> X-Now-Playing: Peter Gabriel's _Peter Gabriel 3_: "I Don't Remember" Date: Sat, 10 Sep 2022 06:43:36 +0200 Message-ID: <87mtb7rg93.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Aleksandr Vityazev <avityazev@HIDDEN> writes: > The current implementation of the vc-switches function from > lisp/vc/vc.el ignores the values =?UTF-8?Q?=E2=80=8B=E2=80=8Bof?= vc-BACKEND-diff-switches, > vc-diff-switches set as local directory or file variables. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Aleksandr Vityazev <avityazev@HIDDEN> writes: > The current implementation of the vc-switches function from > lisp/vc/vc.el ignores the values =E2=80=8B=E2=80=8Bof vc-BACKEND-diff-swi= tches, > 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.
Received: (at control) by debbugs.gnu.org; 10 Sep 2022 04:43:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 10 00:43:54 2022 Received: from localhost ([127.0.0.1]:36107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oWsLS-0001b7-KR for submit <at> debbugs.gnu.org; Sat, 10 Sep 2022 00:43:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1oWsLQ-0001af-Tc for control <at> debbugs.gnu.org; Sat, 10 Sep 2022 00:43:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z1HwyEx2QinDlT1Hme37vlKQ2izx/i1be/eGi4Hu+6U=; b=l2PkQaunLCVUB+udV8yYSSDcLs +9etYBY83tL9n/HkkFco5vXAVuE+jbZpwQCYao1K5yteEpwpj0rblIEeZUJ9VjOU5QEBhmGXcQ0hj 4+Rqt5xCv+UwxiXbB3jspSecsoTVB1GNs2mZc4RXx/stEaLZGIwYWePgFLra0K3aB3Q4=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1oWsLJ-0006L5-9i for control <at> debbugs.gnu.org; Sat, 10 Sep 2022 06:43:47 +0200 Date: Sat, 10 Sep 2022 06:43:44 +0200 Message-Id: <87leqrrg8v.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: Lars Ingebrigtsen <larsi@HIDDEN> Subject: control message for bug #51614 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 51614 - patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 51614 - patch quit
Received: (at control) by debbugs.gnu.org; 10 Sep 2022 04:43:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 10 00:43:58 2022 Received: from localhost ([127.0.0.1]:36110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oWsLV-0001bM-TN for submit <at> debbugs.gnu.org; Sat, 10 Sep 2022 00:43:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1oWsLU-0001ar-Qw for control <at> debbugs.gnu.org; Sat, 10 Sep 2022 00:43:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MsApuX/MsnLRnUnGHSTrzEpqqa0KZkVoXju84lkEMmw=; b=nYVQvYD4y94VkAMmr5MucCjPE4 YRfedorbQTm1K9YmuRWoKys+E9mG30YMfWcNYgHgTAUa2x9+VyIzYstozalGGjBCy2Fu29rA+fwvH S7XriDawtyhRAUk8qcl+0wr8WKfCuCtQILh1OPKLvPI3BNMSZ6aC41Z6OGDd2IInRq40=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1oWsLN-0006LD-2k for control <at> debbugs.gnu.org; Sat, 10 Sep 2022 06:43:51 +0200 Date: Sat, 10 Sep 2022 06:43:48 +0200 Message-Id: <87k06brg8r.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: Lars Ingebrigtsen <larsi@HIDDEN> Subject: control message for bug #51614 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 51614 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 51614 + moreinfo quit
X-Loop: help-debbugs@HIDDEN Subject: bug#51614: 29.0.50; [PATCH] vc-switches ignore file or directory variables Resent-From: Dmitry Gutov <dgutov@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 07 Oct 2022 00:10:02 +0000 Resent-Message-ID: <handler.51614.B51614.16651013747062 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 51614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Lars Ingebrigtsen <larsi@HIDDEN>, Aleksandr Vityazev <avityazev@HIDDEN> Cc: 51614 <at> debbugs.gnu.org Received: via spool by 51614-submit <at> debbugs.gnu.org id=B51614.16651013747062 (code B ref 51614); Fri, 07 Oct 2022 00:10:02 +0000 Received: (at 51614) by debbugs.gnu.org; 7 Oct 2022 00:09:34 +0000 Received: from localhost ([127.0.0.1]:33858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ogavm-0001pp-BX for submit <at> debbugs.gnu.org; Thu, 06 Oct 2022 20:09:34 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:53036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <raaahh@HIDDEN>) id 1ogavk-0001pd-O1 for 51614 <at> debbugs.gnu.org; Thu, 06 Oct 2022 20:09:33 -0400 Received: by mail-wm1-f48.google.com with SMTP id l8so1978281wmi.2 for <51614 <at> debbugs.gnu.org>; Thu, 06 Oct 2022 17:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date; bh=AW9sbFwVq1B17BvR8LVJ9AVWW/5FJ2v+jeobff2NJak=; b=A/5b02b22gUC4g9fFR7Hmd/B0ugx4W57ZKV2DjIpVqFguMII3MVxRjiYIx+53daV9i k2MnzSAN6Q0Xd1bD2RY1lfPcjAjRLBw9T72/wCC4DabsSCTvlfmgeFrgREeZ9vsDHIfy DQOu08U4AWdbLwtP3InO7oPNqRCwUq8yiXX4Y05IkY06WId6F0g49RB8lGgBPEMt+ixX 0mFlck8c5HcPTNTIAtgWWcj/sZWrGg+5Xp2jvI9ngGAwskKt6nGtxU+qcSx1AywSjz1r c+duB0hTQs9pgVAPZb8OzSKJuHzP9gwBEKII+pGPDNJQ/9vOw6p4gA/29lXP6HpfxMzV gZnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date; bh=AW9sbFwVq1B17BvR8LVJ9AVWW/5FJ2v+jeobff2NJak=; b=oylA7VHdRuHwNxUJ1GnKoS6vZfHPxggKGafEQcQt+AnJTZ2d6hFC1YU2gRgzb4XEJl faEDjq9vS0YNS7KdoFiTeRefZl0X65G4oRVdqUTcuI4Xfz9sx/tx+2Pg895t5wdw5rH6 w5nqJz607NopTrY8RFuJhnBr17Y5MjqdLbW7LrOL1z8Hec3zGjZZpLSy9jYMjaBIO4tl n3seXiHMU44mQ1nrLAyuJhffUW4XqeO6AfH/Vn4LJ3U52bQNFohvOKk9aV8X7eyI6msW HAyUpUDL2yhoR9QCb1tt5TfgQLDMaCW8kFmvNJHpRjiIPf1Z0O2NP2MMcwqIb+5ofgM0 68Nw== X-Gm-Message-State: ACrzQf2lhPxqwEWFUq48A0HoPMrvNPQEApROhn/YbTD2Z2GVuq3uA/SV 8skfxuwd6i/rhdjR9M7YdNc= X-Google-Smtp-Source: AMsMyM6lZjSbDzcIu8ykga09AAliRLgUxmphO6tht2l3T5zrx3df7PyfGzfAHak1vmy1NrJJ6RxoFg== X-Received: by 2002:a05:600c:2143:b0:3bd:5dbf:e28b with SMTP id v3-20020a05600c214300b003bd5dbfe28bmr1498680wml.158.1665101366681; Thu, 06 Oct 2022 17:09:26 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l5-20020adfe9c5000000b0022da3977ec5sm524992wrn.113.2022.10.06.17.09.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Oct 2022 17:09:26 -0700 (PDT) Message-ID: <e5cd9fb3-27bd-de44-ec3e-77dbaa18e149@HIDDEN> Date: Fri, 7 Oct 2022 03:09:24 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US References: <875yt68skq.fsf@HIDDEN> <87mtb7rg93.fsf@HIDDEN> From: Dmitry Gutov <dgutov@HIDDEN> In-Reply-To: <87mtb7rg93.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) On 10.09.2022 07:43, Lars Ingebrigtsen wrote: >> + (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. Right. > I'm adding Dmitry to the CCs; perhaps he has some comments here. I was thinking vc-switches could have a new, optional argument: buffer. But even that seems hard to get ahold of in vc-diff-internal (the FILES var might have one element, which is a directory, with no visiting buffers). Perhaps support for this would need to be added on command-by-command basis, with some helper which would collect all buffer-local vars and bind them dynamically. Alternatively, we could support setting 'vc-XX-switches' to a function value. That function could take the current default-directory and compute the value based on it. I'm not sure if that'll fit Aleksandr's workflow, though.
Received: (at control) by debbugs.gnu.org; 3 Sep 2023 08:49:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 03 04:49:48 2023 Received: from localhost ([127.0.0.1]:39305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qcink-0000Vo-K6 for submit <at> debbugs.gnu.org; Sun, 03 Sep 2023 04:49:48 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:56412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1qcind-0000VJ-B2 for control <at> debbugs.gnu.org; Sun, 03 Sep 2023 04:49:47 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-500a8b2b73eso803976e87.0 for <control <at> debbugs.gnu.org>; Sun, 03 Sep 2023 01:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693730965; x=1694335765; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=6RezppdxRmvRZr7uCM9igsv49zMFvJ9OfwPpbCsRXsM=; b=ZiNyiG89QXUXkoIJezZ3wdUtnkyVyrO3IktAuvr0N62DumD3QB4sm0MQ5KwyYpfPpU tMXn2XyPIykfNgNLzIojWAwCLKlf8rN5nCChV/sVn0lGbHqmVeZvONtyA8PXVFd2aYra GYbf9KRnk8ZGCHcL/gBtpCLanAWBAPz3W/v6L09r0K+opz0Rw5oMNFX12PS8hcsrC8rf tuFfq+slCizw1IdvZVbbG3/S8IavGpoR5Oc8v0wBXpQVJAc3hXsE3oSDclBh91Oh69Em uAokQnO7KBUEmMS7444jtcqknvXAw+G6TT+1I084cPQN5URm8RXy8erVCxsJUyEukXVK Ayjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693730965; x=1694335765; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6RezppdxRmvRZr7uCM9igsv49zMFvJ9OfwPpbCsRXsM=; b=gJwHVM+mLGxZHt53hQFwCRvJOJX0FmYi2fNaTMevyGnWBAuKzimoEZVGu6I0ZL8FDo tW69uMZBuvRGTfGCW45Wh8vQDOLvtBUggQ3J7MfHRojmyxXIhWrks9mHNFkZJdVDrlzd d2Ak24ZWh4sCh6iAH6j2gxt5efHNEePvycBH5z50DVDtqMfHfpfg1qnnW2K/sO7MY2m9 yp2oGwXt+OcVA7xyZRDu3cwauXSWViu5+Fk63iCYuXnC0YgG1BCtiF6VPfbj4iVJUAKm fACf4OWKsEsmGMeb9JHPXYC9t9oCcJtZfM8cmSIYFYvwFC1xLYiVZwZQ5svJakvJOE90 ly5Q== X-Gm-Message-State: AOJu0YyhguM4LMk8Sq1c3/Re4Uz56/OOUCTaPfaok1NIV4wgRigUdJ+k hs9j9yucuLwCUZUZtZhyS8zCvIFG+p7hDLaFQabDhmCTeD8= X-Google-Smtp-Source: AGHT+IHac3fXYbv5Vq4WlmmKNJy3c1e5f2x/uPoql9eodCbBZ7FBfoqHHDa7s6PTnBUScEbPX3Cqvj/++tk13+SZ0w0= X-Received: by 2002:a05:6512:3994:b0:500:b64f:afbe with SMTP id j20-20020a056512399400b00500b64fafbemr5775599lfu.19.1693730964872; Sun, 03 Sep 2023 01:49:24 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 3 Sep 2023 01:49:24 -0700 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Sun, 3 Sep 2023 01:49:24 -0700 Message-ID: <CADwFkmnANGRpvdr-G_a0wNnTG+KD+wjoiHHzhipAZ3Ee=oz0cg@HIDDEN> Subject: control message for bug #51614 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) tags 51614 - moreinfo quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.