From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work. Date: Sun, 30 Oct 2016 18:21:19 +0200 Message-ID: <83twbtq03k.fsf@gnu.org> References: <1462311145-5959-1-git-send-email-hong@topbug.net> <85f11f8a-1799-befd-3e5b-f7d7a6eac660@topbug.net> <072a649f-d11a-7c82-b3ae-32d9a92c8f8b@topbug.net> <5d653522-49bd-8b48-e3d6-0c09d1c65fae@yandex.ru> <377f4ee1-54a9-b10c-dc18-3acea6492bec@yandex.ru> <1ad97145-d21e-5d64-8b6c-4b4b2bc2ab49@yandex.ru> <87zilss0z6.fsf@topbug.net> <87funefz1i.fsf@topbug.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477844569 14955 195.159.176.226 (30 Oct 2016 16:22:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Oct 2016 16:22:49 +0000 (UTC) Cc: dgutov@yandex.ru, 23436@debbugs.gnu.org To: Hong Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 30 17:22:44 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0ss6-0007Yv-Hq for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Oct 2016 17:22:10 +0100 Original-Received: from localhost ([::1]:59132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0ss9-0003Ak-78 for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Oct 2016 12:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0ss2-0003AJ-Tc for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2016 12:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0sry-00081n-7Y for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2016 12:22:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50152) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c0sry-00081j-44 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2016 12:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c0srx-00024J-Ty for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2016 12:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2016 16:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23436 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23436-submit@debbugs.gnu.org id=B23436.14778444817890 (code B ref 23436); Sun, 30 Oct 2016 16:22:01 +0000 Original-Received: (at 23436) by debbugs.gnu.org; 30 Oct 2016 16:21:21 +0000 Original-Received: from localhost ([127.0.0.1]:37318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0srI-00023B-PS for submit@debbugs.gnu.org; Sun, 30 Oct 2016 12:21:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0srH-00022x-IE for 23436@debbugs.gnu.org; Sun, 30 Oct 2016 12:21:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0sr7-0007al-NA for 23436@debbugs.gnu.org; Sun, 30 Oct 2016 12:21:14 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0sr7-0007ag-JX; Sun, 30 Oct 2016 12:21:09 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2469 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c0sr6-0004NG-KU; Sun, 30 Oct 2016 12:21:09 -0400 In-reply-to: <87funefz1i.fsf@topbug.net> (message from Hong Xu on Sat, 29 Oct 2016 17:42:01 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:125152 Archived-At: > From: Hong Xu > Date: Sat, 29 Oct 2016 17:42:01 -0700 > Cc: 23436@debbugs.gnu.org > > The attachment is a draft of my proposed doc change. Feel free to adjust > the contents and the language. Thanks, see a few comments below. > diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi > index aca29910b7d3..8f31fa168c23 100644 > --- a/doc/emacs/maintaining.texi > +++ b/doc/emacs/maintaining.texi This should go to the ELisp manual, not the Emacs User manual. > +@defun vc-responsible-backend file > +This function can be used to determine the responsible VC backend of > +the given file path @var{file}. GNU coding standards frown on using "path" for anything that isn't a PATH-style list of directories. We use "file name" instead, but in this case you don't need even that: just say "the given @var{file}". > For example, if @code{emacs.c} is a emacs.c is a file, so it should have the @file markup, not @code. > +file tracked by git, @code{(vc-responsible-backend "emacs.c")} returns > +@code{"Git"}. ^^^^^^^^^^^^ You want @samp{Git} here, without the quotes. The quotes might mislead someone into thinking the result is a string. Last, but not least: documentation changes need ChangeLog-style commit log messages as well (just use "C-x 4 a" to get a preformatted skeleton from which you could start).