unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55039: [PATCH] Use VC-relative file names in ChangeLog entries
@ 2022-04-20 14:19 Philip Kaludercic
  2022-04-20 16:01 ` Eli Zaretskii
  2022-04-22  3:03 ` Richard Stallman
  0 siblings, 2 replies; 46+ messages in thread
From: Philip Kaludercic @ 2022-04-20 14:19 UTC (permalink / raw)
  To: 55039

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

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'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-VC-relative-file-names-in-ChangeLog-entries.patch --]
[-- Type: text/patch, Size: 1285 bytes --]

From f3f87cab56d1bc1754d9e83a9dd53d0cb48c02b0 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
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


[-- Attachment #3: Type: text/plain, Size: 24 bytes --]


-- 
	Philip Kaludercic

^ permalink raw reply related	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2022-09-11 11:08 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-20 14:19 bug#55039: [PATCH] Use VC-relative file names in ChangeLog entries Philip Kaludercic
2022-04-20 16:01 ` Eli Zaretskii
2022-09-06 11:13   ` Lars Ingebrigtsen
2022-09-06 11:24     ` Eli Zaretskii
2022-09-06 11:30       ` Lars Ingebrigtsen
2022-09-06 12:45     ` Philip Kaludercic
2022-09-06 14:34       ` Philip Kaludercic
2022-09-06 14:39         ` Lars Ingebrigtsen
2022-09-06 14:58         ` Robert Pluim
2022-09-06 15:02           ` Philip Kaludercic
2022-09-06 15:46         ` Eli Zaretskii
2022-09-06 20:11           ` Philip Kaludercic
2022-09-08  7:07             ` Eli Zaretskii
2022-09-08  8:45               ` Philip Kaludercic
2022-09-08  9:20                 ` Eli Zaretskii
2022-09-08 12:11                 ` Lars Ingebrigtsen
2022-09-08 12:19                   ` Visuwesh
2022-09-08 12:33                     ` Lars Ingebrigtsen
2022-09-08 12:43                       ` Philip Kaludercic
2022-09-08 12:44                         ` Lars Ingebrigtsen
2022-09-08 12:53                           ` Philip Kaludercic
2022-09-08 12:56                             ` Lars Ingebrigtsen
2022-09-11  8:16                               ` Philip Kaludercic
2022-09-11 11:08                                 ` Lars Ingebrigtsen
2022-09-08 12:56                             ` Robert Pluim
2022-09-08 13:10                               ` Lars Ingebrigtsen
2022-09-08 13:13                       ` Visuwesh
2022-09-08 12:52                     ` Robert Pluim
2022-09-06 16:13         ` Juri Linkov
2022-09-06 20:10     ` Philip Kaludercic
2022-09-07 10:08       ` Robert Pluim
2022-09-07 12:48       ` Lars Ingebrigtsen
2022-09-07 13:27       ` Eli Zaretskii
2022-09-07 15:53         ` Philip Kaludercic
2022-09-07 18:12           ` Eli Zaretskii
2022-09-07 18:27             ` Philip Kaludercic
2022-09-07 18:46               ` Eli Zaretskii
2022-09-07 21:23                 ` Philip Kaludercic
2022-09-08  5:38                   ` Eli Zaretskii
2022-09-08  6:22                     ` Philip Kaludercic
2022-09-08  2:58         ` Richard Stallman
2022-09-08  6:18           ` Philip Kaludercic
2022-04-22  3:03 ` Richard Stallman
2022-04-22  5:29   ` Eli Zaretskii
2022-04-23  3:46     ` Richard Stallman
2022-04-23  6:17       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).