unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename
@ 2009-06-15 11:41 ` Magnus Henoch
  2009-08-20 20:02   ` bug#3571: marked as done (23.0.94; log-edit-insert-changelog option for not stripping filename) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Henoch @ 2009-06-15 11:41 UTC (permalink / raw)
  To: emacs-pretest-bug

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

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002--log-edit.el-log-edit-strip-single-file-name-New.patch --]
[-- Type: text/x-patch, Size: 1810 bytes --]

From 0bccc332a7e04f68d47f2b66bd6e0d425c4389c8 Mon Sep 17 00:00:00 2001
From: Magnus Henoch <magnus.henoch@gmail.com>
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


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

* bug#3571: marked as done (23.0.94; log-edit-insert-changelog option for not stripping filename)
  2009-06-15 11:41 ` bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename Magnus Henoch
@ 2009-08-20 20:02   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-08-20 20:02 UTC (permalink / raw)
  To: Stefan Monnier

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

Your message dated Wed, 19 Aug 2009 15:57:03 -0400
with message-id <jwv4os38tmr.fsf-monnier+emacs-23.2@gnu.org>
and subject line Re: bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename
has caused the Emacs bug report #3571,
regarding 23.0.94; log-edit-insert-changelog option for not stripping filename
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3571: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3571
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4668 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 532 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: 0002--log-edit.el-log-edit-strip-single-file-name-New.patch --]
[-- Type: text/x-patch, Size: 1810 bytes --]

From 0bccc332a7e04f68d47f2b66bd6e0d425c4389c8 Mon Sep 17 00:00:00 2001
From: Magnus Henoch <magnus.henoch@gmail.com>
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


[-- Attachment #3: Type: message/rfc822, Size: 1796 bytes --]

From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Magnus Henoch <magnus.henoch@gmail.com>
Subject: Re: bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename
Date: Wed, 19 Aug 2009 15:57:03 -0400
Message-ID: <jwv4os38tmr.fsf-monnier+emacs-23.2@gnu.org>

> I've been using the attached patch for a while with good results.

Installed,


        Stefan

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

end of thread, other threads:[~2009-08-20 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <jwv4os38tmr.fsf-monnier+emacs-23.2@gnu.org>
2009-06-15 11:41 ` bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename Magnus Henoch
2009-08-20 20:02   ` bug#3571: marked as done (23.0.94; log-edit-insert-changelog option for not stripping filename) Emacs bug Tracking System

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

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

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