From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster) Date: Fri, 28 Jun 2019 00:16:57 +0300 Organization: LINKOV.NET Message-ID: <871rzer8t2.fsf@mail.linkov.net> References: <505E43E1.9090801@yandex.ru> <505E4A57.5020305@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="243983"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 12492@debbugs.gnu.org, Dmitry Gutov To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 28 00:00:13 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 1hgcRA-0011Lx-Oc for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 00:00:12 +0200 Original-Received: from localhost ([::1]:54944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgcR9-0004i7-QN for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 18:00:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37667) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgcR2-0004hx-5L for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 18:00:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgcR1-0006Gi-0e for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 18:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54643) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgcR0-0006FN-PL for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 18:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hgcR0-0006nf-Lx for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 18:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jun 2019 22:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12492 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12492-submit@debbugs.gnu.org id=B12492.156167275026043 (code B ref 12492); Thu, 27 Jun 2019 22:00:02 +0000 Original-Received: (at 12492) by debbugs.gnu.org; 27 Jun 2019 21:59:10 +0000 Original-Received: from localhost ([127.0.0.1]:39954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgcQ9-0006lz-Js for submit@debbugs.gnu.org; Thu, 27 Jun 2019 17:59:09 -0400 Original-Received: from aye.elm.relay.mailchannels.net ([23.83.212.6]:49575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgcQ7-0006lq-Fo for 12492@debbugs.gnu.org; Thu, 27 Jun 2019 17:59:08 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 02E38341980; Thu, 27 Jun 2019 21:59:06 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a2.g.dreamhost.com (100-96-14-97.trex.outbound.svc.cluster.local [100.96.14.97]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6E727341EF8; Thu, 27 Jun 2019 21:59:05 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a2.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Thu, 27 Jun 2019 21:59:05 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Stretch-Power: 5838cd9c543ae52c_1561672745767_1436489815 X-MC-Loop-Signature: 1561672745767:2143591507 X-MC-Ingress-Time: 1561672745767 Original-Received: from pdx1-sub0-mail-a2.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a2.g.dreamhost.com (Postfix) with ESMTP id E9A9483DB8; Thu, 27 Jun 2019 14:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=jJj4MBlmD0OPTK7+SmVL45PIkWo=; b= xiwfeXo052LOvwc4xEcZrN2iwWSsLFC0sLxCbi81/H7fXd8K0VCbcZyefHWHTD6M xBTP7PeF8+mfLE8nyacESyYyIfMQk3hmZlkV1MAyM49ncAz7xM04Zwew6hKlXNuu qIL+aMSnt86/baISyYTX85gOMASBldrCWxJJ3yDeeQk= Original-Received: from mail.jurta.org (m91-129-109-60.cust.tele2.ee [91.129.109.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a2.g.dreamhost.com (Postfix) with ESMTPSA id 685C683DB7; Thu, 27 Jun 2019 14:58:58 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a2 In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 27 Jun 2019 16:49:19 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudelgddtgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledriedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledriedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd 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:161665 Archived-At: >> +;;;###autoload >> +(defun vc-root-dir () >> + "Show the VC status of the current buffer's repository. >> +If the buffer is not visiting a version controlled file, or if >> +the backend does not support function `root', prompt for >> +directory. See `vc-dir' for more details." > > I think this sounds like a useful command -- whenever I'm not vc-dir-in > in the top level of the repo, I'm doing something wrong (and just > committing bits of the changes I meant to do). > > I made my own command to do this, but I think it would be generally > useful. I made my own too: (defun vc-dir-in-project-root () "Run `vc-dir' in project root directory." (interactive) (let* ((project (project-current)) (root (and project (car (project-roots project))))) (vc-dir (or (and root (file-directory-p root) root) default-directory)))) not sure if it should rely on `vc-root-dir' instead (I mean the already existing function `vc-root-dir' that returns the root dir). >> - (define-key map "d" 'vc-dir) >> + (define-key map "d" 'vc-root-dir) > > But this would probably be very controversial. `C-x v /' is a nice > binding, though... I'd prefer an option whose customization would allow `C-x v d' to always use the root.