From unknown Fri Aug 15 16:19:48 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#3571 <3571@debbugs.gnu.org> To: bug#3571 <3571@debbugs.gnu.org> Subject: Status: 23.0.94; log-edit-insert-changelog option for not stripping filename Reply-To: bug#3571 <3571@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:19:48 +0000 retitle 3571 23.0.94; log-edit-insert-changelog option for not stripping fi= lename reassign 3571 emacs submitter 3571 Magnus Henoch severity 3571 wishlist tag 3571 patch thanks From magnus@erlang-consulting.com Mon Jun 15 04:41:30 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Jun 2009 11:41:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.0 required=4.0 tests=AWL,GMAIL,IMPRONONCABLE_2, MURPHY_DRUGS_REL8,PUSSY autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5FBfP9C011323 for ; Mon, 15 Jun 2009 04:41:26 -0700 Received: from mail.gnu.org ([199.232.76.166]:35790 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MGAZ2-0004gK-TN for emacs-pretest-bug@gnu.org; Mon, 15 Jun 2009 07:41:24 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MGAZ1-0002qh-Iv for emacs-pretest-bug@gnu.org; Mon, 15 Jun 2009 07:41:24 -0400 Received: from zimbra.erlangsystems.com ([88.208.247.62]:48493) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGAZ1-0002qZ-22 for emacs-pretest-bug@gnu.org; Mon, 15 Jun 2009 07:41:23 -0400 Received: from linux-b2a3.site (host213-123-170-251.in-addr.btopenworld.com [213.123.170.251]) by zimbra.erlangsystems.com (Postfix) with ESMTP id E8871135A2F9 for ; Mon, 15 Jun 2009 12:41:21 +0100 (BST) From: Magnus Henoch To: emacs-pretest-bug@gnu.org Subject: 23.0.94; log-edit-insert-changelog option for not stripping filename X-Hashcash: 1:25:090615:emacs-pretest-bug@gnu.org::O6pwesIV08fvP2JI:000000000000000000000000000000000001ZlM6 Date: Mon, 15 Jun 2009 12:41:21 +0100 Message-ID: <84bpop4tcu.fsf@linux-b2a3.site> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) --=-=-= Severity: wishlist Tags: patch I have grown into the habit of writing ChangeLog entries while writing code, and then using them for the commit message when I commit, pressing C-c C-a in the log buffer. This works great, except when I'm committing a single file. In that case, log-edit strips the file name from the changelog entry, but as the version control systems I use are changeset-based rather than file-based, I would like the file name to stay. I've been using the attached patch for a while with good results. Magnus --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002--log-edit.el-log-edit-strip-single-file-name-New.patch >From 0bccc332a7e04f68d47f2b66bd6e0d425c4389c8 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Wed, 27 May 2009 17:19:13 +0100 Subject: [PATCH] * log-edit.el (log-edit-strip-single-file-name): New variable. (log-edit-insert-changelog): Check its value. --- lisp/log-edit.el | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 4ca1372..7552e3c 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -148,6 +148,11 @@ can be obtained from `log-edit-files'." :type '(hook :options (log-edit-set-common-indentation log-edit-add-to-changelog))) +(defcustom log-edit-strip-single-file-name t + "If non-nil, remove file name from single-file log entries." + :group 'log-edit + :type 'boolean) + (defvar cvs-changelog-full-paragraphs t) (make-obsolete-variable 'cvs-changelog-full-paragraphs 'log-edit-changelog-full-paragraphs @@ -521,13 +526,14 @@ regardless of user name or time." (log-edit-insert-changelog-entries (log-edit-files))) (log-edit-set-common-indentation) (goto-char (point-min)) - (when (looking-at "\\*\\s-+") - (forward-line 1) - (when (not (re-search-forward "^\\*\\s-+" nil t)) - (goto-char (point-min)) - (skip-chars-forward "^():") - (skip-chars-forward ": ") - (delete-region (point-min) (point))))) + (when log-edit-strip-single-file-name + (when (looking-at "\\*\\s-+") + (forward-line 1) + (when (not (re-search-forward "^\\*\\s-+" nil t)) + (goto-char (point-min)) + (skip-chars-forward "^():") + (skip-chars-forward ": ") + (delete-region (point-min) (point)))))) ;;;; ;;;; functions for getting commit message from ChangeLog a file... -- 1.6.0.2 --=-=-=-- From monnier@iro.umontreal.ca Wed Aug 19 12:57:10 2009 Received: (at 3571-done) by emacsbugs.donarmstrong.com; 19 Aug 2009 19:57:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,PUSSY autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7JJv8bT009292 for <3571-done@emacsbugs.donarmstrong.com>; Wed, 19 Aug 2009 12:57:10 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0EAK/1i0pFpaKZ/2dsb2JhbACBUtVfhBoFh08 X-IronPort-AV: E=Sophos;i="4.43,410,1246852800"; d="scan'208";a="43811786" Received: from 69-165-162-153.dsl.teksavvy.com (HELO pastel.home) ([69.165.162.153]) by ironport2-out.teksavvy.com with ESMTP; 19 Aug 2009 15:56:26 -0400 Received: by pastel.home (Postfix, from userid 20848) id 4B4E182F0; Wed, 19 Aug 2009 15:57:03 -0400 (EDT) From: Stefan Monnier To: Magnus Henoch Subject: Re: bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename Message-ID: References: <84bpop4tcu.fsf@linux-b2a3.site> Date: Wed, 19 Aug 2009 15:57:03 -0400 In-Reply-To: <84bpop4tcu.fsf@linux-b2a3.site> (Magnus Henoch's message of "Mon, 15 Jun 2009 12:41:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I've been using the attached patch for a while with good results. Installed, Stefan From unknown Fri Aug 15 16:19:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Sep 2009 14:24:17 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator