Subject: bug#55039: closed (Re: bug#55039: [PATCH] Use VC-relative file names in ChangeLog entries)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 08 Sep 2022 06:23:02 +0000

Your bug report

#55039: [PATCH] Use VC-relative file names in ChangeLog entries

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
55039: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55039
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#55039: [PATCH] Use VC-relative file names in ChangeLog entries
From: Philip Kaludercic <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Thu, 08 Sep 2022 06:22:13 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> From: Philip Kaludercic <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Wed, 07 Sep 2022 21:23:38 +0000
>> 
>> >> It wasn't because of your comments, rather I just felt mentioning it was
>> >> too clumsy, and a few others said they didn't feel it was necessary to
>> >> mention the option in the manual.  But if you think that it should be
>> >> added, then I'll try it again and take your comments into account.
>> >
>> > Yes, I think it should be in the manual.  But if you'd rather leave
>> > that to me, I'm fine with that.
>> 
>> Here is my latest attempt (will merge it into the patch):
>
> LGTM, thanks.

Great, I've pushed the commit.

Subject: [PATCH] Use VC-relative file names in ChangeLog entries
From: Philip Kaludercic <[email-masked]>
To: [email-masked]
Date: Wed, 20 Apr 2022 14:19:39 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

By default C-c C-w (log-edit-generate-changelog-from-diff) just uses the
file name when generating a changelog message.  As it has been requested
to use the project relative path name when writing changelog messages,
it seems to make sense to generate these automatically as well.

Alternatively, this could also be configured using a directory local
variable that would be set for emacs.git.

In GNU Emacs 29.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
 of 2022-04-19 built on viero
Repository revision: d168decab4a03cd48b8b96257c36ffa575c720e6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Guix System

Configured using:
 'configure
 PKG_CONFIG_PATH=/home/philip/.guix-profile/lib/pkgconfig:/home/philip/.guix-profile/share/pkgconfig'

>From f3f87cab56d1bc1754d9e83a9dd53d0cb48c02b0 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <[email-masked]>
Date: Tue, 30 Nov 2021 21:05:42 +0100
Subject: [PATCH] Use VC-relative file names in ChangeLog entries

* lisp/vc/diff-mode.el (diff-add-log-current-defuns): Check
vc-root-dir to prepend the project path to the file being modified.

See https://mail.gnu.org/archive/html/emacs-devel/2021-11/msg02195.html
---
 lisp/vc/diff-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 057ffcd06e..40749754d8 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2343,7 +2343,10 @@ diff-add-log-current-defuns
           ;; hunks (e.g., "diff --git ..." etc).
           (re-search-forward diff-hunk-header-re nil t)
         (setq hunk-end (save-excursion (diff-end-of-hunk)))
-        (pcase-let* ((filename (substring-no-properties (diff-find-file-name)))
+        (pcase-let* ((filename (substring-no-properties
+                                (file-relative-name
+                                   (diff-find-file-name)
+                                   (vc-root-dir))))
                      (=lines 0)
                      (+lines 0)
                      (-lines 0)
-- 
2.34.0

-- 
	Philip Kaludercic