From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#41974: 28.0.50; Some vc commands refuse to work when called on non-file buffer Date: Mon, 22 Jun 2020 01:51:20 +0300 Organization: LINKOV.NET Message-ID: <87wo40ghht.fsf@mail.linkov.net> References: <87a70x8f7g.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="75187"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 41974@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 22 01:20:15 2020 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 1jn9G3-000JU0-GR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 01:20:15 +0200 Original-Received: from localhost ([::1]:36178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jn9G2-0007iv-Fe for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jun 2020 19:20:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jn9Fr-0007fh-QU for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 19:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jn9Fr-0006gi-Eo for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 19:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jn9Fr-0006S4-BG for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 19:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jun 2020 23:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41974 X-GNU-PR-Package: emacs Original-Received: via spool by 41974-submit@debbugs.gnu.org id=B41974.159278156324720 (code B ref 41974); Sun, 21 Jun 2020 23:20:03 +0000 Original-Received: (at 41974) by debbugs.gnu.org; 21 Jun 2020 23:19:23 +0000 Original-Received: from localhost ([127.0.0.1]:32820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn9FD-0006Qe-8q for submit@debbugs.gnu.org; Sun, 21 Jun 2020 19:19:23 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn9FB-0006QB-0d for 41974@debbugs.gnu.org; Sun, 21 Jun 2020 19:19:21 -0400 X-Originating-IP: 91.129.108.6 Original-Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id E86861BF203; Sun, 21 Jun 2020 23:19:13 +0000 (UTC) In-Reply-To: (Dmitry Gutov's message of "Sun, 21 Jun 2020 03:07:40 +0300") 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:182262 Archived-At: > On 21.06.2020 02:55, Juri Linkov wrote: >> I think this restriction should be lifted, so vc commands should >> work even when called on non-file buffers whose default-directory >> is inside the vc project. > > Agreed. > > Does this patch help, or does it miss more cases? > > diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el > index 9b12d44978..36013fcdc9 100644 > --- a/lisp/vc/vc.el > +++ b/lisp/vc/vc.el > @@ -2563,7 +2563,7 @@ vc-print-branch-log > (vc-read-revision "Branch to log: "))) > (when (equal branch "") > (error "No branch specified")) > - (let* ((backend (vc-responsible-backend default-directory)) > + (let* ((backend (vc-deduce-backend)) > (rootdir (vc-call-backend backend 'root default-directory))) > (vc-print-log-internal backend > (list rootdir) branch t Strange, this patch has no effect, the same error remains.