GNU bug report logs - #72341
VC: CVS template lines not stripped when committing

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Christoph Badura <bad@HIDDEN>; Keywords: patch; dated Sun, 28 Jul 2024 16:36:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) patch. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 17 Feb 2025 23:54:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 17 18:54:32 2025
Received: from localhost ([127.0.0.1]:51212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkAwZ-0007t1-Ko
	for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 18:54:32 -0500
Received: from mob.rho.tal.de ([195.8.224.241]:56415)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bad@HIDDEN>) id 1tkAwW-0007sd-Dl
 for 72341 <at> debbugs.gnu.org; Mon, 17 Feb 2025 18:54:30 -0500
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 6D0F9800136A
 for <72341 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 00:54:26 +0100 (CET)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 0DA7A918CE; Tue, 18 Feb 2025 00:54:26 +0100 (CET)
Date: Tue, 18 Feb 2025 00:54:26 +0100
From: Christoph Badura <bad@HIDDEN>
To: 72341 <at> debbugs.gnu.org
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20250217235425.GJ27542@HIDDEN>
References: <20250127191330.GF27542@HIDDEN>
 <86wmegnikq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="S1BNGpv0yoYahz37"
Content-Disposition: inline
In-Reply-To: <86wmegnikq.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72341
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--S1BNGpv0yoYahz37
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Here is the updated patch.  I incorporated all the feedback and requested
changes.  I've also found some other nits on my own.

I also looked more carefully at the CVS code and discovered that it only
looks for lines beginning with "CVS:", i.e., it doesn't care about a
following blank.  It does this in order to deal with editor that strip
trailing whitespace.

Changes since the last patch:
- don't activate log-edit-done-strip-cvs-lines by default just yet
- supply missing arg 'interactive to called-interactively-p
- use (case-fold-search nil) instead of (search-upper-case nil)
- mention log-edit-done-strip-cvs-lines in etc/NEWS
- explain why log-edit-done-strip-cvs-lines only looks for "^CVS:"
- doc strings for the log-edit-done-strip-cvs-lines tests
- factor out common code in log-edit-done-strip-cvs-lines tests
- 2 more tests for exactly the same behaviour as CVS

I've just noticed that, e.g. the lines following 
the "hook :options" in the log-edit-done-hook
defcustom, use TAB for indentation while indent-tabs-mode is turned off in
the top-level .dir-locals.el.  Do you care for consistency with the old
code?  This affects only a very small number of lines.

Sorry for this all taking so long.  And thanks for the feedback and the
patience.

--chris

--S1BNGpv0yoYahz37
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0001-VC-add-hook-to-strip-CVS-template-lines-when-committ.patch"

From c7c0d1c47ce283a356e381dcc20e22c3e3d4d657 Mon Sep 17 00:00:00 2001
From: Christoph Badura <bad@HIDDEN>
Date: Sun, 26 Jan 2025 22:48:11 +0100
Subject: [PATCH] VC: add hook to strip CVS template lines when committing

