From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51614: 29.0.50; [PATCH] vc-switches ignore file or directory variables Date: Sat, 10 Sep 2022 06:43:36 +0200 Message-ID: <87mtb7rg93.fsf@gnus.org> References: <875yt68skq.fsf@posteo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28508"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51614@debbugs.gnu.org, Dmitry Gutov To: Aleksandr Vityazev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 06:44:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWsLq-0007Fa-FZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 06:44:18 +0200 Original-Received: from localhost ([::1]:57716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWsLp-0001Rp-BM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 00:44:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWsLd-0001N4-6n for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:44:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWsLb-0007VD-TA for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWsLZ-0001bm-Oh for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Sep 2022 04:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51614-submit@debbugs.gnu.org id=B51614.16627850316133 (code B ref 51614); Sat, 10 Sep 2022 04:44:01 +0000 Original-Received: (at 51614) by debbugs.gnu.org; 10 Sep 2022 04:43:51 +0000 Original-Received: from localhost ([127.0.0.1]:36104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsLP-0001ap-8l for submit@debbugs.gnu.org; Sat, 10 Sep 2022 00:43:51 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsLJ-0001aX-Nc for 51614@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=; Original-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 ) id 1oWsLB-0006Kv-5T; Sat, 10 Sep 2022 06:43:39 +0200 In-Reply-To: <875yt68skq.fsf@posteo.org> (Aleksandr Vityazev's message of "Fri, 05 Nov 2021 16:39:49 +0000") X-Now-Playing: Peter Gabriel's _Peter Gabriel 3_: "I Don't Remember" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242054 Archived-At: Aleksandr Vityazev 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.