From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#55039: [PATCH] Use VC-relative file names in ChangeLog entries Date: Tue, 06 Sep 2022 14:34:58 +0000 Message-ID: <87o7vsfu5p.fsf@posteo.net> References: <8735i7zvk4.fsf@posteo.net> <83v8v3sq0n.fsf@gnu.org> <87czc8u56q.fsf@gnus.org> <871qsooenn.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29334"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 55039@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 06 16:45:45 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 1oVZpf-0007Pw-Tj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Sep 2022 16:45:44 +0200 Original-Received: from localhost ([::1]:41860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVZpe-0002Fm-Nf for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Sep 2022 10:45:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVZgI-00038w-NB for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2022 10:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVZgI-0004jV-BV for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2022 10:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVZgI-0002gt-3f for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2022 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Sep 2022 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55039 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo patch Original-Received: via spool by 55039-submit@debbugs.gnu.org id=B55039.166247491410278 (code B ref 55039); Tue, 06 Sep 2022 14:36:02 +0000 Original-Received: (at 55039) by debbugs.gnu.org; 6 Sep 2022 14:35:14 +0000 Original-Received: from localhost ([127.0.0.1]:52245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVZfW-0002fi-4X for submit@debbugs.gnu.org; Tue, 06 Sep 2022 10:35:14 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:50831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVZfU-0002fR-D1 for 55039@debbugs.gnu.org; Tue, 06 Sep 2022 10:35:13 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DF495240026 for <55039@debbugs.gnu.org>; Tue, 6 Sep 2022 16:35:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662474906; bh=3yHE5991vXytbIcr7D3a/mNlyixEuo5MJPaiHB2fSok=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Y/OGIV7xb6jJdNYrBfgInKa8TxvWQJMTQf2puKRfeg8QGjQp7Vp0JGIUVhH78qCYn j9VBsEiBIAaWc0oOgsL9kTsvIxvLpCD1JTg8EtX/KLJHiMgYYvg4ubzcbuqLCRupkx pAcLQh4UHvLCR3qOdgKz/kkVC7ZDpiY3vTa85CJKL9wmSHSXOgtk2xd95B1U5RAKoX /bFi+FcN5kdPscaHASY2PhIpKoQSgHm5wYe9nQw0d+5RyXKt5LTOMj0JaH9PU4CAhn m1U1+qmHi6LjiLyCINrJqnwBOgxF70NeIzXOtCrTiQH8KLvovYSUXLkCDI9TGAd40b fPl/6TkCi54Jg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MMSbF0wFGz9rxb; Tue, 6 Sep 2022 16:35:03 +0200 (CEST) In-Reply-To: <871qsooenn.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 06 Sep 2022 14:45:00 +0200") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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:241674 Archived-At: --=-=-= Content-Type: text/plain Philip Kaludercic writes: > Lars Ingebrigtsen writes: > >> Eli Zaretskii writes: >> >>> First, I think this must be customizable, because different projects >>> have different conventions. >> >> This was several months ago -- Philip, did you do any further work in >> this direction? > > No I hadn't, but I can take tackle it again as this shouldn't be that > difficult. Something like this should be enough, at least functionality wise, right? --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 322d4abd31..1f0eec0d66 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2336,6 +2336,12 @@ diff-undo (let ((inhibit-read-only t)) (undo arg))) +(defcustom diff-relative-names-in-changelog nil + "Use relative file names when generating ChangeLog messages." + :type 'boolean + :safe #'booleanp + :version "29.1") + (defun diff-add-log-current-defuns () "Return an alist of defun names for the current diff. The elements of the alist are of the form (FILE . (DEFUN...)), @@ -2374,9 +2380,11 @@ diff-add-log-current-defuns (re-search-forward diff-hunk-header-re nil t) (setq hunk-end (save-excursion (diff-end-of-hunk))) (pcase-let* ((filename (substring-no-properties - (file-relative-name - (diff-find-file-name) - (vc-root-dir)))) + (if diff-relative-names-in-changelog + (file-relative-name + (diff-find-file-name) + (vc-root-dir)) + (diff-find-file-name)))) (=lines 0) (+lines 0) (-lines 0) --=-=-= Content-Type: text/plain Assuming nobody objects to the name of the option, should this be documented in NEWS and/or in the Manual? Also, as the entire point of the patch was that emacs.git is using relative path names, should a .dir-locals.el variable be set to ensure this is done? --=-=-=--