Add a hook function to strip all lines beginning with "CVS:" from the
commit message as CVS does.  Do this only if 'log-edit-vc-backend' is
'CVS'.  (Bug#72341)
* lisp/vc/log-edit.el (log-edit-done-strip-cvs-lines)
Add a hook function to strip the lines starting with "CVS:".
* test/lisp/vc/log-edit-tests.el (log-edit-done-strip-cvs-lines-helper,
log-edit-done-strip-cvs-lines-cvs, log-edit-done-strip-cvs-lines-non-cvs,
log-edit-done-strip-cvs-lines-only-cvs-colon-blank,
log-edit-done-strip-cvs-lines-only-cvs-colon):
Add test cases for 'log-edit-done-strip-cvs-lines'.
* etc/NEWS:
Mention log-edit-done-strip-cvs-lines.
---
 etc/NEWS                       |  8 +++++
 lisp/vc/log-edit.el            | 18 ++++++++++-
 test/lisp/vc/log-edit-tests.el | 58 ++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 22cf8c636c2..c6b4aa6e7e2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -343,6 +343,14 @@ modal editing packages.
 
 * Changes in Specialized Modes and Packages in Emacs 31.1
 
+---
+** VC mode
+*** New function 'log-edit-done-strip-cvs-lines'.
+This function strips all lines beginning with "CVS:" from the buffer.
+It is intended to be added to the 'log-edit-done-hook' so that
+'vc-cvs-checkin' behaves like invoking "cvs commit [files...]" from the
+command line.
+
 ---
 ** ASM mode
 *** 'asm-mode-set-comment-hook' is obsolete.
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index e23e7414a18..1b0fa0d7193 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -210,7 +210,8 @@ log-edit-done-hook
 can be obtained from `log-edit-files'."
   :group 'log-edit
   :type '(hook :options (log-edit-set-common-indentation
-			 log-edit-add-to-changelog)))
+			 log-edit-add-to-changelog
+                         log-edit-done-strip-cvs-lines)))
 
 (defcustom log-edit-strip-single-file-name nil
   "If non-nil, remove file name from single-file log entries."
@@ -926,6 +927,21 @@ log-edit-insert-cvs-template
       (goto-char (point-max))
       (insert-file-contents "CVS/Template"))))
 
+(defun log-edit-done-strip-cvs-lines ()
+  "Strip lines starting with \"CVS:\" from commit log message.
+When not called interactively do this only when the VC backend is CVS.
+This mimicks what CVS does when invoked as 'cvs commit [files...]'"
+  (interactive)
+  (when (or (called-interactively-p 'interactive)
+            (eq log-edit-vc-backend 'CVS))
+    (let ((case-fold-search nil))
+      (goto-char (point-min))
+      ;; NB: While CVS defines CVSEDITPREFIX as "CVS: " it actually
+      ;; checks only the first four characters of af a line, i.e. "CVS:"
+      ;; do deal with editors that strip trailing whitespace.
+      ;; c.f. src/cvs.h and src/logmsg.c:do_editor()
+      (flush-lines "^CVS:"))))
+
 (defun log-edit-insert-cvs-rcstemplate ()
   "Insert the RCS commit log template from the CVS repository.
 This contacts the repository to get the rcstemplate file and
diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el
index 005c336a3b6..515abe5d598 100644
--- a/test/lisp/vc/log-edit-tests.el
+++ b/test/lisp/vc/log-edit-tests.el
@@ -360,4 +360,62 @@ log-edit-fill-entry-no-defun-list-wrapping
       (let ((fill-column 64)) (log-edit-fill-entry))
       (should (equal (buffer-string) wanted)))))
 
+(defun log-edit-done-strip-cvs-lines-helper (initial-text wanted vc-backend)
+  "Test that running log-edit-done-strip-cvs-lines as a
+log-edit-done-hook produces the WANTED
+string when run on INITIAL-TEXT."
+  (with-temp-buffer
+      (let ((log-edit-done-hook 'log-edit-done-strip-cvs-lines)
+            (log-edit-vc-backend vc-backend))
+        (setq-local log-edit-callback #'(lambda () (interactive) nil))
+        (insert initial-text)
+        (log-edit-done)
+        (should (equal (buffer-string) wanted)))))
+
+(ert-deftest log-edit-done-strip-cvs-lines-cvs ()
+  "Strip lines beginning with \"CVS:\" when using CVS as VC backend."
+  ;; This test verifies that lines beginning with "CVS:" are stripped
+  ;; from the commit message when log-edit-vc-backend is CVS.
+  (let (string wanted)
+    (setq string "summary line
+first line
+CVS: Please evaluate your changes and consider the following.
+CVS: Abort checkin if you answer no.
+"
+          wanted "summary line
+first line
+")
+    (log-edit-done-strip-cvs-lines-helper string wanted 'CVS)))
+
+(ert-deftest log-edit-done-strip-cvs-lines-non-cvs ()
+  "Do not strip lines beginning with \"CVS:\" when not using CVS as VC backend."
+  ;; This test verifies that lines beginning with "CVS:" are not stripped
+  ;; from the commit message when log-edit-cvs-backend isn't CVS.
+  (let (string)
+    (setq string "summary line
+first line
+CVS: Please evaluate your changes and consider the following.
+CVS: Abort checkin if you answer no.
+")
+  (log-edit-done-strip-cvs-lines-helper string string nil)))
+
+(ert-deftest log-edit-done-strip-cvs-lines-only-cvs-colon-blank ()
+  "Strip lines that contain solely \"CVS: \" when using CVS as VC backend."
+  ;; This test verifies that lines consisting solely of "CVS: " are stripped
+  ;; from the commit message.
+  (let (string wanted)
+    (setq string "CVS: \n"
+          wanted "")
+    (log-edit-done-strip-cvs-lines-helper string wanted 'CVS)))
+
+(ert-deftest log-edit-done-strip-cvs-lines-only-cvs-colon ()
+  "Strip lines that contain solely \"CVS:\" when using CVS as VC backend."
+  ;; This test verifies that lines consisting only of "CVS:" (no blank
+  ;; after the colon) are stripped from the commit message.
+  ;; CVS does this to accomodate editors that delete trailing whitespace.
+  (let (string wanted)
+    (setq string "CVS:\n"
+          wanted "")
+    (log-edit-done-strip-cvs-lines-helper string wanted 'CVS)))
+
 ;;; log-edit-tests.el ends here
-- 
2.47.1


--S1BNGpv0yoYahz37--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 15 Feb 2025 12:48:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 15 07:48:06 2025
Received: from localhost ([127.0.0.1]:53866 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tjHaY-0004Am-1Y
	for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 07:48:06 -0500
Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:54618)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>)
 id 1tjHaU-0004AD-HC
 for 72341 <at> debbugs.gnu.org; Sat, 15 Feb 2025 07:48:03 -0500
Received: by mail-ua1-x929.google.com with SMTP id
 a1e0cc1a2514c-8641c7574a5so1115184241.1
 for <72341 <at> debbugs.gnu.org>; Sat, 15 Feb 2025 04:48:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739623677; x=1740228477; darn=debbugs.gnu.org;
 h=in-reply-to:content-language:references:cc:to:from:subject
 :user-agent:mime-version:date:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=O0jy8dWNHh0Jy0EDv81nzlH4lLBkE3RhbhqUZRz5ujk=;
 b=KiVBsD0ilNGwZVcd1vW3a+VimK+UAHinQB+Vqe6FQV12mL9pAgX36UlGkkFvyxBRrT
 m71MOSbueFV3ZjLn2b7CfDUmliSnBr92EUVUzKSWd4pxQk9xkvVPUDnJK6jGc/3a20/D
 ZJEC1ZmffocPi+KACofVBIAXHHzRAJY2dNaqEgkQ94D52A6l7inLO7SXMvrqLwn+ufj5
 RNAx6kDlD+zDRPJugoZsGV0CQwYJNl5LAw4AZfGZaWl5gVTisM/Vz4UFNMgiOcSNo40/
 6w4w3tlxsTxUi3v0zTeZs8dxySfmzPRC6ayfShYGxgZz+I+nARuoZ2wywSYFcK4JFino
 lEjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739623677; x=1740228477;
 h=in-reply-to:content-language:references:cc:to:from:subject
 :user-agent:mime-version:date:message-id:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=O0jy8dWNHh0Jy0EDv81nzlH4lLBkE3RhbhqUZRz5ujk=;
 b=F41Uq+zq66fkNZmUbYxLX6cnpuY6qPnCCByQHwmxjdWsrku+h4WyF4cKlkuWYMsFjc
 GKqbMH9DF2zOz671KXGOTck+EFxOrvbPZ4Gu8om1qQKXd52aOA1XmiFPOV+7RL8xo41a
 Cj3pbElO1MX01k7I9K7SyJr59A3vC+doP+CGau0wm5cTKqgnARbjI1I8Iq+Qu2LsBlWr
 pdWlVBtgvHPgDflUhn9ES0AsFu1GFE1AMK377Qt4B6Rhtpm+IHz7yZ3gPZFm5jiYVW2X
 EIxHMHIHTfXKevzG2foe1HuhO/6JXkiVSr5Qj8G4kvjpsygRW/sFIYXlTSbrwMbMSOKJ
 PDvw==
X-Gm-Message-State: AOJu0Yyq3vRngC6Mi8j12Uj9hbPVeoyu064xkxD76OHFd6NgMHVEwg55
 g03I2ga69lt5dqXVu3lQ/bGQmRy/7Iy+rM+f7wVAWfsPUuj/z1zl
X-Gm-Gg: ASbGncvS//68v82QRrJtYNRe4YQRTYbO5ojSHsYfKAiDFYB33rZEhBmfM8pmjBpSghT
 Qe0emuJwse6IG/PlDnWX86UkeJ4A217AHkUoxIJeSOe0MyErWbZQdbr1iizhpNyNt8tfYssPg6O
 Xg1rZKu7WZMinjJqhdDt0RGQvGT/ivHOGSVTrSZFjFwy9t4J+73XD0s3fE/NgvCijcH3so+syWG
 5puRn+F8cA/LslQSgvqZWMZSD7n3DHT+jPVpFPUn55CmdWOSyVMpKS1goRGBuroj3m4WNzFU0Y7
 cYkrNcnega5jA/pwuOsSPQ==
X-Google-Smtp-Source: AGHT+IGtNt0AS9pBITz71VEH904SVR8s8SefAyesEEhhcQT8ToAZbdngbTwSMoXDZUO6z5gfVCOhbw==
X-Received: by 2002:a05:6102:d8e:b0:4bb:d394:46cd with SMTP id
 ada2fe7eead31-4bd3fde6276mr1444735137.18.1739623676369; 
 Sat, 15 Feb 2025 04:47:56 -0800 (PST)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 a1e0cc1a2514c-868e86cbf6dsm1063019241.32.2025.02.15.04.47.52
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 15 Feb 2025 04:47:54 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------RBJG9Bpw8D02MtWQdqsXzyhE"
Message-ID: <2b0a99ca-7735-4fcc-a2b9-1d756f10a061@HIDDEN>
Date: Sat, 15 Feb 2025 09:47:51 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
From: Mauro Aranda <maurooaranda@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Christoph Badura <bad@HIDDEN>
References: <20250127191330.GF27542@HIDDEN>
 <86wmegnikq.fsf@HIDDEN>
 <20250127215857.GI27542@HIDDEN>
 <86lduvnn3o.fsf@HIDDEN>
 <20250128224756.GK27542@HIDDEN>
 <8634gffr2t.fsf@HIDDEN> <a3900e0b-89ae-4116-bb50-d06b6f7b0c57@HIDDEN>
Content-Language: en-US
In-Reply-To: <a3900e0b-89ae-4116-bb50-d06b6f7b0c57@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------RBJG9Bpw8D02MtWQdqsXzyhE
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Mauro Aranda <maurooaranda@HIDDEN> writes:

 > Eli Zaretskii <eliz@HIDDEN> writes:
 >
 >>> Date: Tue, 28 Jan 2025 23:47:56 +0100
 >>> From: Christoph Badura <bad@HIDDEN>
 >>>
 >>> On Tue, Jan 28, 2025 at 02:23:39PM +0200, Eli Zaretskii wrote:
 >>> > The Customize UI will be more helpful if we explicitly mention the
 >>> > recommended values together with descriptive tags.
 >>>
 >>> So, I've just tested this:
 >>>   emacs -nw --eval "(customize-group 'log-edit)"
 >>>
 >>> Search for "done hook".
 >>> Be sure to toggle the "More" button and than the "Show value" button on
 >>> the line for "Log Edit Done Hook".
 >>> With this patch applied there's even a "More" button at the end of the
 >>> one-line description of the log-edit-done-strip-cvs-lines option.
 >>>
 >>> Do you really think that UX needs improving?
 >>>
 >>> The only thing that annoys me is that when I search for "More", the
 >    point
 >>> ends up just behind the button and RET doesn't toggle it.  Whereas
 >    it does
 >>> when it is right before a button.  Fixing that would be a huge
 >    improvement
 >>> for me.  But this is a separate issue.
 >>>
 >>> > But I realize that this is a separate issue, so maybe it should 
be the
 >>> > subject of a separate patch.  So maybe just mentioning the 3
 >>> > recommended values in the doc string will be enough for fixing this
 >>> > issue.
 >>>
 >>> I've made a note in any case.
 >>>
 >>> I've way overrun my "emacs hacking" time budget for this week.  
I'll get
 >>> back to this bug at the end of next week after returning from travel.
 >>
 >> Mauro, WDYT about this?
 >
 > I guess you're asking me about actioning the "More" button when point is
 > past it, to show the rest of the documentation.
 >
 > There's already code that handles custom group links that way, in
 > Custom-newline (RET is bound to that command).  For example:
 > emacs -Q
 > M-x customize-group RET vc
 > C-s Log-Edit RET
 > RET
 >
 > Emacs follows the link even though point is past the link.
 >
 > It should be easy to extend it to other links/buttons.

Like in the attached patch, lightly tested.  I can post it in a
different bug report if desired.
--------------RBJG9Bpw8D02MtWQdqsXzyhE
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Action-button-when-point-is-just-after-it.patch"
Content-Disposition: attachment;
 filename="0001-Action-button-when-point-is-just-after-it.patch"
Content-Transfer-Encoding: base64

RnJvbSBlODM1NjJmODA1MDExODMxOWY3MDFmYTQ1OTcwYTcyMWFmYzQ0YjM2IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNYXVybyBBcmFuZGEgPG1hdXJvb2FyYW5kYUBnbWFp
bC5jb20+CkRhdGU6IFNhdCwgMTUgRmViIDIwMjUgMDk6NDM6NTggLTAzMDAKU3ViamVjdDog
W1BBVENIXSBBY3Rpb24gYnV0dG9uIHdoZW4gcG9pbnQgaXMganVzdCBhZnRlciBpdAoKKiBs
aXNwL2N1cy1lZGl0LmVsIChDdXN0b20tbmV3bGluZSk6IElmIG5vIGJ1dHRvbiBhdCBwb2lu
dCwKY2hlY2sgZm9yIGEgYnV0dG9uIGJlZm9yZSBwb2ludC4gIChCdWcjNzIzNDEpCi0tLQog
bGlzcC9jdXMtZWRpdC5lbCB8IDkgKysrKysrLS0tCiAxIGZpbGUgY2hhbmdlZCwgNiBpbnNl
cnRpb25zKCspLCAzIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3AvY3VzLWVkaXQu
ZWwgYi9saXNwL2N1cy1lZGl0LmVsCmluZGV4IGZlYmJjOGQxYjhiLi4xZmQ4N2M0ZTlmMyAx
MDA2NDQKLS0tIGEvbGlzcC9jdXMtZWRpdC5lbAorKysgYi9saXNwL2N1cy1lZGl0LmVsCkBA
IC01MzQ0LDEwICs1MzQ0LDEzIEBAIEN1c3RvbS1uZXdsaW5lCiBUbyBzZWUgd2hhdCBmdW5j
dGlvbiB0aGUgd2lkZ2V0IHdpbGwgY2FsbCwgdXNlIHRoZQogYHdpZGdldC1kZXNjcmliZScg
Y29tbWFuZC4iCiAgIChpbnRlcmFjdGl2ZSAiQGQiKQotICAobGV0ICgoYnV0dG9uIChnZXQt
Y2hhci1wcm9wZXJ0eSBwb3MgJ2J1dHRvbikpKQotICAgIDs7IElmIHRoZXJlIGlzIG5vIGJ1
dHRvbiBhdCBwb2ludCwgdGhlbiB1c2UgdGhlIG9uZSBhdCB0aGUgc3RhcnQKLSAgICA7OyBv
ZiB0aGUgbGluZSwgaWYgaXQgaXMgYSBjdXN0b20tZ3JvdXAtbGluayAoYnVnIzIyOTgpLgor
ICAobGV0ICgoYnV0dG9uIChvciAoZ2V0LWNoYXItcHJvcGVydHkgcG9zICdidXR0b24pCisg
ICAgICAgICAgICAgICAgICAgIDs7IE1heWJlIHdlIGFyZSBqdXN0IHBhc3QgYSBidXR0b24s
IGFuZCBpdCdzIHF1aXRlIGhhbmR5CisgICAgICAgICAgICAgICAgICAgIDs7IHRvIGFjdGlv
biBpdCBhcyB3ZWxsLiAgKEJ1ZyM3MjM0MSkKKyAgICAgICAgICAgICAgICAgICAgKGdldC1j
aGFyLXByb3BlcnR5ICgxLSBwb3MpICdidXR0b24pKSkpCiAgICAgKG9yIGJ1dHRvbgorICAg
ICAgICA7OyBJZiB0aGVyZSBpcyBubyBidXR0b24gYXQgcG9pbnQsIHRoZW4gdXNlIHRoZSBv
bmUgYXQgdGhlIHN0YXJ0CisgICAgICAgIDs7IG9mIHRoZSBsaW5lLCBpZiBpdCBpcyBhIGN1
c3RvbS1ncm91cC1saW5rIChidWcjMjI5OCkuCiAJKGlmIChzZXRxIGJ1dHRvbiAoZ2V0LWNo
YXItcHJvcGVydHkgKGxpbmUtYmVnaW5uaW5nLXBvc2l0aW9uKSAnYnV0dG9uKSkKIAkgICAg
KG9yIChlcSAod2lkZ2V0LXR5cGUgYnV0dG9uKSAnY3VzdG9tLWdyb3VwLWxpbmspCiAJCShz
ZXRxIGJ1dHRvbiBuaWwpKSkpCi0tIAoyLjM0LjEKCg==

--------------RBJG9Bpw8D02MtWQdqsXzyhE--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 15 Feb 2025 10:44:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 15 05:44:15 2025
Received: from localhost ([127.0.0.1]:53540 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tjFeg-0003dD-PG
	for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 05:44:15 -0500
Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:61540)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>)
 id 1tjFee-0003cu-2B
 for 72341 <at> debbugs.gnu.org; Sat, 15 Feb 2025 05:44:13 -0500
Received: by mail-pj1-x102a.google.com with SMTP id
 98e67ed59e1d1-2fc1c80cdc8so3814585a91.2
 for <72341 <at> debbugs.gnu.org>; Sat, 15 Feb 2025 02:44:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739616246; x=1740221046; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:cc:to:subject:user-agent:mime-version:date:message-id
 :from:to:cc:subject:date:message-id:reply-to;
 bh=lB6XPj+wmKVhQf6le15XQeAYQNR8xSKDLJJ4s0fbi80=;
 b=NbbP/OtKoAXrSbPM/kQhp+pKYUyM4DQ/+gf9Px3onEbT5KDZX6Gkv5wKr4fAkpjwcH
 K2KJRSWodOpuRMG5ftis5H264EDtEDeBX+07UVS6m8E3qUkrM0VC7VIUuuKce1fZjpZC
 tpYqZY6jrSVQxIP6PacCWeKPQOFXpYK9N/z5BeeQ//14AxiSxQJ8AFbHltayZswp3Zlg
 yvErIRL9rU7BqJ1Uk/533Qig7YElaI6uKsYL624BBn1u4JCsqEpdgodHBjqLXO84q25A
 TGw+V0ZO6pvqsYPNzADjDh9Sz5OUoXFZI+mEhqFbfa/DGwzuTSko1JA71exwT6+myuo2
 XXGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739616246; x=1740221046;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:cc:to:subject:user-agent:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=lB6XPj+wmKVhQf6le15XQeAYQNR8xSKDLJJ4s0fbi80=;
 b=f9dsrHltmq2Rm4flLEliSlleNy6IUNufMWNXuQCTIBrm42cn4JG0hlfrqwZ2rv1ML7
 4As47SSJBasS/LhWe94v7/3za3HGEB7Huh3nfQO9UQn4875KfFtUMhSkcbGKO4zr+fTx
 7KqPpBkgIdq5TqZEevS+R7exh0XaxfguMtuc4ftj0VCsjNyKf9tvccvwSxpUJjAwE3CZ
 U+XTElImM7QevujDsfD1iUuvSEk83jUXRb+CXvLdYX0skDqks1PlJk+i0/1hpIfPQKIY
 fqnWebONmjFrpL9AG2ZMUqI3IEckD8eM/dHnyu//r6ny4blnS6MMRx9++CrBrJT6ZOnw
 q4wQ==
X-Gm-Message-State: AOJu0Yw8x1X4Z+pXXzoNdItHOxOx88napfSFrrPS+uqH3JkLW9Iy7hxJ
 AMsIN5VKn3D+iHpWQYxNoLFThONy1TomQX6pApBjIqyLtfVUFnu1
X-Gm-Gg: ASbGncuqb95e+eiiDI6pOJDzlO5Z/feKDaSENZCPYekTwgIyK6ffq+0mlTStRX+6Wzf
 +vGm2PJb9qAoRS9eAPsOrq4C9qDqjUiUFIOtVJNmJ5Ksh9QHIZV5ZBrNpvh6pUov+UqrovAGvOK
 xbaUCnGsjLJ6OtL1LGw9Lyjihz7AYNLSlfqqqtAxpvwbqT6P+hCBFYGeDb6MKpYJ6XhaoQelARB
 EnIHX1JHD5UxeV2I9vQt+lbeww7liyAO750wvIcKaxMRoWJRIomu4T37haIbZ98nSFzjX0+UNXw
 B1DnbsbJciGGd1j6Ddn2Tg==
X-Google-Smtp-Source: AGHT+IEyOfG38iiPCr4HarzXKsR/QmHURhprrIvNtV9EioSeecw0c4acmhwTVFCznvTHFQPT8y9fIQ==
X-Received: by 2002:a17:90b:1808:b0:2ee:45fe:63b5 with SMTP id
 98e67ed59e1d1-2fc40d14b12mr3943505a91.3.1739616245782; 
 Sat, 15 Feb 2025 02:44:05 -0800 (PST)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-2fbf98cf1besm6593564a91.11.2025.02.15.02.44.04
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 15 Feb 2025 02:44:05 -0800 (PST)
Message-ID: <a3900e0b-89ae-4116-bb50-d06b6f7b0c57@HIDDEN>
Date: Sat, 15 Feb 2025 07:44:02 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
To: Eli Zaretskii <eliz@HIDDEN>, Christoph Badura <bad@HIDDEN>
References: <20250127191330.GF27542@HIDDEN>
 <86wmegnikq.fsf@HIDDEN>
 <20250127215857.GI27542@HIDDEN>
 <86lduvnn3o.fsf@HIDDEN>
 <20250128224756.GK27542@HIDDEN>
 <8634gffr2t.fsf@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <8634gffr2t.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

 >> Date: Tue, 28 Jan 2025 23:47:56 +0100
 >> From: Christoph Badura <bad@HIDDEN>
 >>
 >> On Tue, Jan 28, 2025 at 02:23:39PM +0200, Eli Zaretskii wrote:
 >> > The Customize UI will be more helpful if we explicitly mention the
 >> > recommended values together with descriptive tags.
 >>
 >> So, I've just tested this:
 >>   emacs -nw --eval "(customize-group 'log-edit)"
 >>
 >> Search for "done hook".
 >> Be sure to toggle the "More" button and than the "Show value" button on
 >> the line for "Log Edit Done Hook".
 >> With this patch applied there's even a "More" button at the end of the
 >> one-line description of the log-edit-done-strip-cvs-lines option.
 >>
 >> Do you really think that UX needs improving?
 >>
 >> The only thing that annoys me is that when I search for "More", the 
point
 >> ends up just behind the button and RET doesn't toggle it.  Whereas 
it does
 >> when it is right before a button.  Fixing that would be a huge 
improvement
 >> for me.  But this is a separate issue.
 >>
 >> > But I realize that this is a separate issue, so maybe it should be the
 >> > subject of a separate patch.  So maybe just mentioning the 3
 >> > recommended values in the doc string will be enough for fixing this
 >> > issue.
 >>
 >> I've made a note in any case.
 >>
 >> I've way overrun my "emacs hacking" time budget for this week.  I'll get
 >> back to this bug at the end of next week after returning from travel.
 >
 > Mauro, WDYT about this?

I guess you're asking me about actioning the "More" button when point is
past it, to show the rest of the documentation.

There's already code that handles custom group links that way, in
Custom-newline (RET is bound to that command).  For example:
emacs -Q
M-x customize-group RET vc
C-s Log-Edit RET
RET

Emacs follows the link even though point is past the link.

It should be easy to extend it to other links/buttons.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 15 Feb 2025 10:19:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 15 05:19:33 2025
Received: from localhost ([127.0.0.1]:53454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tjFGn-0002Q4-4q
	for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 05:19:33 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:48790)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tjFGl-0002Pp-9L
 for 72341 <at> debbugs.gnu.org; Sat, 15 Feb 2025 05:19:31 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tjFGf-0000Dz-Ci; Sat, 15 Feb 2025 05:19:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=y//73xuBLVAzMSm7oaHk9zEBskONh3WUYx2VpBpWC8o=; b=ayXUsWiA5oTD
 1UrJPl+MXXbhpeCCBkEq9VXuEFZy4FbGrb7mFvvsryN60xu8e0i2JpQ8fUEFm/JnxpZymFEIsGMuU
 s50Hsip2NxxQeLFrNpWJpGU/s6khibJTiRFs+3VQMZFw6AH6PfIpubKrtKwLVPaJW5a+n0/hzNrhg
 zBBLHRRYlUqmeUEdachyATBJuNXbyeyJ1p8dNfg11sjUljpTBNGe2i1f7cl0TfF16PHbWDjVIUKXk
 KOaM5/wSLVo+UxHxF+Yznt15Q3greWfbBDVRekBIf+PoMar6GoMM7Yn2ezgFszbfiU9NW1IoZS/CS
 nDIw7eZpk0wPqR7I50iarg==;
Date: Sat, 15 Feb 2025 12:19:22 +0200
Message-Id: <8634gffr2t.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>, Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <20250128224756.GK27542@HIDDEN> (message
 from Christoph Badura on Tue, 28 Jan 2025 23:47:56 +0100)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20250127191330.GF27542@HIDDEN>
 <86wmegnikq.fsf@HIDDEN>
 <20250127215857.GI27542@HIDDEN>
 <86lduvnn3o.fsf@HIDDEN>
 <20250128224756.GK27542@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 28 Jan 2025 23:47:56 +0100
> From: Christoph Badura <bad@HIDDEN>
> 
> On Tue, Jan 28, 2025 at 02:23:39PM +0200, Eli Zaretskii wrote:
> > The Customize UI will be more helpful if we explicitly mention the
> > recommended values together with descriptive tags.
> 
> So, I've just tested this:
>   emacs -nw --eval "(customize-group 'log-edit)"
> 
> Search for "done hook".
> Be sure to toggle the "More" button and than the "Show value" button on
> the line for "Log Edit Done Hook".
> With this patch applied there's even a "More" button at the end of the
> one-line description of the log-edit-done-strip-cvs-lines option.
> 
> Do you really think that UX needs improving?
> 
> The only thing that annoys me is that when I search for "More", the point
> ends up just behind the button and RET doesn't toggle it.  Whereas it does
> when it is right before a button.  Fixing that would be a huge improvement
> for me.  But this is a separate issue.
> 
> > But I realize that this is a separate issue, so maybe it should be the
> > subject of a separate patch.  So maybe just mentioning the 3
> > recommended values in the doc string will be enough for fixing this
> > issue.
> 
> I've made a note in any case.
> 
> I've way overrun my "emacs hacking" time budget for this week.  I'll get
> back to this bug at the end of next week after returning from travel.

Mauro, WDYT about this?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 28 Jan 2025 22:48:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 17:48:09 2025
Received: from localhost ([127.0.0.1]:39030 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcuNN-0005wY-E0
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 17:48:09 -0500
Received: from mob.rho.tal.de ([195.8.224.241]:55376)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bad@HIDDEN>) id 1tcuNK-0005wN-Cc
 for 72341 <at> debbugs.gnu.org; Tue, 28 Jan 2025 17:48:07 -0500
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 0DA6980144D8
 for <72341 <at> debbugs.gnu.org>; Tue, 28 Jan 2025 23:47:56 +0100 (CET)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id ACE6C918CE; Tue, 28 Jan 2025 23:47:56 +0100 (CET)
Date: Tue, 28 Jan 2025 23:47:56 +0100
From: Christoph Badura <bad@HIDDEN>
To: 72341 <at> debbugs.gnu.org
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20250128224756.GK27542@HIDDEN>
References: <20250127191330.GF27542@HIDDEN>
 <86wmegnikq.fsf@HIDDEN>
 <20250127215857.GI27542@HIDDEN>
 <86lduvnn3o.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86lduvnn3o.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Jan 28, 2025 at 02:23:39PM +0200, Eli Zaretskii wrote:
> The Customize UI will be more helpful if we explicitly mention the
> recommended values together with descriptive tags.

So, I've just tested this:
  emacs -nw --eval "(customize-group 'log-edit)"

Search for "done hook".
Be sure to toggle the "More" button and than the "Show value" button on
the line for "Log Edit Done Hook".
With this patch applied there's even a "More" button at the end of the
one-line description of the log-edit-done-strip-cvs-lines option.

Do you really think that UX needs improving?

The only thing that annoys me is that when I search for "More", the point
ends up just behind the button and RET doesn't toggle it.  Whereas it does
when it is right before a button.  Fixing that would be a huge improvement
for me.  But this is a separate issue.

> But I realize that this is a separate issue, so maybe it should be the
> subject of a separate patch.  So maybe just mentioning the 3
> recommended values in the doc string will be enough for fixing this
> issue.

I've made a note in any case.

I've way overrun my "emacs hacking" time budget for this week.  I'll get
back to this bug at the end of next week after returning from travel.

--chris




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 28 Jan 2025 12:24:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 07:24:02 2025
Received: from localhost ([127.0.0.1]:35799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tckdO-0005Cf-0m
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 07:24:02 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:40676)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tckdL-0005C7-Jw
 for 72341 <at> debbugs.gnu.org; Tue, 28 Jan 2025 07:24:00 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tckdF-0000ip-JM; Tue, 28 Jan 2025 07:23:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=rkUkQ+ez+Aq+8Mej1tDVWl+Wr2urefoNIHgXuuyOGkY=; b=H67SG05z45ND
 6kNiPLnN7BdEPrP76Blvh2CrQoQOepUlt0U28VhtHmIb1YvCjzo96LeGGEjIT7Cn4ce8fwx3l41QE
 pn0S2bWcz3bj5vjoFtLzB5biU21hnOfrpbwsxOCpUeziyeSEVi8vrct4Ns0K1KylHLGra6ftZi4WT
 qW0ij74Y+yq/RVGzai5V8eGBxHSojMl+7XnqxtKfASmRVwYCTGBw7r5vrq5dVqR9AAc3k1ruHvgsS
 Y5KHBcXiiMDzHYuNCnEOzUEfpGKLyzpzGCmeaGmOwE9vwwORAPOq/n4jwuxpPNuZ/cgdgY7tHGTRr
 OCaG9BH9cVhEdgakzErzJQ==;
Date: Tue, 28 Jan 2025 14:23:39 +0200
Message-Id: <86lduvnn3o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>
In-Reply-To: <20250127215857.GI27542@HIDDEN> (message
 from Christoph Badura on Mon, 27 Jan 2025 22:58:57 +0100)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20250127191330.GF27542@HIDDEN>
 <86wmegnikq.fsf@HIDDEN>
 <20250127215857.GI27542@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 27 Jan 2025 22:58:57 +0100
> From: Christoph Badura <bad@HIDDEN>
> 
> On Mon, Jan 27, 2025 at 09:49:09PM +0200, Eli Zaretskii wrote:
> > Yes.  But (a) let's hear what others think about making this the
> > default, and (b) I think we should add to the doc string of this
> > option the reference to this function, whose main purpose is to be
> > used in this hook.
> 
> Do you mean something like the following?

That's one possibility, yes.  But maybe we can do better, see below.

> I'm somewhat surprised.  The other two hook functions aren't mentioned in
> the docstring.

We could add them as well.

> And I thought the customize UI would be "obvious" enough.

The Customize UI will be more helpful if we explicitly mention the
recommended values together with descriptive tags.

But I realize that this is a separate issue, so maybe it should be the
subject of a separate patch.  So maybe just mentioning the 3
recommended values in the doc string will be enough for fixing this
issue.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 21:59:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 16:59:06 2025
Received: from localhost ([127.0.0.1]:34708 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcX8L-0005T4-Tj
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 16:59:06 -0500
Received: from mob.rho.tal.de ([2a01:170::42:0:0:11]:59375)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bad@HIDDEN>) id 1tcX8I-0005SZ-86
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 16:59:03 -0500
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 8C6098014532
 for <72341 <at> debbugs.gnu.org>; Mon, 27 Jan 2025 22:58:58 +0100 (CET)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 02DAB918CE; Mon, 27 Jan 2025 22:58:57 +0100 (CET)
Date: Mon, 27 Jan 2025 22:58:57 +0100
From: Christoph Badura <bad@HIDDEN>
To: 72341 <at> debbugs.gnu.org
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20250127215857.GI27542@HIDDEN>
References: <20250127191330.GF27542@HIDDEN>
 <86wmegnikq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86wmegnikq.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, Jan 27, 2025 at 09:49:09PM +0200, Eli Zaretskii wrote:
> > Date: Mon, 27 Jan 2025 20:13:31 +0100
> > From: Christoph Badura <bad@HIDDEN>
> > > > -(defcustom log-edit-done-hook nil
> > > > +(defcustom log-edit-done-hook '(log-edit-done-strip-cvs-lines)
> > > > [...]
> > > > +  :version "30.1"
> > > The :version should change to 31.1.
> > 
> > OK.  But now that the function isn't going to be enabled by default,
> > the :version doesn't need to change (or be added).
> 
> Yes.  But (a) let's hear what others think about making this the
> default, and (b) I think we should add to the doc string of this
> option the reference to this function, whose main purpose is to be
> used in this hook.

Do you mean something like the following?

diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index e5f195c01dd..aff62e8bb3c 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -207,7 +207,8 @@ log-edit-done-hook
 This hook can be used to cleanup the message, enforce various
 conventions, or to allow recording the message in some other database,
 such as a bug-tracking system.  The list of files about to be committed
-can be obtained from `log-edit-files'."
+can be obtained from `log-edit-files'.
+Add `log-edit-done-strip-cvs-lines' to be fully compatible with \"cvs commit\"."
   :group 'log-edit
   :type '(hook :options (log-edit-set-common-indentation
 			 log-edit-add-to-changelog

I'm somewhat surprised.  The other two hook functions aren't mentioned in
the docstring.  And I thought the customize UI would be "obvious" enough.

--chris




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 20:17:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 15:17:42 2025
Received: from localhost ([127.0.0.1]:34565 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcVYE-0006N9-6a
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 15:17:42 -0500
Received: from mob.rho.tal.de ([195.8.224.241]:55711)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bad@HIDDEN>) id 1tcVYB-0006My-Kg
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 15:17:40 -0500
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 806F580011D6
 for <72341 <at> debbugs.gnu.org>; Mon, 27 Jan 2025 21:17:36 +0100 (CET)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 29C06918CE; Mon, 27 Jan 2025 21:17:36 +0100 (CET)
Date: Mon, 27 Jan 2025 21:17:36 +0100
From: Christoph Badura <bad@HIDDEN>
To: 72341 <at> debbugs.gnu.org
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20250127201735.GH27542@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
 <20250126230826.GB27542@HIDDEN>
 <87sep47cib.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87sep47cib.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Thanks to for the review by both you and Eli.

On Mon, Jan 27, 2025 at 10:54:36AM +0000, Sean Whitton wrote:
> On Mon 27 Jan 2025 at 12:08am +01, Christoph Badura wrote:
> > +(defun log-edit-done-strip-cvs-lines ()
> > +  "Strip lines starting with \"CVS:\" from commit log message.
> > +When not interactively do this only when the VC backend is CVS."
> 
> I think it would be better to use a wrapper function that looks at
> log-edit-vc-backend and have the command do it unconditionally.

I don't understand what you mean.  Wrapper function around what?  And what
command should do what exactly unconditionally?

> called-interactively-p should be avoided if it can be avoided.

I was going by what almost all of the other log-edit-*-hook function in
log-edit.el do.  Also I thought it would be convenient to be able to M-X
this function.  I did cal called-interactively-p incorrectly, though.

> > +    (let ((search-upper-case nil))
> I think it's more usual to bind case-fold-search not search-upper-case.

Changed.  I did use search-upper-case because the docstring for
flush-lines mentions that and the regexp does contain upper case
characters.  So all the conditions are true and I did not look further.

Do you think the docstring for flush-lines should mention case-fold-search
too?

> > diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el
> > index 005c336a3b6..e0e8d3e677a 100644
> > --- a/test/lisp/vc/log-edit-tests.el
> > +++ b/test/lisp/vc/log-edit-tests.el
> > @@ -360,4 +360,41 @@ log-edit-fill-entry-no-defun-list-wrapping
> >        (let ((fill-column 64)) (log-edit-fill-entry))
> >        (should (equal (buffer-string) wanted)))))
> >
> > +(ert-deftest log-edit-done-strip-cvs-lines-cvs ()
> > +  ;; This test verifies that lines beginning with "CVS: " are stripped
> > +  ;; from the commit message when log-edit-vc-backend is CVS.
> > +  (let (string wanted)
> > +    (setq string "summary line
> > +first line
> > +CVS: Please evaluate your changes and consider the following.
> > +CVS: Abort checkin if you answer no.
> > +"
> > +          wanted "summary line
> > +first line
> > +")
> > +    (with-temp-buffer
> > +      (let ((log-edit-done-hook 'log-edit-done-strip-cvs-lines)
> > +            (log-edit-vc-backend 'CVS))
> 
> These tests are fairly contrived because you bind log-edit-vc-backend
> yourself instead of using an actual CVS repository.  (Not a blocker.)

Binding log-edit-vc-backend myself is deliberate.  I'm testing behavior
that is internal to log-edit and independent from an actual respository
(CVS or other).  This is about what happens when log-edit-done cleans up
the buffer with the commit message before handing it is handed over to
the backend for the actual committing.  (Setting log-edit-vc-backend is
part of the contract of calling log-edit from vc-log-edit.)

I did notice just now that a) the docstring for log-edit-vc-backend is
wrong, and b) the call to vc-diff in log-edit-diff-fileset no longer
matches the signature of vc-diff.

--chris




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 19:53:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 14:53:50 2025
Received: from localhost ([127.0.0.1]:34544 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcVB7-0005KR-Lh
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:53:49 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:48890)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tcVB4-0005KA-Gv
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:53:47 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tcVAy-00059p-J6; Mon, 27 Jan 2025 14:53:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=uRZ9lHUvRclmS9sOgweTe7ly2c0UldvzdbCPe+Pe1/A=; b=Fbuu7mLwew+y
 5XSmZ4Sb6QOoazfoPOPFoS+AyfDCpieVsbHNWHNF0fLsaQ1m74pWGxeHVKiDAxy21Tg8OHrN9dH2t
 JR11scdrCepmNXlQnAy7cj0AydEmqYyyeOkMU9nZkW+aCrvZIQ3Iu6SbkoJTHWVpLoHaeiCvwcVhc
 I2IIUeWhaRpXiF8fen6ia5jiMW3dQ/ufKMt2QMOEBtMnrfkV6iuNvItcERnU8g1PBDgLrjQLXtXcj
 7qB9guVeXK5jeqSXDUGtLU5sTgT9iHK8XK6iHQxPv2WNVw1cuV84ZH9meOio9xwd4IlbDK5MDJcXJ
 OzrIVhOTJu8o334EylRvlA==;
Date: Mon, 27 Jan 2025 21:53:21 +0200
Message-Id: <86tt9knidq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>
In-Reply-To: <20250127192447.GG27542@HIDDEN> (message
 from Christoph Badura on Mon, 27 Jan 2025 20:24:47 +0100)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
 <20250126230826.GB27542@HIDDEN>
 <864j1kqwfg.fsf@HIDDEN>
 <20250127192447.GG27542@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 27 Jan 2025 20:24:47 +0100
> From: Christoph Badura <bad@HIDDEN>
> 
> On Mon, Jan 27, 2025 at 02:21:39PM +0200, Eli Zaretskii wrote:
> > > Date: Mon, 27 Jan 2025 00:08:26 +0100
> > > From: Christoph Badura <bad@HIDDEN>
> > > 
> > > It would be nice if this would end up in emacs-30.1.
> > 
> > As Sean says, it's too late for that.  But we could perhaps consider
> > it for backporting into Emacs 30.2, provided that it will cause no
> > complaints while on master.
> 
> No worries.  I just thought it would be nice to have this show up in a
> release soonich.  But I guess I will be dragging along my local
> implementation of the hook for years in my init.el anyway until all the
> emacsen installed by default on the machines I use will have caughtup.
> 
> > > I guess I need to add an entry to the NEWS file.
> > Yes, because the user option changed.
> 
> How about:
> 
>   ---
>   ** VC mode
>   *** New function 'log-edit-done-strip-cvs-lines'.
>   This function strips all lines beginning with "CVS:" from the buffer.
>   It is intended to be added to the 'log-edit-done-hook' so that
>   'vc-cvs-checkin' behaves like "cvs commit" from the command line.
> 
> Or perhaps:
> 
>   It is intended to be added to the 'log-edit-done-hook' so that checking
>   in a commit under CVS behaves like "cvs commit" from the command line.

Both are okay, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 19:49:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 14:49:26 2025
Received: from localhost ([127.0.0.1]:34536 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcV6r-000580-HV
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:49:26 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:50790)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tcV6m-00057h-J6
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:49:22 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tcV6g-0004Us-7b; Mon, 27 Jan 2025 14:49:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=iKzYIAIPtSO9/S/dOxnb64vnLdbHWhyqnaWhfQ2nG9c=; b=LPutszUCehvv
 QkSzSzrWu3NsJu5ICGa2eh5YgpkI8rPJPiK9J/4294g6zbq3PIaHgjcSP1LVvun7PFym6GGL+IKdX
 5zEGLJh9P9MRcoK5lbKlXwkjbERlGQEj/pBPkbdAgO6pdpN7iVYZ3TvJ7H+DMnhq+o96Hgcxpynax
 kLMfxbwpqgvLXXSwNVpFkYRHZmvH5/fCWFJ+XHuzDCdWmvRQ+zm/JShSGnGoyMmGOYMRn7z+RWQI+
 SqEbkWBy1T779JMlqTrwpwGk1lNCrFagM2x3drUX0S5RZvGiXhCfY1EaDPNKlfjbqDQ7pPsO3pUJp
 Ly+jS5gnXViXtcyySLwJ+A==;
Date: Mon, 27 Jan 2025 21:49:09 +0200
Message-Id: <86wmegnikq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>
In-Reply-To: <20250127191330.GF27542@HIDDEN> (message
 from Christoph Badura on Mon, 27 Jan 2025 20:13:31 +0100)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20250127191330.GF27542@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org, spwhitton@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 27 Jan 2025 20:13:31 +0100
> From: Christoph Badura <bad@HIDDEN>
> Cc: 72341 <at> debbugs.gnu.org
> 
> I'll reply to the 3 relevant mails in one message.  Is that generally
> acceptable on this list?

Sure, no problem with that.

> > > -(defcustom log-edit-done-hook nil
> > > +(defcustom log-edit-done-hook '(log-edit-done-strip-cvs-lines)
> > > [...]
> > > +  :version "30.1"
> > The :version should change to 31.1.
> 
> OK.  But now that the function isn't going to be enabled by default,
> the :version doesn't need to change (or be added).

Yes.  But (a) let's hear what others think about making this the
default, and (b) I think we should add to the doc string of this
option the reference to this function, whose main purpose is to be
used in this hook.

> > Also, I'm not sure we can turn this on by default, as I explained in
> > the previous discussions.
> 
> OK.  I do understand that you guys are not comfortable with turning this
> on immediately.  That begs the question what the criteria for turning this
> on by default are.  But let's discuss that separately.

Right.

> > > +(defun log-edit-done-strip-cvs-lines ()
> > > +  "Strip lines starting with \"CVS:\" from commit log message.
> > > +When not interactively do this only when the VC backend is CVS."
> > 
> > Please add here a short description of the rationale for this
> > functionality.  CVS being used as infrequently nowadays as it is, I'm
> > fairly sure most people won't understand the purpose of this without
> > some help.
> 
> How about:
> 
>   "Strip lines starting with \"CVS:\" from commit log message.
> When not interactively do this only when the VC backend is CVS.
> This mimicks what CVS does when invoked 'cvs commit [files...]'"

SGTM, thanks.

> > Last, but not least: you don't seem to have a copyright assignment on
> > file, without which we cannot accept a contribution of this size.
> 
> I've already started the process.  I've turned in the paperwork on Jan
> 6th but haven't heard back yet.

If they don't reply a week from now, please ping them and CC me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 19:24:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 14:24:54 2025
Received: from localhost ([127.0.0.1]:34513 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcUj7-00042O-H0
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:24:53 -0500
Received: from mob.rho.tal.de ([2a01:170::42:0:0:11]:36421)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bad@HIDDEN>) id 1tcUj3-00042C-Lk
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:24:52 -0500
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 922E58014528
 for <72341 <at> debbugs.gnu.org>; Mon, 27 Jan 2025 20:24:47 +0100 (CET)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 65623918BF; Mon, 27 Jan 2025 20:24:47 +0100 (CET)
Date: Mon, 27 Jan 2025 20:24:47 +0100
From: Christoph Badura <bad@HIDDEN>
To: 72341 <at> debbugs.gnu.org
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20250127192447.GG27542@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
 <20250126230826.GB27542@HIDDEN>
 <864j1kqwfg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <864j1kqwfg.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, Jan 27, 2025 at 02:21:39PM +0200, Eli Zaretskii wrote:
> > Date: Mon, 27 Jan 2025 00:08:26 +0100
> > From: Christoph Badura <bad@HIDDEN>
> > 
> > It would be nice if this would end up in emacs-30.1.
> 
> As Sean says, it's too late for that.  But we could perhaps consider
> it for backporting into Emacs 30.2, provided that it will cause no
> complaints while on master.

No worries.  I just thought it would be nice to have this show up in a
release soonich.  But I guess I will be dragging along my local
implementation of the hook for years in my init.el anyway until all the
emacsen installed by default on the machines I use will have caughtup.

> > I guess I need to add an entry to the NEWS file.
> Yes, because the user option changed.

How about:

  ---
  ** VC mode
  *** New function 'log-edit-done-strip-cvs-lines'.
  This function strips all lines beginning with "CVS:" from the buffer.
  It is intended to be added to the 'log-edit-done-hook' so that
  'vc-cvs-checkin' behaves like "cvs commit" from the command line.

Or perhaps:

  It is intended to be added to the 'log-edit-done-hook' so that checking
  in a commit under CVS behaves like "cvs commit" from the command line.

> > -(defcustom log-edit-done-hook nil
> > +(defcustom log-edit-done-hook '(log-edit-done-strip-cvs-lines)
> >    "Hook run before doing the actual commit.
> >  This hook can be used to cleanup the message, enforce various
> >  conventions, or to allow recording the message in some other database,
> >  such as a bug-tracking system.  The list of files about to be committed
> >  can be obtained from `log-edit-files'."
> > +  :version "30.1"
> 
> The :version should change to 31.1.

OK.  But as the default value now isn't going to change that's not needed
anymore.

> Also, I'm not sure we can turn this on by default, as I explained in
> the previous discussions.

OK.  That begs the question what the criteria for enabling this by
default are.  But let's discuss that separately.

> > +(defun log-edit-done-strip-cvs-lines ()
> > +  "Strip lines starting with \"CVS:\" from commit log message.
> > +When not interactively do this only when the VC backend is CVS."
> 
> Please add here a short description of the rationale for this
> functionality.  CVS being used as infrequently nowadays as it is, I'm
> fairly sure most people won't understand the purpose of this without
> some help.

How about:

  "Strip lines starting with \"CVS:\" from commit log message.
  When not interactively do this only when the VC backend is CVS.
  This mimicks what CVS does when invoked 'cvs commit [files...]'"

> Last, but not least: you don't seem to have a copyright assignment on
> file, without which we cannot accept a contribution of this size.

I've already started the paperwork.  I've turned in the signed assignement
on Jan 6th but haven't heard back yet.  I did reply to the ticket
yesterday so see what is up.

--chris




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 19:13:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 14:13:37 2025
Received: from localhost ([127.0.0.1]:34487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcUYD-0003Xf-5L
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:13:37 -0500
Received: from mob.rho.tal.de ([195.8.224.241]:51790)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bad@HIDDEN>) id 1tcUY9-0003XT-V6
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 14:13:35 -0500
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 966CF8014570;
 Mon, 27 Jan 2025 20:13:31 +0100 (CET)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 159A7918CE; Mon, 27 Jan 2025 20:13:31 +0100 (CET)
Date: Mon, 27 Jan 2025 20:13:31 +0100
From: Christoph Badura <bad@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20250127191330.GF27542@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86plk8peq7.fsf@HIDDEN>
 <864j1kqwfg.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I'll reply to the 3 relevant mails in one message.  Is that generally
acceptable on this list?

On Mon, Jan 27, 2025 at 02:21:39PM +0200, Eli Zaretskii wrote:
> > Date: Mon, 27 Jan 2025 00:08:26 +0100
> > From: Christoph Badura <bad@HIDDEN>
> > 
> > It would be nice if this would end up in emacs-30.1.
> 
> As Sean says, it's too late for that.  But we could perhaps consider
> it for backporting into Emacs 30.2, provided that it will cause no
> complaints while on master.

Sure. I'd be very happy with that too.  I'm not going to press the issue.

I was thinking it would be convenient for me to have this show up in a
release soon.  But I guess I will have to drag around my local
implementation in the init file for a couple of years until the default
emacs on the various machines will have caught up.

> > -(defcustom log-edit-done-hook nil
> > +(defcustom log-edit-done-hook '(log-edit-done-strip-cvs-lines)
> > [...]
> > +  :version "30.1"
> The :version should change to 31.1.

OK.  But now that the function isn't going to be enabled by default,
the :version doesn't need to change (or be added).

> Also, I'm not sure we can turn this on by default, as I explained in
> the previous discussions.

OK.  I do understand that you guys are not comfortable with turning this
on immediately.  That begs the question what the criteria for turning this
on by default are.  But let's discuss that separately.

> > +(defun log-edit-done-strip-cvs-lines ()
> > +  "Strip lines starting with \"CVS:\" from commit log message.
> > +When not interactively do this only when the VC backend is CVS."
> 
> Please add here a short description of the rationale for this
> functionality.  CVS being used as infrequently nowadays as it is, I'm
> fairly sure most people won't understand the purpose of this without
> some help.

How about:

  "Strip lines starting with \"CVS:\" from commit log message.
When not interactively do this only when the VC backend is CVS.
This mimicks what CVS does when invoked 'cvs commit [files...]'"

> Last, but not least: you don't seem to have a copyright assignment on
> file, without which we cannot accept a contribution of this size.

I've already started the process.  I've turned in the paperwork on Jan
6th but haven't heard back yet.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 13:30:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 08:30:02 2025
Received: from localhost ([127.0.0.1]:59979 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcPBi-0002wE-7T
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 08:30:02 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:41530)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tcPBf-0002vS-LW
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 08:30:00 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tcPBY-0004I7-HQ; Mon, 27 Jan 2025 08:29:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=f28+99Bo1Kop/xOMTWjBF7tT68C2b8gDxrAsP7oM5M0=; b=HBDCloKcKk8T
 OYZaloMPZ5BN9s+QrgIH7xhZIRRvnk1S3oYf+6hWbYUSSkuwyjAGaYR+WKWMldyxs7cjNFgPJnodO
 JbX7nQruyeYdr0kSZA2THpsS7vpdrN3XJVSzFN3+GdY6BBmYkKoMtdntMUtCMP2b4T0xtvAQBVWAO
 qq5yM9tyGytvzyHDd4+syELCpfJI7Q8e6O+bE0N9ntpNEYjNU2Gct+KHmxYNbU9wtKZQIvyTFSOHR
 g0w07MfhqcjO9r5aIf0ZCNm4kY3oJMZLtfNRARjJBQTsSjQ/Co1mylReEoyJ92o1/A7Qo56xq8hgY
 q2gRz7RcJDnz6Z16eNQwZg==;
Date: Mon, 27 Jan 2025 15:29:20 +0200
Message-Id: <86plk8peq7.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87sep47cib.fsf@HIDDEN> (message from Sean
 Whitton on Mon, 27 Jan 2025 10:54:36 +0000)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
 <20250126230826.GB27542@HIDDEN>
 <87sep47cib.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: bad@HIDDEN, 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 72341 <at> debbugs.gnu.org
> From: Sean Whitton <spwhitton@HIDDEN>
> Date: Mon, 27 Jan 2025 10:54:36 +0000
> 
> > I guess I need to add an entry to the NEWS file.
> 
> This is more of a bugfix, so you can add one if you would like, but I'm
> not sure it's necessary.

From where I stand, it introduces a new feature (albeit a minor one):
users can now request removal of these prefixes.  And if we agree to
change the default value of the user option, then we definitely
should call it out.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 12:21:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 07:21:51 2025
Received: from localhost ([127.0.0.1]:59714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcO7j-00020a-Cw
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 07:21:51 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:47676)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tcO7h-00020K-3j
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 07:21:49 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tcO7b-0001k3-3d; Mon, 27 Jan 2025 07:21:43 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Ixver35XG7X+fQiGaKUQ8p3lkQlnP1YIMxkkvuq80Pg=; b=rMMqw9pe2X4X
 H2zmOj3BsxOx7iM4fNVNN42ipv758dBh7rDg/7OkvMVDjZOM9DjS9qhZuzHuERQY+TTOMxFjVDK/P
 Dj6+QS2saru15PTbnxH22o6e9q1h2Q8svBX2QrbYSDrM3TjKGlHz4iSjh2aOjdiJFCz+LY/8bQqj0
 iNNIyl5z91Tv7uuSCTAemcXexVhLju3cnI8DtllI9LGmtukFU6ofs1yjH06IRP7ev+8xa37sGKn/7
 Vr8FNMoU3p0uiTBIM+r0o4jljrilnRhfIhEEcnZlDYwQEav6ld424LOYcdc5ChC3IjqPcP96P6Hy8
 WtixZ5xmCbBNox86sOPyDQ==;
Date: Mon, 27 Jan 2025 14:21:39 +0200
Message-Id: <864j1kqwfg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>
In-Reply-To: <20250126230826.GB27542@HIDDEN> (message
 from Christoph Badura on Mon, 27 Jan 2025 00:08:26 +0100)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
 <20250126230826.GB27542@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 27 Jan 2025 00:08:26 +0100
> From: Christoph Badura <bad@HIDDEN>
> 
> It would be nice if this would end up in emacs-30.1.

As Sean says, it's too late for that.  But we could perhaps consider
it for backporting into Emacs 30.2, provided that it will cause no
complaints while on master.

> I guess I need to add an entry to the NEWS file.

Yes, because the user option changed.

> -(defcustom log-edit-done-hook nil
> +(defcustom log-edit-done-hook '(log-edit-done-strip-cvs-lines)
>    "Hook run before doing the actual commit.
>  This hook can be used to cleanup the message, enforce various
>  conventions, or to allow recording the message in some other database,
>  such as a bug-tracking system.  The list of files about to be committed
>  can be obtained from `log-edit-files'."
> +  :version "30.1"

The :version should change to 31.1.

Also, I'm not sure we can turn this on by default, as I explained in
the previous discussions.

> +(defun log-edit-done-strip-cvs-lines ()
> +  "Strip lines starting with \"CVS:\" from commit log message.
> +When not interactively do this only when the VC backend is CVS."

Please add here a short description of the rationale for this
functionality.  CVS being used as infrequently nowadays as it is, I'm
fairly sure most people won't understand the purpose of this without
some help.

Last, but not least: you don't seem to have a copyright assignment on
file, without which we cannot accept a contribution of this size.
Would you like to start your copyright assignment paperwork at this
time?  If you agree, I will send you the form to fill with the
instructions.

Thanks for working on this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 11:51:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 06:51:18 2025
Received: from localhost ([127.0.0.1]:59666 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcNe9-0000ZB-NV
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 06:51:17 -0500
Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:48601)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tcNe5-0000Yq-CD
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 06:51:14 -0500
Received: by mail-ed1-x531.google.com with SMTP id
 4fb4d7f45d1cf-5dc0522475eso8526668a12.1
 for <72341 <at> debbugs.gnu.org>; Mon, 27 Jan 2025 03:51:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1737978667; x=1738583467; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=hrUuxnVMumG41nwTUzl8wdThX2mCTBvNnXmPr98MQfo=;
 b=J5UVxGaSDJfTe5cgoR14Hj2Deat5UhcYTESgF4PvGZ7SitfmPNYI5JrEvOzxwoJhB5
 osYNkEaGUlI7biNy4TCloLxWJ4wY0sJZ6KCcOxzeFPwPBfQ6rP6Hr1rsT7T+TONNEb6F
 fojTv5n92/BEydyhe4dUOUx1ZontAJiKO0sCJKzi0DPnMBDoCHA5khSJpxuHWJPWyQ6+
 hnm4VM2Sa9TMLvdN+7FzevHNIu4gNMfZoMruUV0G1XOs5wq1m3fBtIjZ+hqK7XCTSzPN
 VBO2PekJxneiyAERxzCKtxG8YmV5IlOSZAgmstyxXoIpaA/w17A76P4zGiF4nsGWdQ4i
 aMwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1737978667; x=1738583467;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=hrUuxnVMumG41nwTUzl8wdThX2mCTBvNnXmPr98MQfo=;
 b=qy2GDLt/VEECgoTHgfsIQxdq4iM9q4r3uYuKobBLkWF8h2rF6GLXmD8ewCjmWVD+B4
 Fq8zqm0zkkT334PtsQ2j+NnrIRC5FnL24WYywaBEre11TrtL9aOolZ0TLTXUBo31g8zJ
 HxEHztT7xbySV3/piNwNs2JQ0y/LvQxMFBizIfFI7hx4ViW8qvTVFE5D7umY+11+9yTE
 oee6rYo3mu10PRA6MWGO35l9uye/8PvDiAdv/p73cIA3o+0f9lVETBlXG9Azqlkmgcs+
 iN4Qv2p/2w6uEhIV+oS80ff+iqqkAfVPHhSnTI6P/NRcfCyZ41CE7ZbOAopX2/7K4TkJ
 8R4A==
X-Gm-Message-State: AOJu0YyouoAGs72u57H72y3TVD0nx8NuiVdVYU8xeFGOMYrlwvptODYC
 0+QIAaPQHzR01hgpcpQvVlJBQuB3a/CKE4weQOAv13hqlfhmI7fhZ0qyBei6AVOTjmEc+HEwMmp
 CkIEX9WAWMF0a9GRmCtLegu7+W1E=
X-Gm-Gg: ASbGnct9DwRJcTre5Hlj/emHRHndCeYYXMGPe45O0BTRYbyLOeQECvNByI6QeZxiiBy
 DZV+ag3+BCk1DczIzrd1PZ23WPajCRvwMia3UgOYXn4aSfhgHgnYIl0RTHYK2Y+E=
X-Google-Smtp-Source: AGHT+IG1MfXHTzhylYwF9nxB4mhek/SiLRCVtkn8DfT4//HDLubqztrFOK+sRgcz72hpKE8DpAkFu7Hmc06mwnXVll4=
X-Received: by 2002:a05:6402:2681:b0:5d0:bcdd:ff9c with SMTP id
 4fb4d7f45d1cf-5db7d2dc2admr36007769a12.2.1737978666617; Mon, 27 Jan 2025
 03:51:06 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 27 Jan 2025 05:51:06 -0600
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <87sep47cib.fsf@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN> <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN> <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN> <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
 <20250126230826.GB27542@HIDDEN>
 <87sep47cib.fsf@HIDDEN>
MIME-Version: 1.0
Date: Mon, 27 Jan 2025 05:51:06 -0600
X-Gm-Features: AWEUYZkoLtQZQpbwLO5srhv86rvnINbyPK5Kkv9HSn_nGAXPJwHO04P6OPVhwyE
Message-ID: <CADwFkm=LrVzR6z=PEGC+6eRVQnf8UPYoyEDndW1AqZde-JVxPA@HIDDEN>
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
To: Sean Whitton <spwhitton@HIDDEN>, Christoph Badura <bad@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> On Mon 27 Jan 2025 at 12:08am +01, Christoph Badura wrote:
>
>> It would be nice if this would end up in emacs-30.1.
>
> Unfortunately, I believe it's too late for that.

It's definitely too late for Emacs 30.1, but if it's a bug fix, we might
be able to consider it for Emacs 30.2.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 27 Jan 2025 10:55:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 05:55:21 2025
Received: from localhost ([127.0.0.1]:59548 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcMm1-0006Iq-3w
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 05:55:21 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:34318)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1tcMly-0006DZ-Id
 for 72341 <at> debbugs.gnu.org; Mon, 27 Jan 2025 05:55:19 -0500
DKIM-Signature: a=rsa-sha256;
 b=7XsNlntTKs+xxJPZxVxcCBpjcWU597Y4H+tR5rUELBZ2wniCMxBKxIO++Z0mjOAAQi0Ezu2JcZDWy0DFfTFE2KYfC4w4kN9KME7uckxIQWTM/1YzZo+fY5NsXhRPN4DB+wkTLXF/1uIWau0KQqerdAGpMEORLFeUVGuFI9DWUQqtG059MklzYYiAoqrRppt9gUkSmgB+YGKzdomxXFMkcIJCxhGeyIDj85dclWQj9ATiUA1bBDicOJViX+nDwW9XqKCWnMUaMTfGT044o3wizkmFrKOzn9+OyOYEMpWxjhsMG0WPnoErq0CI2sQR5EFmzUQnzFr+0UQZMGLeALOMWw==;
 s=purelymail3; d=spwhitton.name; v=1;
 bh=X5J/IidebfBVdeEYrva8V6wsUv1nuKYgV5laFuQZ4c8=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=f7V4kFl3wsGF+xOLXSUY7DiM4MOl5a+q1SsFK/84+IQZJYsq+lVazutJQ9D+7BCYgDEx7/BX3WOKcjS7usd3L4HUNK9NbbJgFBVW8RLjZlgmeg0/neJT25wnYXR4/n/n8NAwx099cQu3w5OYlpO3uJ7JWzqinjkPt6FzlErEiWlkXXg+3+1NDFtUZulESa2UKjui/P/szLN1KZegWP5CcjzIApvhjeyaEctUwFtV/Em/GYx9xgrHD+UYy5SyNl6Z9eKRuFPMVK4uH6mGUBhnQy7vLrCmIYEFbigZRHdMUQJ1gI6axWRSwfOae2UJ+EK/utHQne1PbBePiOdUyZgHow==;
 s=purelymail3; d=purelymail.com; v=1;
 bh=X5J/IidebfBVdeEYrva8V6wsUv1nuKYgV5laFuQZ4c8=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 72341 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 427101756; 
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Mon, 27 Jan 2025 10:54:37 +0000 (UTC)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 85AC6941A72; Mon, 27 Jan 2025 10:54:36 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
To: Christoph Badura <bad@HIDDEN>
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
In-Reply-To: <20250126230826.GB27542@HIDDEN> (Christoph
 Badura's message of "Mon, 27 Jan 2025 00:08:26 +0100")
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
 <20250126230826.GB27542@HIDDEN>
Date: Mon, 27 Jan 2025 10:54:36 +0000
Message-ID: <87sep47cib.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Mon 27 Jan 2025 at 12:08am +01, Christoph Badura wrote:

> Because this hook function does its work only when the
> 'log-edit-vc-backend' is CVS and since this just makes 'vc-cvs-checkin'
> behave like invking "cvs commit [files...]" from the command line I
> consider this a change low risk and don't think that it would surprise
> existing users.  Therefore I think it is appropriate to enable this hook
> by default.

Cool.

> It would be nice if this would end up in emacs-30.1.

Unfortunately, I believe it's too late for that.

> I'd appreciate any review and guidance what is missing to make this
> committable.
>
> I guess I need to add an entry to the NEWS file.

This is more of a bugfix, so you can add one if you would like, but I'm
not sure it's necessary.

> +  :version "30.1"
>    :group 'log-edit
>    :type '(hook :options (log-edit-set-common-indentation
> -			 log-edit-add-to-changelog)))
> +			 log-edit-add-to-changelog
> +                         log-edit-done-strip-cvs-lines)))
>
>  (defcustom log-edit-strip-single-file-name nil
>    "If non-nil, remove file name from single-file log entries."
> @@ -926,6 +928,16 @@ log-edit-insert-cvs-template
>        (goto-char (point-max))
>        (insert-file-contents "CVS/Template"))))
>
> +(defun log-edit-done-strip-cvs-lines ()
> +  "Strip lines starting with \"CVS:\" from commit log message.
> +When not interactively do this only when the VC backend is CVS."

I think it would be better to use a wrapper function that looks at
log-edit-vc-backend and have the command do it unconditionally.
called-interactively-p should be avoided if it can be avoided.

> +    (let ((search-upper-case nil))

I think it's more usual to bind case-fold-search not search-upper-case.

> diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el
> index 005c336a3b6..e0e8d3e677a 100644
> --- a/test/lisp/vc/log-edit-tests.el
> +++ b/test/lisp/vc/log-edit-tests.el
> @@ -360,4 +360,41 @@ log-edit-fill-entry-no-defun-list-wrapping
>        (let ((fill-column 64)) (log-edit-fill-entry))
>        (should (equal (buffer-string) wanted)))))
>
> +(ert-deftest log-edit-done-strip-cvs-lines-cvs ()
> +  ;; This test verifies that lines beginning with "CVS: " are stripped
> +  ;; from the commit message when log-edit-vc-backend is CVS.
> +  (let (string wanted)
> +    (setq string "summary line
> +first line
> +CVS: Please evaluate your changes and consider the following.
> +CVS: Abort checkin if you answer no.
> +"
> +          wanted "summary line
> +first line
> +")
> +    (with-temp-buffer
> +      (let ((log-edit-done-hook 'log-edit-done-strip-cvs-lines)
> +            (log-edit-vc-backend 'CVS))

These tests are fairly contrived because you bind log-edit-vc-backend
yourself instead of using an actual CVS repository.  (Not a blocker.)

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 26 Jan 2025 23:08:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 18:08:33 2025
Received: from localhost ([127.0.0.1]:58269 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcBk0-0007w1-OM
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 18:08:33 -0500
Received: from mob.rho.tal.de ([195.8.224.241]:38648)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bad@HIDDEN>) id 1tcBjx-0007vn-CE
 for 72341 <at> debbugs.gnu.org; Sun, 26 Jan 2025 18:08:30 -0500
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 146D080011F2
 for <72341 <at> debbugs.gnu.org>; Mon, 27 Jan 2025 00:08:26 +0100 (CET)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id A6DDC918CE; Mon, 27 Jan 2025 00:08:26 +0100 (CET)
Date: Mon, 27 Jan 2025 00:08:26 +0100
From: Christoph Badura <bad@HIDDEN>
To: 72341 <at> debbugs.gnu.org
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20250126230826.GB27542@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="EVF5PPMfhYS0aIcm"
Content-Disposition: inline
In-Reply-To: <864j83wfwd.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72341
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--EVF5PPMfhYS0aIcm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Sorry for the long delay.

I guess I better start with a short summary to spare you the trouble of
reading through the previous messages relating to this bug.

When "cvs commit [file...]" is invoked from the command line, cvs prepares
a temp file with a template of a commit message and invokes an editor on
it. The template commit message, by default, is like this:

CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS: 
CVS: Committing in .
CVS: 
CVS: Modified Files:
CVS: 	test.txt 
CVS: ----------------------------------------------------------------------

After saving the edited commit message and exiting the editor, cvs strips
lines beginning with 'CVS:' from the temp file.  NB. this is the only
documentation for this feature.  The CVS manual doesn't mention this.

When committing with "cvs commit -m 'Commit message.' [files...]" this
stripping is *not* performed.

The commit message template in the temp file is augmented with the
contents of the file 'CVS/Template', if it exists or a template received
from the CVS server..

I work on NetBSD where we make use of such a template.

'vc-cvs-checkin' emulates the first part of this (inserting the template
from the server/'CVS/Template file.  However, it does not strip the lines
beginning with "CVS:" and uses the "cvs commit -m 'Commit message.'" method
to do the actual commit.  That causes the "CVS:"-lines to end up in the
actual commit.

I have drafted a change that adds a function to the 'log-edit-done-hook'
that strips lines beginning with "CVS:" from the commit message if the
'log-edit-vc-backend' is "'CVS".

Because this hook function does its work only when the
'log-edit-vc-backend' is CVS and since this just makes 'vc-cvs-checkin'
behave like invking "cvs commit [files...]" from the command line I
consider this a change low risk and don't think that it would surprise
existing users.  Therefore I think it is appropriate to enable this hook
by default.

It would be nice if this would end up in emacs-30.1.

I'd appreciate any review and guidance what is missing to make this
committable.

I guess I need to add an entry to the NEWS file.

--chris

--EVF5PPMfhYS0aIcm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0001-VC-strip-CVS-template-lines-when-committing.patch"

From 0df540930663949ff8351863cce0290ecb31dad3 Mon Sep 17 00:00:00 2001
From: Christoph Badura <bad@HIDDEN>
Date: Sun, 26 Jan 2025 22:48:11 +0100
Subject: [PATCH] VC: strip CVS template lines when committing

Strip all lines beginning with "CVS: " from the commit
message as CVS does (Bug#72341).  Do this only if 'log-edit-vc-backend'
is 'CVS'.
* lisp/vc/log-edit.el (log-edit-done-strip-cvs-lines, log-edit-done-hook):
Add a hook function to strip the lines starting with "CVS: " and make it
to the 'log-edit-done-hook' by default.
* test/lisp/vc/log-edit-tests.el (log-edit-done-strip-cvs-lines-cvs,
log-edit-done-strip-cvs-lines-non-cvs):
Add test cases 'log-edit-done-strip-cvs-lines'.
---
 lisp/vc/log-edit.el            | 16 +++++++++++++--
 test/lisp/vc/log-edit-tests.el | 37 ++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index e23e7414a18..cb7c3565ccf 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -202,15 +202,17 @@ log-edit-mode-hook
   :group 'log-edit
   :type 'hook)
 
-(defcustom log-edit-done-hook nil
+(defcustom log-edit-done-hook '(log-edit-done-strip-cvs-lines)
   "Hook run before doing the actual commit.
 This hook can be used to cleanup the message, enforce various
 conventions, or to allow recording the message in some other database,
 such as a bug-tracking system.  The list of files about to be committed
 can be obtained from `log-edit-files'."
+  :version "30.1"
   :group 'log-edit
   :type '(hook :options (log-edit-set-common-indentation
-			 log-edit-add-to-changelog)))
+			 log-edit-add-to-changelog
+                         log-edit-done-strip-cvs-lines)))
 
 (defcustom log-edit-strip-single-file-name nil
   "If non-nil, remove file name from single-file log entries."
@@ -926,6 +928,16 @@ log-edit-insert-cvs-template
       (goto-char (point-max))
       (insert-file-contents "CVS/Template"))))
 
+(defun log-edit-done-strip-cvs-lines ()
+  "Strip lines starting with \"CVS:\" from commit log message.
+When not interactively do this only when the VC backend is CVS."
+  (interactive)
+  (when (or (called-interactively-p)
+            (eq log-edit-vc-backend 'CVS))
+    (let ((search-upper-case nil))
+      (goto-char (point-min))
+      (flush-lines "^CVS:"))))
+
 (defun log-edit-insert-cvs-rcstemplate ()
   "Insert the RCS commit log template from the CVS repository.
 This contacts the repository to get the rcstemplate file and
diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el
index 005c336a3b6..e0e8d3e677a 100644
--- a/test/lisp/vc/log-edit-tests.el
+++ b/test/lisp/vc/log-edit-tests.el
@@ -360,4 +360,41 @@ log-edit-fill-entry-no-defun-list-wrapping
       (let ((fill-column 64)) (log-edit-fill-entry))
       (should (equal (buffer-string) wanted)))))
 
+(ert-deftest log-edit-done-strip-cvs-lines-cvs ()
+  ;; This test verifies that lines beginning with "CVS: " are stripped
+  ;; from the commit message when log-edit-vc-backend is CVS.
+  (let (string wanted)
+    (setq string "summary line
+first line
+CVS: Please evaluate your changes and consider the following.
+CVS: Abort checkin if you answer no.
+"
+          wanted "summary line
+first line
+")
+    (with-temp-buffer
+      (let ((log-edit-done-hook 'log-edit-done-strip-cvs-lines)
+            (log-edit-vc-backend 'CVS))
+        (setq-local log-edit-callback #'(lambda () (interactive) nil))
+        (insert string)
+        (log-edit-done)
+        (should (equal (buffer-string) wanted))))))
+
+(ert-deftest log-edit-done-strip-cvs-lines-non-cvs ()
+  ;; This test verifies that lines beginning with "CVS: " are not stripped
+  ;; from the commit message when log-edit-cvs-backend isn't CVS.
+  (let (string)
+    (setq string "summary line
+first line
+CVS: Please evaluate your changes and consider the following.
+CVS: Abort checkin if you answer no.
+")
+    (with-temp-buffer
+      (let ((log-edit-done-hook 'log-edit-done-strip-cvs-lines)
+            (log-edit-vc-backend nil))
+        (setq-local log-edit-callback #'(lambda () (interactive) nil))
+        (insert string)
+        (log-edit-done)
+        (should (equal (buffer-string) string))))))
+
 ;;; log-edit-tests.el ends here
-- 
2.47.1


--EVF5PPMfhYS0aIcm--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 9 Aug 2024 15:12:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 09 11:12:26 2024
Received: from localhost ([127.0.0.1]:38502 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1scRI1-0002Wl-P0
	for submit <at> debbugs.gnu.org; Fri, 09 Aug 2024 11:12:26 -0400
Received: from moe.eta.tal.de ([195.8.227.228]:42636 helo=moc.eta.tal.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bad@HIDDEN>) id 1scRHy-0002Wc-9t
 for 72341 <at> debbugs.gnu.org; Fri, 09 Aug 2024 11:12:24 -0400
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 645B48000C6A;
 Fri,  9 Aug 2024 17:11:51 +0200 (CEST)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 1552F918D4; Fri,  9 Aug 2024 17:11:51 +0200 (CEST)
Date: Fri, 9 Aug 2024 17:11:51 +0200
From: Christoph Badura <bad@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20240809151150.GV9440@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
 <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
 <864j83wfwd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <864j83wfwd.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: Dmitry Gutov <dmitry@HIDDEN>, 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sorry for the delay.

On Fri, Aug 02, 2024 at 10:19:30AM +0300, Eli Zaretskii wrote:
> > Date: Tue, 30 Jul 2024 16:35:29 +0300
> > Cc: 72341 <at> debbugs.gnu.org
> > From: Dmitry Gutov <dmitry@HIDDEN>
> > 
> > On 29/07/2024 15:34, Eli Zaretskii wrote:
> > > I'm unsure how to proceed with this.  My bother is that this is a
> > > definite change in behavior wrt what VC did until now.  Users of VC
> > > might be unaware of this removal, and could start some log lines with
> > > the prefix, which will mysteriously disappear from the log message.
> > > 
> > > Dmitry, WDYT?  Maybe we should add this removal guarded by a user
> > > option, by default off?  Or maybe we can identify where the template
> > > starts and ends, and only remove in that region?
> > 
> > If we do this, we'd only remove the lines starting with "CVS:". We could 
> > also add special syntax highlighting for them. That would probably be 
> > enough.
> Agreed.

I'm afraid my emacs-fu isn't strong enough for that.

> > Then vc-cvs-checkin would additionally process the commit message string 
> > returned by log-edit-extract-headers.
> > 
> > Note that it seems we only handle "templates" for CVS and RCS, so there 
> > is no prior art for implementing this feature.
> 
> Right.  Patches welcome to implement this.

Cool.  I'll get back to this.  But probably not this month.  I'm extremly
busy right now.

--chris




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 2 Aug 2024 07:20:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 02 03:20:14 2024
Received: from localhost ([127.0.0.1]:52228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sZmaD-0007FB-S9
	for submit <at> debbugs.gnu.org; Fri, 02 Aug 2024 03:20:14 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60920)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sZmaC-0007Eu-19
 for 72341 <at> debbugs.gnu.org; Fri, 02 Aug 2024 03:20:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sZmZm-0000fa-Ti; Fri, 02 Aug 2024 03:19:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=RvaUcEhPF1m9NgmKo3unlPliACAPt7Bw7pBPQkEFsG8=; b=mIQx1+zpFrF+
 /DIwBMuXrXG5taSD/53ZtNEi4cQ3Zu8+DllDQHXrv7Z+MgudhqndIzTt3TPLZdaatxZPCYVkpol9f
 f5DGXf233YxjbSsv3/K1J9nt59CNWRKMy7pApmLUG+4+p8TqK38N3p5+apSPjNoYlG1xaznFl+gQR
 VxIU5XcLJ1dAxLw/PN+SndRjXunDVFFusPVghtO/0tKRZ+LgW4aaCs03KrxtEhK9BiN0MA2hhqMGW
 6aTxEnzVknZ5cd2JKwN/uafZBxbeV6ohD6FQo7h8FfoDfMxLDmWDC3sxZArVtDYF49c4RZkSrQt5I
 Dwk3ogl4YPY5toyuXWr2Fw==;
Date: Fri, 02 Aug 2024 10:19:30 +0300
Message-Id: <864j83wfwd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN> (message from
 Dmitry Gutov on Tue, 30 Jul 2024 16:35:29 +0300)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN> <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: bad@HIDDEN, 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 30 Jul 2024 16:35:29 +0300
> Cc: 72341 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> On 29/07/2024 15:34, Eli Zaretskii wrote:
> > I'm unsure how to proceed with this.  My bother is that this is a
> > definite change in behavior wrt what VC did until now.  Users of VC
> > might be unaware of this removal, and could start some log lines with
> > the prefix, which will mysteriously disappear from the log message.
> > 
> > Dmitry, WDYT?  Maybe we should add this removal guarded by a user
> > option, by default off?  Or maybe we can identify where the template
> > starts and ends, and only remove in that region?
> 
> If we do this, we'd only remove the lines starting with "CVS:". We could 
> also add special syntax highlighting for them. That would probably be 
> enough.

Agreed.

> Then vc-cvs-checkin would additionally process the commit message string 
> returned by log-edit-extract-headers.
> 
> Note that it seems we only handle "templates" for CVS and RCS, so there 
> is no prior art for implementing this feature.

Right.  Patches welcome to implement this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 30 Jul 2024 13:47:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 30 09:47:35 2024
Received: from localhost ([127.0.0.1]:47174 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sYnCJ-0005fj-9B
	for submit <at> debbugs.gnu.org; Tue, 30 Jul 2024 09:47:35 -0400
Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:58713)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sYnBt-0005ej-PO
 for 72341 <at> debbugs.gnu.org; Tue, 30 Jul 2024 09:47:23 -0400
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailfout.nyi.internal (Postfix) with ESMTP id 1F1DA1380625;
 Tue, 30 Jul 2024 09:35:33 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Tue, 30 Jul 2024 09:35:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1722346533;
 x=1722432933; bh=HDxG3fs21qCzJDQTlhYPIvLzX6ZzqqyvM9tCTO5ck9A=; b=
 f8nX1dIZdDUmTmN7x1HFlRApqAXRfq20IPOBQzywwtGy4Fz1Z6lg8Tu+7Qvn64KF
 fj6MeifBiNr6YHsyptF4n6J1ThzeWhYHZUvui5l9keTiH20ZK3UJ8y1PiGgQb/Py
 og7yqy99zVI3xF/UFeFspiwQJ9OjQ8fgFniPZW83ZwAJpJnbJfqSjrnayM7KrKvb
 vNyZwHRdDRKXZgpO2gczB5yBqzL2zwQUdmo+7/otS7OJkhHUE5JRCVBVH6IEdxMZ
 89vvXEn5cMbadLOI3A1EiA6ahT8cNV3LGt8H5yxLxRXtFATF3vS1r/bwLnypVnJB
 hE4OGNRAdiPRbpNr1EUcsA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722346533; x=
 1722432933; bh=HDxG3fs21qCzJDQTlhYPIvLzX6ZzqqyvM9tCTO5ck9A=; b=s
 eNXocGbzyiqT6kI0n9dhrZ+N/GamX4D9rURcaWLjiFpjOSTC3NBhmrgRGfI6pxx1
 S9B5TRaG3Y70AEo/t0gB7ZB/joLQ/ZQK7HQjg9Bqzz0Vzx35DoAGTdS4VIqj8sl7
 zlOU4A4pMBGJf94IcFzVPwa1pMXTx3RzXsP5XoTzzvZYQJ+xMqglyATBdq8S7wYN
 +O8taseWWAyZDGPEyTTb2d0ZFvNcp+sX6jkhub3kAyWbdDltbIQoZ7jfiUqY8jOZ
 kM4i0OvDMKclA0zdXHSGsJWl9S7HaDCG3EPYfYnA7mfS66sIXPnJHl1Yw/4+nhGu
 NxBbW1LqCObtCwihi0zBw==
X-ME-Sender: <xms:JOyoZnEJvZ93RhzFeSWgd1Rav89rrBhVZ3gzCJcgSpXkMTsc3VxhmQ>
 <xme:JOyoZkWnGtQUjj7figXo58bBDtsJHbdFncVZAZk2i8lKMEy3h9L6DPP-FbgTNotuZ
 9DsictNxRptSRSDllI>
X-ME-Received: <xmr:JOyoZpKOnULsOAF3Po1Ib5ARZ0yNilo_TWgG_3xuZYjk5zsVGkbhshEadnUpLQ0f_JMp>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeeggdeijecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht
 rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth
 gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej
 heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh
 hithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtoheptd
X-ME-Proxy: <xmx:JOyoZlFMqDrUE_LPsWNTJYndTowEDGNo_8Agkwd3xF-0g48b0-0iwA>
 <xmx:JOyoZtUIKQNImFNHm1cB72V0iNstSTeohVReInl1Y8G9wkL1siogNw>
 <xmx:JOyoZgO9qpFEFEAFKOdZ_6FmDXT1JN9g5sMUAPOSVTlgIBV5qZZNsQ>
 <xmx:JOyoZs295LYN4Ctu3RnnwOpDSw-J00L4qWH1EEvmcAO4bKKVkwGWEQ>
 <xmx:JeyoZgSgfuaylHnvFz_ma2fOO1NtbGA_zcbAGVd4Ta7IznsFRU9sQlaQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 30 Jul 2024 09:35:31 -0400 (EDT)
Message-ID: <a800a1ea-019e-4397-945f-ee099a5d3982@HIDDEN>
Date: Tue, 30 Jul 2024 16:35:29 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
To: Eli Zaretskii <eliz@HIDDEN>, Christoph Badura <bad@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
 <20240729095312.GZ9440@HIDDEN>
 <86a5i0z89z.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86a5i0z89z.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 29/07/2024 15:34, Eli Zaretskii wrote:
> I'm unsure how to proceed with this.  My bother is that this is a
> definite change in behavior wrt what VC did until now.  Users of VC
> might be unaware of this removal, and could start some log lines with
> the prefix, which will mysteriously disappear from the log message.
> 
> Dmitry, WDYT?  Maybe we should add this removal guarded by a user
> option, by default off?  Or maybe we can identify where the template
> starts and ends, and only remove in that region?

If we do this, we'd only remove the lines starting with "CVS:". We could 
also add special syntax highlighting for them. That would probably be 
enough.

Then vc-cvs-checkin would additionally process the commit message string 
returned by log-edit-extract-headers.

Note that it seems we only handle "templates" for CVS and RCS, so there 
is no prior art for implementing this feature.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 29 Jul 2024 15:03:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 29 11:03:06 2024
Received: from localhost ([127.0.0.1]:46153 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sYRtx-0006Us-Pc
	for submit <at> debbugs.gnu.org; Mon, 29 Jul 2024 11:03:06 -0400
Received: from moe.eta.tal.de ([195.8.227.228]:36520 helo=moc.eta.tal.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bad@HIDDEN>) id 1sYRtv-0006Uj-Fg
 for 72341 <at> debbugs.gnu.org; Mon, 29 Jul 2024 11:03:04 -0400
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id CA2B68015B2E;
 Mon, 29 Jul 2024 17:02:48 +0200 (CEST)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 70B46918D2; Mon, 29 Jul 2024 17:02:48 +0200 (CEST)
Date: Mon, 29 Jul 2024 17:02:48 +0200
From: Christoph Badura <bad@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20240729150248.GA9440@HIDDEN>
References: <86a5i0z89z.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86a5i0z89z.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: Dmitry Gutov <dmitry@HIDDEN>, 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, Jul 29, 2024 at 03:34:32PM +0300, Eli Zaretskii wrote:
> > Date: Mon, 29 Jul 2024 11:53:13 +0200
> > From: Christoph Badura <bad@HIDDEN>
> > Cc: 72341 <at> debbugs.gnu.org
> > 
> > On Mon, Jul 29, 2024 at 05:26:50AM +0300, Eli Zaretskii wrote:
> > > Somewhat clearer, thanks.  I don't see this stripping feature
> > > documented in the CVS manual; did I miss something?
> > 
> > I didn't see it documented either.  The closest thing that comes to
> > documentation of that feature is the documentation for rcsinfo:
> > https://www.gnu.org/software/trans-coord/manual/cvs/html_node/rcsinfo.html#rcsinfo
> 
> This says nothing about the "CVS: " prefix, AFAICT.
> 
> > It is implemented in src/logmsg.c:do_editor().
> > 
> > > And one more questions: where do those "CVS:" lines come from when you
> > > use the template file?
> > 
> > They have to be be in the template file.
> > 
> > I figure the idea is that the template files can contain "mandatory" text
> > that will be part of the actuall log message and "explanatory" text,
> > prefixed with "CVS: ", that will be stripped after the commit message has
> > been edited.
> > 
> > As an example, here's the default template for the NetBSD repositories:
> > ----------------8<------------------8<------------------8<-----------------
> > CVS: ----------------------------------------------------------------------
> > CVS: CVSROOT  cvs.NetBSD.org:/cvsroot
> > CVS: please use "PR category/123" to have the commitmsg appended to PR 123
> > ----------------8<------------------8<------------------8<-----------------
> > 
> > I'm only aware of the NetBSD and pkgsrc repositories that make use of CVS
> > templates.  And their template files contain only lines prefixed with
> > "CVS: ".
> 
> I think I see what's happening.  This is basically an undocumented
> feature.  The removal of "CVS: " lines is there for when CVS itself
> invokes the editor: in that case, it injects instructions into the
> temporary file that it submits to the editor, and those instructions
> all start with "CVS: ", so that they could be later removed.  IOW,
> this prefix is basically an agreement between CVS and itself.
> 
> Now, nothing in the documentation of CVS/Template file says anything
> about "CVS: ", but the code processes the temporary file, which
> includes the template, the same as it processes the lines injected by
> CVS, and thus every line that begins with "CVS: " in the template will
> be removed.
> 
> IOW, NetBSD piggy-backs this feature to include their own instructions
> in the template.

That pretty much sums it up.

However, while this behaviour isn't mentioned in the documentation, it is
mentioned in every commit message file that cvs creates when it invokes an
editor.  E.g.:

CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS: 
CVS: Committing in .
CVS: 
CVS: Modified Files:
CVS: 	test.txt 
CVS: ----------------------------------------------------------------------

I have to admit, that after 30+ years of using cvs outside of emacs, my
brain filters out that bit of the commit message.  Anyway, it's clearly
advertised even if it isn't documented in the manual.

Note though, that when cvs invokes an editor itself to enter the commit
message, it is impossible to disable this behaviour.  That is, lines
starting with "CVS: " are always removed.

> I'm unsure how to proceed with this.  My bother is that this is a
> definite change in behavior wrt what VC did until now.  Users of VC
> might be unaware of this removal, and could start some log lines with
> the prefix, which will mysteriously disappear from the log message.

I've thought about that.  Clearly it is a change in behaviour.  The
interesting question is, will users notice?

My experience with this is that when I took up using emacs again after a
very long hiatus this behaviour of VC tripped me up on my first commit.
That was very annyoing indeed.  A friend suggested to M-x erase-buffer on
every commit.  Obviously he wasn't aware of that C-w would have the
desired effect.  Neither did I.  And that is not documented in the manual.

This was enough of a bother to not use VC again until this weekend and
then dig into why that is happending and not when I use "cvs ci file"
outside emacs (and have it invoke emacsclient).

If you work in an environment where other uses are using cvs outside of
emacs VC, the only way to have lines starting with "CVS: " in the stored
commit message is to require that the other users use "cvs ci -m" or
prepare a commit message separately in a file and use "cvs ci -F".
Frankly, a policy that requires stored commit messages containing lines
starting with "CVS: " is not practical.

Would VC users notice the change in behaviour?  I'd say they are
already using erase-buffer or C-w to clear the cvs template lines.  Or
they dug into the code and created a log-edit-done-hook similar to what
I proposed.  And they can continue to do so with no change to observed
behaviour.

And how many users that would be affected are there anyway?  I think it is
likely that there are very few or you would have got complaints in the
last decades.

Anyway, IMHO it is fine to add such a hook function by default to
log-edit-done-hook.  People could customize it away if it really
interferes with their work.

It's also not a big deal to fix up the commit messages with "cvs admin".
I'd imagine people would notice quickly.

--chris




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 29 Jul 2024 12:34:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 29 08:34:57 2024
Received: from localhost ([127.0.0.1]:45092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sYPaa-0002ZY-M0
	for submit <at> debbugs.gnu.org; Mon, 29 Jul 2024 08:34:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48274)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sYPaY-0002ZJ-LS
 for 72341 <at> debbugs.gnu.org; Mon, 29 Jul 2024 08:34:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sYPaF-0001iY-EV; Mon, 29 Jul 2024 08:34:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Z0MqecO10mXB23HV1ExkHBb1yPgEwTFrNRfL21ZyvKU=; b=ftABTdE5/rHo
 Bnw0mzeA5C3mz4P2E3r3wov/pq8Djhn7Nzghtf6StZ2p1qB5YIvMow4KmHXROJJlNUEDmXhiUaAqo
 63vQLNgsVjXJkoU3RuWZDOsFYCOvCahmxLBUjwXhvpwHFlIRbLbUHIJ3ha1XKlHRz2FV35RufGQIt
 +9hnHJHA1TzmvBW3o/1XLBRFcRCFMO28B7DcKvinVNesaCp+ZZHjpOO4+SVsqX33PWX46xk2XdXf2
 FFoTmWcBAYxL0Zxyb3bY2iw/JrzCLcOc6g4ak+Wk6ipUFE/YbWwFnlvlsb0Gqbd3Wly8830rwseQT
 kK1BE8s4p0B8nGSveX0scA==;
Date: Mon, 29 Jul 2024 15:34:32 +0300
Message-Id: <86a5i0z89z.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <20240729095312.GZ9440@HIDDEN> (message
 from Christoph Badura on Mon, 29 Jul 2024 11:53:13 +0200)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN> <20240729095312.GZ9440@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 29 Jul 2024 11:53:13 +0200
> From: Christoph Badura <bad@HIDDEN>
> Cc: 72341 <at> debbugs.gnu.org
> 
> On Mon, Jul 29, 2024 at 05:26:50AM +0300, Eli Zaretskii wrote:
> > Somewhat clearer, thanks.  I don't see this stripping feature
> > documented in the CVS manual; did I miss something?
> 
> I didn't see it documented either.  The closest thing that comes to
> documentation of that feature is the documentation for rcsinfo:
> https://www.gnu.org/software/trans-coord/manual/cvs/html_node/rcsinfo.html#rcsinfo

This says nothing about the "CVS: " prefix, AFAICT.

> It is implemented in src/logmsg.c:do_editor().
> 
> > And one more questions: where do those "CVS:" lines come from when you
> > use the template file?
> 
> They have to be be in the template file.
> 
> I figure the idea is that the template files can contain "mandatory" text
> that will be part of the actuall log message and "explanatory" text,
> prefixed with "CVS: ", that will be stripped after the commit message has
> been edited.
> 
> As an example, here's the default template for the NetBSD repositories:
> ----------------8<------------------8<------------------8<-----------------
> CVS: ----------------------------------------------------------------------
> CVS: CVSROOT  cvs.NetBSD.org:/cvsroot
> CVS: please use "PR category/123" to have the commitmsg appended to PR 123
> ----------------8<------------------8<------------------8<-----------------
> 
> I'm only aware of the NetBSD and pkgsrc repositories that make use of CVS
> templates.  And their template files contain only lines prefixed with
> "CVS: ".

I think I see what's happening.  This is basically an undocumented
feature.  The removal of "CVS: " lines is there for when CVS itself
invokes the editor: in that case, it injects instructions into the
temporary file that it submits to the editor, and those instructions
all start with "CVS: ", so that they could be later removed.  IOW,
this prefix is basically an agreement between CVS and itself.

Now, nothing in the documentation of CVS/Template file says anything
about "CVS: ", but the code processes the temporary file, which
includes the template, the same as it processes the lines injected by
CVS, and thus every line that begins with "CVS: " in the template will
be removed.

IOW, NetBSD piggy-backs this feature to include their own instructions
in the template.

I'm unsure how to proceed with this.  My bother is that this is a
definite change in behavior wrt what VC did until now.  Users of VC
might be unaware of this removal, and could start some log lines with
the prefix, which will mysteriously disappear from the log message.

Dmitry, WDYT?  Maybe we should add this removal guarded by a user
option, by default off?  Or maybe we can identify where the template
starts and ends, and only remove in that region?

> Off topic and speaking of documentation.
> I noticed that
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Log-Buffer.html
> doesn't document C-c C-k and doesn't explain how the region is set up so
> that an initial C-w will kill from point to the end of the buffer.  log-edit's
> documentation is also not correct with regard to this (i.e. the entire log
> buffer isn't emptied as point is after the Summary: header).
> 
> Is that worth reporting separately?

Yes, probably.  IMO, documenting "C-c C-k" should be accompanied with
the description of log-edit-comment-ring and its usage, otherwise the
command will not make sense to the users.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 29 Jul 2024 09:53:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 29 05:53:30 2024
Received: from localhost ([127.0.0.1]:44881 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sYN4M-0006wX-AI
	for submit <at> debbugs.gnu.org; Mon, 29 Jul 2024 05:53:30 -0400
Received: from moe.eta.tal.de ([195.8.227.228]:58438 helo=moc.eta.tal.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bad@HIDDEN>) id 1sYN4K-0006wO-A5
 for 72341 <at> debbugs.gnu.org; Mon, 29 Jul 2024 05:53:29 -0400
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 0A3CD8015748;
 Mon, 29 Jul 2024 11:53:13 +0200 (CEST)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 67034918D3; Mon, 29 Jul 2024 11:53:13 +0200 (CEST)
Date: Mon, 29 Jul 2024 11:53:13 +0200
From: Christoph Badura <bad@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20240729095312.GZ9440@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
 <20240728192115.GY9440@HIDDEN>
 <86le1lylud.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86le1lylud.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, Jul 29, 2024 at 05:26:50AM +0300, Eli Zaretskii wrote:
> Somewhat clearer, thanks.  I don't see this stripping feature
> documented in the CVS manual; did I miss something?

I didn't see it documented either.  The closest thing that comes to
documentation of that feature is the documentation for rcsinfo:
https://www.gnu.org/software/trans-coord/manual/cvs/html_node/rcsinfo.html#rcsinfo

It is implemented in src/logmsg.c:do_editor().

> And one more questions: where do those "CVS:" lines come from when you
> use the template file?

They have to be be in the template file.

I figure the idea is that the template files can contain "mandatory" text
that will be part of the actuall log message and "explanatory" text,
prefixed with "CVS: ", that will be stripped after the commit message has
been edited.

As an example, here's the default template for the NetBSD repositories:
----------------8<------------------8<------------------8<-----------------
CVS: ----------------------------------------------------------------------
CVS: CVSROOT  cvs.NetBSD.org:/cvsroot
CVS: please use "PR category/123" to have the commitmsg appended to PR 123
----------------8<------------------8<------------------8<-----------------

I'm only aware of the NetBSD and pkgsrc repositories that make use of CVS
templates.  And their template files contain only lines prefixed with
"CVS: ".

Off topic and speaking of documentation.
I noticed that
https://www.gnu.org/software/emacs/manual/html_node/emacs/Log-Buffer.html
doesn't document C-c C-k and doesn't explain how the region is set up so
that an initial C-w will kill from point to the end of the buffer.  log-edit's
documentation is also not correct with regard to this (i.e. the entire log
buffer isn't emptied as point is after the Summary: header).

Is that worth reporting separately?

--chris




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 29 Jul 2024 02:29:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 28 22:29:24 2024
Received: from localhost ([127.0.0.1]:44667 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sYG8a-0003fn-6C
	for submit <at> debbugs.gnu.org; Sun, 28 Jul 2024 22:29:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sYG8X-0003fa-EC
 for 72341 <at> debbugs.gnu.org; Sun, 28 Jul 2024 22:29:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sYG68-00078t-OL; Sun, 28 Jul 2024 22:26:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=DiadtvkgofJJv0qqM/7HewNqp6+aWjldefgYJzRsjW0=; b=HXhE3P6X9r/B
 1VmBSMhFB1MSRNua327cBQfjTDIJaWp7vAclApEczPoWYSzGVmYXLuy31OCC4vrb8or4DpU30ron7
 YeluSA8LoCAkwsjWDpzlH0akI1kGw97OIty/22q1Azz6o2Zqq22zWxxzbkMWH5Ponr/lgWv6l+djJ
 V5gF4S14lTseFWn6HjQBF8JNAiv8Xt6i+RKpFtyBbtQCJunQ53qvWjseV/vEpKyTEfqXJpCZNgEqG
 qDs+RYNz36oSVCKFzhOx54Q1NUj1Y1uYTuNQCYC1dgVZJMuUht6qvnpOQ2VqJTR8PDnATik7jCf9e
 PzhCN6iaV2QD9QTqAf1BuA==;
Date: Mon, 29 Jul 2024 05:26:50 +0300
Message-Id: <86le1lylud.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>
In-Reply-To: <20240728192115.GY9440@HIDDEN> (message
 from Christoph Badura on Sun, 28 Jul 2024 21:21:15 +0200)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN> <20240728192115.GY9440@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 28 Jul 2024 21:21:15 +0200
> From: Christoph Badura <bad@HIDDEN>
> 
> CVS only adds the template file and later strips the "CVS: " lines if
> you actually edit the commit message in an editor (which is invoked by
> cvs).  I.e. if you do not pass a commit message via "cvs ci -m'message'"
> or "cvs ci -F messagefile".
> 
> > If "cvs ci -m" doesn't strip the "CVS: " lines, then when and how does
> > the stripping you describe at the beginning happens?  And what does
> > the last part of the last sentence above, about the template file
> > being loaded when CVS invokes an editor, has to do with this issue?
> 
> When invoked as "cvs ci -m" (or "cvs ci -F") cvs uses the commit message
> *as is*.  With either option, cvs itself doesn't add the template file to
> the commit message and hence doesn't have to do any stripping.
> 
> log-edit-insert-cvs-template adds the CVS template file to the commit
> message outside of cvs.  Therefore log-edit has to strip the "CVS: " lines
> outside of cvs too.
> 
> Is that clearer?

Somewhat clearer, thanks.  I don't see this stripping feature
documented in the CVS manual; did I miss something?

And one more questions: where do those "CVS:" lines come from when you
use the template file?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 28 Jul 2024 19:48:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 28 15:48:47 2024
Received: from localhost ([127.0.0.1]:44369 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sY9st-00025n-3d
	for submit <at> debbugs.gnu.org; Sun, 28 Jul 2024 15:48:47 -0400
Received: from moe.eta.tal.de ([195.8.227.228]:59286 helo=moc.eta.tal.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bad@HIDDEN>) id 1sY9sq-00025c-Bj
 for 72341 <at> debbugs.gnu.org; Sun, 28 Jul 2024 15:48:45 -0400
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id F0E1D8000C65
 for <72341 <at> debbugs.gnu.org>; Sun, 28 Jul 2024 21:48:30 +0200 (CEST)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id B5F35918B6; Sun, 28 Jul 2024 21:48:30 +0200 (CEST)
Date: Sun, 28 Jul 2024 21:48:30 +0200
From: Christoph Badura <bad@HIDDEN>
To: 72341 <at> debbugs.gnu.org
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
Message-ID: <20240728194830.GB19989@HIDDEN>
References: <20240728123256.GW9440@HIDDEN>
 <86plqxz9t0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86plqxz9t0.fsf@HIDDEN>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72341
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Resending the message, because debbugs.gnu.org wasn't cc'ed on the
original reply.

On Sun, Jul 28, 2024 at 08:49:15PM +0300, Eli Zaretskii wrote:
> I'm confused by your description.  At the beginning you say:
> 
>   CVS strips all lines beginning with "CVS: " after editing the commit
>   message.
> 
> But later you say:
> 
>   However, the lines starting with "CVS: " aren't stripped out when
>   log-edit-done is called.  The change is then committed with
>   "cvs ci -m" which does not strip these line, as the template file is
>   only loaded when cvs invokes an editor to edit the commit message.

CVS only adds the template file and later strips the "CVS: " lines if
you actually edit the commit message in an editor (which is invoked by
cvs).  I.e. if you do not pass a commit message via "cvs ci -m'message'"
or "cvs ci -F messagefile".

> If "cvs ci -m" doesn't strip the "CVS: " lines, then when and how does
> the stripping you describe at the beginning happens?  And what does
> the last part of the last sentence above, about the template file
> being loaded when CVS invokes an editor, has to do with this issue?

When invoked as "cvs ci -m" (or "cvs ci -F") cvs uses the commit message
*as is*.  With either option, cvs itself doesn't add the template file to
the commit message and hence doesn't have to do any stripping.

log-edit-insert-cvs-template adds the CVS template file to the commit
message outside of cvs.  Therefore log-edit has to strip the "CVS: " lines
outside of cvs too.

Is that clearer?

--chris

--chris





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at 72341 <at> debbugs.gnu.org:


Received: (at 72341) by debbugs.gnu.org; 28 Jul 2024 17:49:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 28 13:49:38 2024
Received: from localhost ([127.0.0.1]:44332 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sY81Z-0007dG-Mc
	for submit <at> debbugs.gnu.org; Sun, 28 Jul 2024 13:49:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36216)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sY81Y-0007d4-9z
 for 72341 <at> debbugs.gnu.org; Sun, 28 Jul 2024 13:49:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sY81G-0006Vx-CZ; Sun, 28 Jul 2024 13:49:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=alUaeP0P6CYj0kXdxRg9Uc+zYyKbZb9YIgnj5JNalqM=; b=nHp2mSBn53Ti
 Rpn9/SaHu/N1+A14syjRBWq8gBCfIotrTJfythJg433IrMaanR9r4bFuCia1oAXflyQOLamiFk3Jg
 D5jcOV2JtKHxNEjuX2VzlMXBiiMxQmdsoo4ttAumfTBych6x5o61fi2I7b8U9V2CKkaJ3LKw98yDP
 RsSMIj6xhXtcEAON8EAtN9A+jnspNks4mUI/zDA4kn5wZabfLeh9bMIVaY9VttY8qbAvZ4gdHfyk8
 uN+YWvYlsX1emnaM4Bz4rRFpgP3G/7WHGK4pe93CbBuLmo/37ojm3qRxRXw/fhugxh0szZb5DQ68d
 hXGHMVCp2fdN86LxzPEzfA==;
Date: Sun, 28 Jul 2024 20:49:15 +0300
Message-Id: <86plqxz9t0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christoph Badura <bad@HIDDEN>
In-Reply-To: <20240728123256.GW9440@HIDDEN> (message
 from Christoph Badura on Sun, 28 Jul 2024 14:32:57 +0200)
Subject: Re: bug#72341: VC: CVS template lines not stripped when committing
References: <20240728123256.GW9440@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72341
Cc: 72341 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 28 Jul 2024 14:32:57 +0200
> From: Christoph Badura <bad@HIDDEN>
> 
> CVS strips all lines beginning with "CVS: " after editing the commit
> message.  This is not done when using VC.
> 
> Specifically log-edit-hook's default includes log-edit-insert-cvs-template
> causing the CVS/Template file to be inserted.  However, the lines starting
> with "CVS: " aren't stripped out when log-edit-done is called.  The change
> is then committed with "cvs ci -m" which does not strip these line, as the
> template file is only loaded when cvs invokes an editor to edit the commit
> message.
> 
> This behaviour is very annoying when working in a project that makes use of
> CVS templates (e.g. NetBSD).  It would be nice, if VC behaved by default
> like CVS does.

I'm confused by your description.  At the beginning you say:

  CVS strips all lines beginning with "CVS: " after editing the commit
  message.

But later you say:

  However, the lines starting with "CVS: " aren't stripped out when
  log-edit-done is called.  The change is then committed with
  "cvs ci -m" which does not strip these line, as the template file is
  only loaded when cvs invokes an editor to edit the commit message.

If "cvs ci -m" doesn't strip the "CVS: " lines, then when and how does
the stripping you describe at the beginning happens?  And what does
the last part of the last sentence above, about the template file
being loaded when CVS invokes an editor, has to do with this issue?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Jul 2024 16:35:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 28 12:35:13 2024
Received: from localhost ([127.0.0.1]:44307 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sY6rX-0005hR-Jv
	for submit <at> debbugs.gnu.org; Sun, 28 Jul 2024 12:35:13 -0400
Received: from lists.gnu.org ([209.51.188.17]:39190)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bad@HIDDEN>) id 1sY362-0007Sj-Pe
 for submit <at> debbugs.gnu.org; Sun, 28 Jul 2024 08:33:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bad@HIDDEN>) id 1sY35n-0005za-Kr
 for bug-gnu-emacs@HIDDEN; Sun, 28 Jul 2024 08:33:41 -0400
Received: from moe.eta.tal.de ([195.8.227.228] helo=moc.eta.tal.de)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bad@HIDDEN>) id 1sY35h-00009L-Jq
 for bug-gnu-emacs@HIDDEN; Sun, 28 Jul 2024 08:33:37 -0400
Received: from irregular-apocalypse.k.bsd.de (unknown [82.139.197.224])
 by smtp.tal.de (Postfix) with ESMTP id 8DDD68015801
 for <bug-gnu-emacs@HIDDEN>; Sun, 28 Jul 2024 14:32:57 +0200 (CEST)
Received: by irregular-apocalypse.k.bsd.de (Postfix, from userid 201)
 id 3488F918D2; Sun, 28 Jul 2024 14:32:57 +0200 (CEST)
Date: Sun, 28 Jul 2024 14:32:57 +0200
From: Christoph Badura <bad@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: VC: CVS template lines not stripped when committing
Message-ID: <20240728123256.GW9440@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.20 (2009-06-14)
Received-SPF: pass client-ip=195.8.227.228; envelope-from=bad@HIDDEN;
 helo=moc.eta.tal.de
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 28 Jul 2024 12:35:04 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

CVS strips all lines beginning with "CVS: " after editing the commit
message.  This is not done when using VC.

Specifically log-edit-hook's default includes log-edit-insert-cvs-template
causing the CVS/Template file to be inserted.  However, the lines starting
with "CVS: " aren't stripped out when log-edit-done is called.  The change
is then committed with "cvs ci -m" which does not strip these line, as the
template file is only loaded when cvs invokes an editor to edit the commit
message.

This behaviour is very annoying when working in a project that makes use of
CVS templates (e.g. NetBSD).  It would be nice, if VC behaved by default
like CVS does.

I guess on could work around this be defining a log-editdone-hook like
this:

(defun my/log-edit-done-strip-cvs-lines ()
  "Strip lines beginning with \"CVS: \" from commit log message."
  (let ((search-upper-case nil))
    (goto-char (point-min))
    (flush-lines "^CVS: ")))

Not sure that's right, though.

I've looked at the latest version of log-mode.el in emacs git and the
behaviour doesn't seem to have changed.

In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo
version 1.16.0)
 of 2024-06-25, modified by Debian built on x86-conova-01 Windowing system
distributor 'The X.Org Foundation', version 11.0.12101006 System
Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/libexec localstatedir=/var/lib
 ----infodir=/usr/share/info mandir=/usr/share/man --with-libsystemd
 ----with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils with-native-compilation
 ----build x86_64-linux-gnu --prefix=/usr sharedstatedir=/var/lib
 ----libexecdir=/usr/libexec localstatedir=/var/lib
 ----infodir=/usr/share/info mandir=/usr/share/man --with-libsystemd
 ----with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils with-native-compilation
 ----with-cairo --with-x=yes with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 --'CFLAGS=-g -O2
 -ffile-prefix-map=/build/reproducible-path/emacs-28.2+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM
GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2
M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_CTYPE: C.utf8 value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  paredit-mode: t global-company-mode: t company-mode: t persp-mode: t
  editorconfig-mode: t direnv-mode: t savehist-mode: t save-place-mode: t
  ido-everywhere: t override-global-mode: t tooltip-mode: t
  global-eldoc-mode: t eldoc-mode: t show-paren-mode: t
  electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t
  global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t
  auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t
  line-number-mode: t indent-tabs-mode: t transient-mark-mode: t

Load-path shadows: /usr/share/emacs/site-lisp/elpa/htmlize-1.56/htmlize-pkg
hides /usr/share/emacs/site-lisp/elpa-src/htmlize-1.56/htmlize-pkg
/usr/share/emacs/site-lisp/elpa/htmlize-1.56/htmlize-autoloads hides
/usr/share/emacs/site-lisp/elpa-src/htmlize-1.56/htmlize-autoloads
/usr/share/emacs/site-lisp/elpa/htmlize-1.56/htmlize hides
/usr/share/emacs/site-lisp/elpa-src/htmlize-1.56/htmlize
/home/bad/.emacs.d/elpa/transient-20240311.1638/transient hides
/usr/share/emacs/28.2/lisp/transient /home/bad/.emacs.d/elpa/seq-2.24/seq
hides /usr/share/emacs/28.2/lisp/emacs-lisp/seq

Features: (shadow sort mail-extr emacsbug message rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
macrostep-c cmacexp macrostep NetBSD cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs dired-aux dired
dired-loaddefs vc-git paredit cus-start company-oddmuse company-keywords
company-etags etags fileloop generator xref company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template company-bbdb
company server dim init-tex init-markdown persp-mode finder-inf init-python
init-scheme init-erc erc-goodies erc erc-backend iso8601 time-date thingatpt
erc-loaddefs init-jabber init-circe init-yaml init-jsonnet init-json
init-golang reformatter project comp comp-cstr warnings editorconfig
editorconfig-core editorconfig-core-handle editorconfig-fnmatch rg files-x
vc vc-dispatcher rg-info-hack rg-menu transient seq seq-25 loadhist
format-spec compat compat-29 rg-ibuffer rg-result wgrep-rg wgrep rg-history
rg-header ibuf-ext ibuffer ibuffer-loaddefs grep compile
text-property-search comint ansi-color ring cus-edit pp wid-edit
init-flyspell advice direnv diff-mode dash better-defaults savehist
saveplace ido init-company diminish cl-extra help-mode use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core desktop frameset
cus-load tex-site rx edmacro kmacro pcase slime-autoloads info package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x
map url-vars byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded
nadvice button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo move-toolbar
gtk x-toolkit x multi-tty make-network-process native-compile emacs)

Memory information: ((conses 16 555286 88165)
 (symbols 48 28058 4) (strings 32 169614 14216) (string-bytes 1 4737597)
 (vectors 16 48599) (vector-slots 8 844310 114128) (floats 8 120 281)
 (intervals 56 726 187) (buffers 992 16))




Acknowledgement sent to Christoph Badura <bad@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#72341; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 18 Feb 2025 19:30:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.