From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#38044: 27.0.50; There should be an easier way to look at a specific vc commit Date: Sun, 01 Dec 2019 14:13:06 +0100 Message-ID: <8736e4b34t.fsf@gmx.net> References: <87ftj5at1q.fsf@gnus.org> <87bltslnpo.fsf@mail.linkov.net> <87d0dvmqu8.fsf@mail.linkov.net> <590e595e-8220-1c7e-bd4a-b2eb0968e289@yandex.ru> <87r226xl8m.fsf@mail.linkov.net> <24c56bca-8d7d-3a20-aeef-5d11f8a075e6@yandex.ru> <87pnhquo4k.fsf@mail.linkov.net> <6087186e-a444-0aac-e87d-596d2e36f0ce@yandex.ru> <877e3wub09.fsf@mail.linkov.net> <5ce7d4f0-3884-fd27-09dc-c38f01a19958@yandex.ru> <83zhgr26c3.fsf@gnu.org> <87blt7qxhz.fsf@mail.linkov.net> <837e3v1aae.fsf@gnu.org> <87y2warzv3.fsf@mail.linkov.net> <83r221xoll.fsf@gnu.org> <83a78pxenu.fsf@gnu.org> <215302ff-8252-1f6c-5f60-aaba01cd615f@yandex.ru> <837e3tx9s8.fsf@gnu.org> <87pnhl9biu.fsf@gmx.net> <8336egxtja.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="108349"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: larsi@gnus.org, juri@linkov.net, 38044@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 01 14:14:50 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ibP3p-000S2s-M7 for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Dec 2019 14:14:49 +0100 Original-Received: from localhost ([::1]:51388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibP3o-0000fd-Bd for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Dec 2019 08:14:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48069) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibP37-0000eJ-U7 for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 08:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibP34-0001Y4-Tb for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 08:14:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57825) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibP34-0001Xn-JS for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 08:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ibP34-0001W4-E6 for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 08:14:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87ftj5at1q.fsf@gnus.org> Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Dec 2019 13:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38044 X-GNU-PR-Package: emacs Original-Received: via spool by 38044-submit@debbugs.gnu.org id=B38044.15752060015775 (code B ref 38044); Sun, 01 Dec 2019 13:14:02 +0000 Original-Received: (at 38044) by debbugs.gnu.org; 1 Dec 2019 13:13:21 +0000 Original-Received: from localhost ([127.0.0.1]:35565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibP2O-0001V5-Vc for submit@debbugs.gnu.org; Sun, 01 Dec 2019 08:13:21 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:35159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibP2M-0001Up-G1 for 38044@debbugs.gnu.org; Sun, 01 Dec 2019 08:13:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1575205988; bh=cBndZA7ETOUSgjSyOStubacLdXqDKu7TR5nrHb2iYd0=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=BrQmX7XALR3PPqszJywbNgvLW6AU3vrep5K4id0+fi7PyDThk9dq53+fpYBo3qMzO L0XGiaks7qAa0jdQ3wmqzOCFKEI30xlGWdbgc47lIPijGaNm4uOmftuTo53vzSkySV M7wjX5oWvfW+pF0kJ1jS0ETEzYE5vqVfUPQBZe0Y= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-lfs84 ([178.1.123.217]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MBDnI-1iVJ9e1chq-00Cl7r; Sun, 01 Dec 2019 14:13:08 +0100 X-Provags-ID: V03:K1:BPqaRwhSJgp1GhYFbeH1mw6mP+fhUH4bHWSrOCWCQ3pwT2VfNhI mI3MUnAd0Zl9HPLFRBTjuiSfF8lSquMnm9SvYmiBzIbXe7tU0WjK60m7/g5hqHNewymeWmt huhM2mXe9I8gz3QRRyWfewqlsH+n6igCJVwQ2v8/ywQesEK1gdysi90OadaklOqU/fOe3XQ eOuFwJ4ru6OW1rzX5OorA== X-UI-Out-Filterresults: notjunk:1;V03:K0:cxslPeNnEs8=:JWrYLNZNsSEYACwrTQHsC8 QOc+RZAFOYSNxepZ8AYJz8u42lWvqPohxCBHvABg6MWCDEztFFQzc1BC8z52DmQEesBFlI/K7 DEs2oAEW4C8j3pOjcO0COHIdvb3O7/rsR5ttxvV09R9w3Y5JGAhX88m1qgzXMWpwXa7QZ5SUi F+HU7Rcax17nfBuLKPJuzTXeAWiqCeL2WeYM/ogF4QOR7GvExQ7D7ckaYbwpOlbYdIBWqRUkt amsbo94N2R2FaEjDl12KGiuFbNe1d+qEuEl4OkcCP5T5xZNfNl7Trs8s72TFiDIqDbrfUA+E7 ljJSGcERbqgjo4s1Rm5OyaO7/28jhdF+T7QSiF/cXtHz+VkCznTTnedoaeUgjvJlF/OhtFOq8 xSXFW+oHzO617S+Lrj9k6iXW2pdwsIYnqAjXHxlwHJngKd0AHdqH89LfBQH9HRVLMeMaLpyWg vsvEHhwKvxYJ6qo87S+xnMTw5Tpzl+JzopEU2yyizTUl9ZCfemJHXRqMqvNXlVswcqaqe9v9I HxiPogfWzRVvOAm7ytj5geVinkyXVXCISfspJVi1UAAn1E1jTokrcwBoUfDIrk/s7d4xFPxow PpUHTtnOhxcMYMd2UaWKt13NVkquvA+CJo4/xgz3tMRbk+roJfr1mLVkXqtECxeRtqJPU3Yvt 3HT6oa3YW9o24QhBonoaugKfEjyJ45xcwt7RFgy7uE5cRE5HoLrPK/QruQD9vvclBZbXjJBis BhRry7S6uo9J/DVH0EAGOO8n+QRD5vkHLstIeb6BgPHsN9hVpXg+2jtGX5DRh2aIVsDRnvDV X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172710 Archived-At: --=-=-= Content-Type: text/plain On Fri, 22 Nov 2019 09:24:41 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: Dmitry Gutov , juri@linkov.net, larsi@gnus.org, >> 38044@debbugs.gnu.org >> Date: Thu, 21 Nov 2019 22:15:21 +0100 [...] >> Since one of the desiderata of this command, perhaps even the main >> one, is that it should act on the revision ID at point, how about >> making just `C-x v L' do that if it recognizes the word at point as >> a revision ID? > > We could do that, yes. I haven't found a useful way to do this. >> If this is deemed to unreliable, it could be conditioned by a user >> option, or perhaps (though more annoying) by asking for >> confirmation. > > Fine with me, assuming the rest of the proposal is accepted. On reflection, both of these alternatives don't seem convenient enough to justify them. There is, however, another option that is convenient (at least to me) and easy to implement. Most of the time of I want to look up the log entry and/or diff of the revision ID at point the current buffer is not a version-controlled buffer (typically it's a Gnus buffer), so the default directory is wrong and I have to manually change to the version-controlled root directory. For me this is almost always the Emacs master branch, so it would be convenient if typing `C-1 C-x v L' offered this directory as a default, as a user option. The patch below does this. The way vc-print-root-log sets the root directory is also done exactly the same by vc-root-version-diff, vc-diff-mergebase, vc-root-diff and vc-log-mergebase, so perhaps these commands should also be changed to offer a user-specified default. I haven't used any of these yet, so I don't know if this is as convenient for them as it is for vc-print-root-log. Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: VC patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index d0d2c39ac3..06a3e90837 100644 =2D-- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -848,6 +848,14 @@ vc-revert-show-diff :type 'boolean :version "24.1") +(defcustom vc-default-root-dir nil + "User-specified root directory for VC operations. +Offered as default when the VC backend fails to identify a root +directory." + :type '(choice (const :tag "None" nil) + (file :must-match t :tag "File")) + :version "27.1") + ;; Header-insertion hair (defcustom vc-static-header-alist @@ -2517,7 +2525,8 @@ vc-print-root-log rootdir) (if backend (setq rootdir (vc-call-backend backend 'root default-directory)) - (setq rootdir (read-directory-name "Directory for VC root-log: ")) + (setq rootdir (read-directory-name "Directory for VC root-log: " + vc-default-root-dir)) (setq backend (vc-responsible-backend rootdir)) (unless backend (error "Directory is not version controlled"))) --=-=-=--