* VC commit missing ChangeLog message
@ 2008-11-11 14:41 Ted Zlatanov
2008-11-11 14:49 ` Alfred M. Szmidt
0 siblings, 1 reply; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-11 14:41 UTC (permalink / raw
To: emacs-devel
My normal work flow is:
1) make changes
2) `C-x 4 a' to make a ChangeLog entry
3) `C-x v d' to do a commit with vc
The problem is that the commit message doesn't get the ChangeLog entry I
just made. This used to happen with the PCL-CVS package and I miss the
functionality very much.
Does anyone know if this is something already available with the new vc
package, or if it needs to be written? I didn't see it in the docs.
Thanks
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 14:41 VC commit missing ChangeLog message Ted Zlatanov
@ 2008-11-11 14:49 ` Alfred M. Szmidt
2008-11-11 16:25 ` Stefan Monnier
0 siblings, 1 reply; 23+ messages in thread
From: Alfred M. Szmidt @ 2008-11-11 14:49 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
My normal work flow is:
1) make changes
2) `C-x 4 a' to make a ChangeLog entry
3) `C-x v d' to do a commit with vc
The problem is that the commit message doesn't get the ChangeLog entry I
just made. This used to happen with the PCL-CVS package and I miss the
functionality very much.
Not much help, but I miss such a functionality as well! I would like
it for `C-x v v' as well.. One could enable it with a variable or
something if people prefer the current behaviour.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 14:49 ` Alfred M. Szmidt
@ 2008-11-11 16:25 ` Stefan Monnier
2008-11-11 16:43 ` Ted Zlatanov
0 siblings, 1 reply; 23+ messages in thread
From: Stefan Monnier @ 2008-11-11 16:25 UTC (permalink / raw
To: ams; +Cc: Ted Zlatanov, emacs-devel
> My normal work flow is:
> 1) make changes
> 2) `C-x 4 a' to make a ChangeLog entry
> 3) `C-x v d' to do a commit with vc
> The problem is that the commit message doesn't get the ChangeLog entry I
> just made. This used to happen with the PCL-CVS package and I miss the
> functionality very much.
C-c C-a from within the *VC-log* buffer will fetch the ChangeLog entry
you just wrote.
Stefan
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 16:25 ` Stefan Monnier
@ 2008-11-11 16:43 ` Ted Zlatanov
2008-11-11 16:58 ` Dan Nicolaescu
2008-11-11 17:41 ` Stefan Monnier
0 siblings, 2 replies; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-11 16:43 UTC (permalink / raw
To: emacs-devel
On Tue, 11 Nov 2008 11:25:13 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> My normal work flow is:
>> 1) make changes
>> 2) `C-x 4 a' to make a ChangeLog entry
>> 3) `C-x v d' to do a commit with vc
>> The problem is that the commit message doesn't get the ChangeLog entry I
>> just made. This used to happen with the PCL-CVS package and I miss the
>> functionality very much.
SM> C-c C-a from within the *VC-log* buffer will fetch the ChangeLog entry
SM> you just wrote.
I wonder if it could:
1) always be called on opening the *VC-log* buffer, since it's harmless
2) give an informative message about why it didn't find a ChangeLog
entry, if it's invoked manually and it couldn't find an entry
3) be mentioned in the *VC-log* buffer in a comment line, together with
other helpful information, e.g.
;;; Lines prefixed with ;;; will not be in the commit message
;;; Use C-c C-a to insert the best-guess ChangeLog entry
;;; Use C-u C-c C-a to forcibly insert the last ChangeLog entry
;;; Enter your commit message below
I know (3) is pretty verbose but it's nice for new users...
Thanks
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 16:43 ` Ted Zlatanov
@ 2008-11-11 16:58 ` Dan Nicolaescu
2008-11-11 19:11 ` Ted Zlatanov
2008-11-12 2:38 ` Stefan Monnier
2008-11-11 17:41 ` Stefan Monnier
1 sibling, 2 replies; 23+ messages in thread
From: Dan Nicolaescu @ 2008-11-11 16:58 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Tue, 11 Nov 2008 11:25:13 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> >> My normal work flow is:
> >> 1) make changes
> >> 2) `C-x 4 a' to make a ChangeLog entry
> >> 3) `C-x v d' to do a commit with vc
>
> >> The problem is that the commit message doesn't get the ChangeLog entry I
> >> just made. This used to happen with the PCL-CVS package and I miss the
> >> functionality very much.
>
> SM> C-c C-a from within the *VC-log* buffer will fetch the ChangeLog entry
> SM> you just wrote.
>
> I wonder if it could:
>
> 1) always be called on opening the *VC-log* buffer, since it's harmless
It could and it should, just nobody has done the work yet to do it...
If you are interested, it can be done `vc-checkin' by initializing the
`initial-contents' parameter before the call to `vc-start-log-entry'.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 16:43 ` Ted Zlatanov
2008-11-11 16:58 ` Dan Nicolaescu
@ 2008-11-11 17:41 ` Stefan Monnier
2008-11-11 19:09 ` Ted Zlatanov
1 sibling, 1 reply; 23+ messages in thread
From: Stefan Monnier @ 2008-11-11 17:41 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
> I wonder if it could:
> 1) always be called on opening the *VC-log* buffer, since it's harmless
M-x customize-variable RET log-edit-hook RET
> 2) give an informative message about why it didn't find a ChangeLog
> entry, if it's invoked manually and it couldn't find an entry
It's kind of difficult: currently, it builds a regexp and searches
for it. If it's not found, all it knows is that it's not found, but not
which part of the regexps could have matched if it weren't for some
other part.
Stefan
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 17:41 ` Stefan Monnier
@ 2008-11-11 19:09 ` Ted Zlatanov
0 siblings, 0 replies; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-11 19:09 UTC (permalink / raw
To: emacs-devel
On Tue, 11 Nov 2008 12:41:13 -0500 Stefan Monnier <monnier@IRO.UMontreal.CA> wrote:
>> I wonder if it could:
>> 1) always be called on opening the *VC-log* buffer, since it's harmless
SM> M-x customize-variable RET log-edit-hook RET
I know how to do it for myself, of course. I think it should be done
for everyone.
>> 2) give an informative message about why it didn't find a ChangeLog
>> entry, if it's invoked manually and it couldn't find an entry
SM> It's kind of difficult: currently, it builds a regexp and searches
SM> for it. If it's not found, all it knows is that it's not found, but not
SM> which part of the regexps could have matched if it weren't for some
SM> other part.
Maybe that can be improved. I have not looked at the code so I don't
want to speculate, but will do so if you and others think it's a good
idea.
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 16:58 ` Dan Nicolaescu
@ 2008-11-11 19:11 ` Ted Zlatanov
2008-11-11 19:45 ` Dan Nicolaescu
2008-11-12 2:38 ` Stefan Monnier
1 sibling, 1 reply; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-11 19:11 UTC (permalink / raw
To: emacs-devel
On Tue, 11 Nov 2008 08:58:34 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
DN> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Tue, 11 Nov 2008 11:25:13 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>
>> >> My normal work flow is:
>> >> 1) make changes
>> >> 2) `C-x 4 a' to make a ChangeLog entry
>> >> 3) `C-x v d' to do a commit with vc
>>
>> >> The problem is that the commit message doesn't get the ChangeLog entry I
>> >> just made. This used to happen with the PCL-CVS package and I miss the
>> >> functionality very much.
>>
SM> C-c C-a from within the *VC-log* buffer will fetch the ChangeLog entry
SM> you just wrote.
>>
>> I wonder if it could:
>>
>> 1) always be called on opening the *VC-log* buffer, since it's harmless
DN> It could and it should, just nobody has done the work yet to do it...
DN> If you are interested, it can be done `vc-checkin' by initializing the
DN> `initial-contents' parameter before the call to `vc-start-log-entry'.
Wouldn't it be easier to do it by calling the function directly? Or do
you mean I can insert the commented lines I suggested as well that way?
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 19:11 ` Ted Zlatanov
@ 2008-11-11 19:45 ` Dan Nicolaescu
2008-11-11 21:38 ` Ted Zlatanov
0 siblings, 1 reply; 23+ messages in thread
From: Dan Nicolaescu @ 2008-11-11 19:45 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Tue, 11 Nov 2008 08:58:34 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
>
> DN> Ted Zlatanov <tzz@lifelogs.com> writes:
> >> On Tue, 11 Nov 2008 11:25:13 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> >>
> >> >> My normal work flow is:
> >> >> 1) make changes
> >> >> 2) `C-x 4 a' to make a ChangeLog entry
> >> >> 3) `C-x v d' to do a commit with vc
> >>
> >> >> The problem is that the commit message doesn't get the ChangeLog entry I
> >> >> just made. This used to happen with the PCL-CVS package and I miss the
> >> >> functionality very much.
> >>
> SM> C-c C-a from within the *VC-log* buffer will fetch the ChangeLog entry
> SM> you just wrote.
> >>
> >> I wonder if it could:
> >>
> >> 1) always be called on opening the *VC-log* buffer, since it's harmless
>
> DN> It could and it should, just nobody has done the work yet to do it...
> DN> If you are interested, it can be done `vc-checkin' by initializing the
> DN> `initial-contents' parameter before the call to `vc-start-log-entry'.
>
> Wouldn't it be easier to do it by calling the function directly?
Not sure what your question is... What I described is one way to
initialize the contents of the *VC-log* buffer.
> Or do you mean I can insert the commented lines I suggested as well
> that way?
If you add those comments, you'd need to add some post-processing to
make sure they get removed before checking in, so it might not be the
best idea.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 19:45 ` Dan Nicolaescu
@ 2008-11-11 21:38 ` Ted Zlatanov
2008-11-12 1:11 ` Dan Nicolaescu
0 siblings, 1 reply; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-11 21:38 UTC (permalink / raw
To: emacs-devel
On Tue, 11 Nov 2008 11:45:32 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
DN> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Tue, 11 Nov 2008 08:58:34 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
DN> It could and it should, just nobody has done the work yet to do it...
DN> If you are interested, it can be done `vc-checkin' by initializing the
DN> `initial-contents' parameter before the call to `vc-start-log-entry'.
>>
>> Wouldn't it be easier to do it by calling the function directly?
DN> Not sure what your question is... What I described is one way to
DN> initialize the contents of the *VC-log* buffer.
There's a function that will do it (`C-c C-a' ==
log-edit-insert-changelog), I'm trying to find out if it's easier to
always call that function when setting up the *VC-log* buffer than use
initial-contents as you suggested. It seems so to me, and Stefan
suggested it too.
Incidentally, there are two functions named
log-edit-changelog-insert-entries and
log-edit-insert-changelog-entries. I think one of the two should be
renamed to avoid confusion.
>> Or do you mean I can insert the commented lines I suggested as well
>> that way?
DN> If you add those comments, you'd need to add some post-processing to
DN> make sure they get removed before checking in, so it might not be the
DN> best idea.
It's for user convenience, so I think it's a good idea. It's just
modifying log-edit-done at the beginning--it already does removal of
trailing empty lines, so this is pretty easy. Simply go to point-min
and then remove all the lines that match "^;;;". I can write and test
it unless you or someone else think it's a problem.
Thanks
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 21:38 ` Ted Zlatanov
@ 2008-11-12 1:11 ` Dan Nicolaescu
2008-11-12 17:17 ` Ted Zlatanov
0 siblings, 1 reply; 23+ messages in thread
From: Dan Nicolaescu @ 2008-11-12 1:11 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Tue, 11 Nov 2008 11:45:32 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
>
> DN> Ted Zlatanov <tzz@lifelogs.com> writes:
> >> On Tue, 11 Nov 2008 08:58:34 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
>
> DN> It could and it should, just nobody has done the work yet to do it...
> DN> If you are interested, it can be done `vc-checkin' by initializing the
> DN> `initial-contents' parameter before the call to `vc-start-log-entry'.
> >>
> >> Wouldn't it be easier to do it by calling the function directly?
>
> DN> Not sure what your question is... What I described is one way to
> DN> initialize the contents of the *VC-log* buffer.
>
> There's a function that will do it (`C-c C-a' ==
> log-edit-insert-changelog), I'm trying to find out if it's easier to
> always call that function when setting up the *VC-log* buffer than use
> initial-contents as you suggested. It seems so to me, and Stefan
> suggested it too.
Sorry, I don't know which version would be easier.
If you are interested in improving this area, please also look at one of
the TODO items in vc.el:
;; - When vc-next-action calls vc-checkin it could pre-fill the
;; *VC-log* buffer with some obvious items: the list of files that
;; were added, the list of files that were removed. If the diff is
;; available, maybe it could even call something like
;; `diff-add-change-log-entries-other-window' to create a detailed
;; skeleton for the log...
;;
> >> Or do you mean I can insert the commented lines I suggested as well
> >> that way?
>
> DN> If you add those comments, you'd need to add some post-processing to
> DN> make sure they get removed before checking in, so it might not be the
> DN> best idea.
>
> It's for user convenience, so I think it's a good idea. It's just
> modifying log-edit-done at the beginning--it already does removal of
> trailing empty lines, so this is pretty easy. Simply go to point-min
> and then remove all the lines that match "^;;;". I can write and test
> it unless you or someone else think it's a problem.
If you are going to add the ChangeLog entries by default, then why
bother with adding the text ?
IMO adding text is inconvenient to users: they either have to read it,
or they might think they have to delete it so that it does not get
checked in.
It would be nice to be able to insert text that is not part
of the buffer, like in the header line, but that is a single line
unfortunately :-(
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-11 16:58 ` Dan Nicolaescu
2008-11-11 19:11 ` Ted Zlatanov
@ 2008-11-12 2:38 ` Stefan Monnier
1 sibling, 0 replies; 23+ messages in thread
From: Stefan Monnier @ 2008-11-12 2:38 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: Ted Zlatanov, emacs-devel
>> 1) always be called on opening the *VC-log* buffer, since it's harmless
> It could and it should, just nobody has done the work yet to do it...
> If you are interested, it can be done `vc-checkin' by initializing the
> `initial-contents' parameter before the call to `vc-start-log-entry'.
It would not belong in VC but in log-edit.el.
Stefan
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 1:11 ` Dan Nicolaescu
@ 2008-11-12 17:17 ` Ted Zlatanov
2008-11-12 19:42 ` Stefan Monnier
2008-11-12 19:56 ` Dan Nicolaescu
0 siblings, 2 replies; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-12 17:17 UTC (permalink / raw
To: emacs-devel
On Tue, 11 Nov 2008 17:11:06 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
DN> If you are interested in improving this area, please also look at one of
DN> the TODO items in vc.el:
DN> ;; - When vc-next-action calls vc-checkin it could pre-fill the
DN> ;; *VC-log* buffer with some obvious items: the list of files that
DN> ;; were added, the list of files that were removed. If the diff is
DN> ;; available, maybe it could even call something like
DN> ;; `diff-add-change-log-entries-other-window' to create a detailed
DN> ;; skeleton for the log...
DN> ;;
I think that should be up to the user, to be done in the hook. The
information, diff and files added/removed/affected, exists outside the
commit message so putting it inside the message duplicates the
information.
DN> If you are going to add the ChangeLog entries by default, then why
DN> bother with adding the text ?
DN> IMO adding text is inconvenient to users: they either have to read
DN> it, or they might think they have to delete it so that it does not
DN> get checked in. It would be nice to be able to insert text that is
DN> not part of the buffer, like in the header line, but that is a
DN> single line unfortunately :-(
I see your point and agree. How about this patch to just call
log-edit-insert-changelog? I call it regardless of the SETUP parameter,
but it could follow the erase-buffer call instead.
Ted
Index: log-edit.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/log-edit.el,v
retrieving revision 1.51
diff -c -r1.51 log-edit.el
*** log-edit.el 6 May 2008 07:57:42 -0000 1.51
--- log-edit.el 12 Nov 2008 17:13:04 -0000
***************
*** 345,350 ****
--- 345,351 ----
(if buffer (set (make-local-variable 'log-edit-parent-buffer) parent))
(set (make-local-variable 'log-edit-initial-files) (log-edit-files))
+ (log-edit-insert-changelog)
(when setup (run-hooks 'log-edit-hook))
(goto-char (point-min)) (push-mark (point-max))
(message "%s" (substitute-command-keys
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 17:17 ` Ted Zlatanov
@ 2008-11-12 19:42 ` Stefan Monnier
2008-11-12 19:59 ` Dan Nicolaescu
2008-11-12 21:47 ` Ted Zlatanov
2008-11-12 19:56 ` Dan Nicolaescu
1 sibling, 2 replies; 23+ messages in thread
From: Stefan Monnier @ 2008-11-12 19:42 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
> I think that should be up to the user, to be done in the hook. The
> information, diff and files added/removed/affected, exists outside the
> commit message so putting it inside the message duplicates the
> information.
Agreed. One missing feature OTOH is a way to get from the log-edit
buffer to the patch that's being committed. With PCL-CVS you can use
C-x c = to get it, but in general it's missing.
> I see your point and agree. How about this patch to just call
> log-edit-insert-changelog? I call it regardless of the SETUP parameter,
> but it could follow the erase-buffer call instead.
I'd rather just change the default value of the hook, so that users can
remove that entry from the hook if they don't want it run.
Stefan
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 17:17 ` Ted Zlatanov
2008-11-12 19:42 ` Stefan Monnier
@ 2008-11-12 19:56 ` Dan Nicolaescu
2008-11-12 21:42 ` Ted Zlatanov
1 sibling, 1 reply; 23+ messages in thread
From: Dan Nicolaescu @ 2008-11-12 19:56 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Tue, 11 Nov 2008 17:11:06 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
>
> DN> If you are interested in improving this area, please also look at one of
> DN> the TODO items in vc.el:
>
> DN> ;; - When vc-next-action calls vc-checkin it could pre-fill the
> DN> ;; *VC-log* buffer with some obvious items: the list of files that
> DN> ;; were added, the list of files that were removed. If the diff is
> DN> ;; available, maybe it could even call something like
> DN> ;; `diff-add-change-log-entries-other-window' to create a detailed
> DN> ;; skeleton for the log...
> DN> ;;
>
> I think that should be up to the user, to be done in the hook.
Sure, but it would be nice to provide a way to do it by default.
> The information, diff and files added/removed/affected, exists
> outside the commit message so putting it inside the message
> duplicates the information.
It exists, but it means you have to look in two places for it, it is
customary to put such information in the logs.
Also you only addressed one part of that TODO entry, the whole point is
to make it easier to write log entries, and provide as much as possible
by default.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 19:42 ` Stefan Monnier
@ 2008-11-12 19:59 ` Dan Nicolaescu
2008-11-12 20:57 ` Stefan Monnier
2008-11-12 21:47 ` Ted Zlatanov
1 sibling, 1 reply; 23+ messages in thread
From: Dan Nicolaescu @ 2008-11-12 19:59 UTC (permalink / raw
To: Stefan Monnier; +Cc: Ted Zlatanov, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > I think that should be up to the user, to be done in the hook. The
> > information, diff and files added/removed/affected, exists outside the
> > commit message so putting it inside the message duplicates the
> > information.
>
> Agreed. One missing feature OTOH is a way to get from the log-edit
> buffer to the patch that's being committed. With PCL-CVS you can use
> C-x c = to get it, but in general it's missing.
What's wrong with
C-x v =
?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 19:59 ` Dan Nicolaescu
@ 2008-11-12 20:57 ` Stefan Monnier
0 siblings, 0 replies; 23+ messages in thread
From: Stefan Monnier @ 2008-11-12 20:57 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: Ted Zlatanov, emacs-devel
>> > I think that should be up to the user, to be done in the hook. The
>> > information, diff and files added/removed/affected, exists outside the
>> > commit message so putting it inside the message duplicates the
>> > information.
>>
>> Agreed. One missing feature OTOH is a way to get from the log-edit
>> buffer to the patch that's being committed. With PCL-CVS you can use
>> C-x c = to get it, but in general it's missing.
> What's wrong with
> C-x v =
> ?
Oh, you're right, it works as well. Good.
Stefan "Duh!"
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 19:56 ` Dan Nicolaescu
@ 2008-11-12 21:42 ` Ted Zlatanov
2008-11-13 7:09 ` Dan Nicolaescu
0 siblings, 1 reply; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-12 21:42 UTC (permalink / raw
To: emacs-devel
On Wed, 12 Nov 2008 11:56:42 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
DN> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Tue, 11 Nov 2008 17:11:06 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
>>
DN> If you are interested in improving this area, please also look at one of
DN> the TODO items in vc.el:
>>
DN> ;; - When vc-next-action calls vc-checkin it could pre-fill the
DN> ;; *VC-log* buffer with some obvious items: the list of files that
DN> ;; were added, the list of files that were removed. If the diff is
DN> ;; available, maybe it could even call something like
DN> ;; `diff-add-change-log-entries-other-window' to create a detailed
DN> ;; skeleton for the log...
DN> ;;
>>
>> I think that should be up to the user, to be done in the hook.
DN> Sure, but it would be nice to provide a way to do it by default.
I think we agree that something is good, but it will be hard to agree on
the particulars of what to put in the buffer. So maybe the answer is a
format-like string (falling back to a function call) that the user can
customize?
>> The information, diff and files added/removed/affected, exists
>> outside the commit message so putting it inside the message
>> duplicates the information.
DN> It exists, but it means you have to look in two places for it, it is
DN> customary to put such information in the logs.
Sorry, I don't see what you mean. Putting it in the logs would ensure
you have two places to look, and when it's inaccurate it would be an
even worse situation.
DN> Also you only addressed one part of that TODO entry, the whole point is
DN> to make it easier to write log entries, and provide as much as possible
DN> by default.
The two goals diverge significantly once the threshold of "enough"
information is passed, and unfortunately that is a different point for
every user.
Specifically regarding the detailed skeleton, I think we're getting to
the format string/function concept I mentioned above. I don't think
Emacs has a default way to do this, but skeleton.el should work.
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 19:42 ` Stefan Monnier
2008-11-12 19:59 ` Dan Nicolaescu
@ 2008-11-12 21:47 ` Ted Zlatanov
2008-11-13 1:56 ` Stefan Monnier
1 sibling, 1 reply; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-12 21:47 UTC (permalink / raw
To: emacs-devel
On Wed, 12 Nov 2008 14:42:30 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I see your point and agree. How about this patch to just call
>> log-edit-insert-changelog? I call it regardless of the SETUP parameter,
>> but it could follow the erase-buffer call instead.
SM> I'd rather just change the default value of the hook, so that users can
SM> remove that entry from the hook if they don't want it run.
Wait, the hook already calls it. For me it doesn't work, though (which
is why I started this thread). Something is breaking in the changelog
entry detection logic. It worked when I did C-c C-a (without C-u)
manually. It must have been the logic that applies C-u if C-c C-a is
called twice in a row; I must have hit the key twice without realizing
it. So the problem is actually that the default logic doesn't detect my
ChangeLog entry, not that log-edit-insert-changelog is not called. Argh.
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 21:47 ` Ted Zlatanov
@ 2008-11-13 1:56 ` Stefan Monnier
0 siblings, 0 replies; 23+ messages in thread
From: Stefan Monnier @ 2008-11-13 1:56 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
>>> I see your point and agree. How about this patch to just call
>>> log-edit-insert-changelog? I call it regardless of the SETUP parameter,
>>> but it could follow the erase-buffer call instead.
SM> I'd rather just change the default value of the hook, so that users can
SM> remove that entry from the hook if they don't want it run.
> Wait, the hook already calls it. For me it doesn't work, though (which
> is why I started this thread). Something is breaking in the changelog
> entry detection logic. It worked when I did C-c C-a (without C-u)
> manually. It must have been the logic that applies C-u if C-c C-a is
> called twice in a row; I must have hit the key twice without realizing
> it. So the problem is actually that the default logic doesn't detect my
> ChangeLog entry, not that log-edit-insert-changelog is not called. Argh.
It's probably the `setup' argument together with the
log-edit-invert-setup confg variable. It's rather messy and the main
purpose was to preserve 100% behavioral-compatibility while introducing
new features.
But I think I agree that the setup should simply always happen and the
user can then use the log-edit-hook to control what kind of setup he
wants to take place.
Stefan
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-12 21:42 ` Ted Zlatanov
@ 2008-11-13 7:09 ` Dan Nicolaescu
2008-11-13 14:47 ` Ted Zlatanov
0 siblings, 1 reply; 23+ messages in thread
From: Dan Nicolaescu @ 2008-11-13 7:09 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Wed, 12 Nov 2008 11:56:42 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
>
> DN> Ted Zlatanov <tzz@lifelogs.com> writes:
> >> On Tue, 11 Nov 2008 17:11:06 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
> >>
> DN> If you are interested in improving this area, please also look at one of
> DN> the TODO items in vc.el:
> >>
> DN> ;; - When vc-next-action calls vc-checkin it could pre-fill the
> DN> ;; *VC-log* buffer with some obvious items: the list of files that
> DN> ;; were added, the list of files that were removed. If the diff is
> DN> ;; available, maybe it could even call something like
> DN> ;; `diff-add-change-log-entries-other-window' to create a detailed
> DN> ;; skeleton for the log...
> DN> ;;
> >>
> >> I think that should be up to the user, to be done in the hook.
>
> DN> Sure, but it would be nice to provide a way to do it by default.
>
> I think we agree that something is good, but it will be hard to agree on
> the particulars of what to put in the buffer. So maybe the answer is a
> format-like string (falling back to a function call) that the user can
> customize?
Or a list of functions?
> >> The information, diff and files added/removed/affected, exists
> >> outside the commit message so putting it inside the message
> >> duplicates the information.
>
> DN> It exists, but it means you have to look in two places for it, it is
> DN> customary to put such information in the logs.
>
> Sorry, I don't see what you mean. Putting it in the logs would ensure
> you have two places to look, and when it's inaccurate it would be an
> even worse situation.
See many the logs for many GNU projects (including emacs), file addition
and deletions are noted there, it's quite usual to do so.
> DN> Also you only addressed one part of that TODO entry, the whole point is
> DN> to make it easier to write log entries, and provide as much as possible
> DN> by default.
>
> The two goals diverge significantly once the threshold of "enough"
> information is passed, and unfortunately that is a different point for
> every user.
>
> Specifically regarding the detailed skeleton, I think we're getting to
> the format string/function concept I mentioned above. I don't think
> Emacs has a default way to do this, but skeleton.el should work.
IMHO the ChangeLog format
* filename (FUNCTION_NAME):
should be enough for the start, we'll see if users ask for a different
format. The format is probably not that important for the beginning...
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-13 7:09 ` Dan Nicolaescu
@ 2008-11-13 14:47 ` Ted Zlatanov
2008-11-13 15:12 ` Dan Nicolaescu
0 siblings, 1 reply; 23+ messages in thread
From: Ted Zlatanov @ 2008-11-13 14:47 UTC (permalink / raw
To: emacs-devel
On Wed, 12 Nov 2008 23:09:35 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
DN> Ted Zlatanov <tzz@lifelogs.com> writes:
>> I think we agree that something is good, but it will be hard to agree on
>> the particulars of what to put in the buffer. So maybe the answer is a
>> format-like string (falling back to a function call) that the user can
>> customize?
DN> Or a list of functions?
Sure. Do you want to put it in or should I?
Ted
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: VC commit missing ChangeLog message
2008-11-13 14:47 ` Ted Zlatanov
@ 2008-11-13 15:12 ` Dan Nicolaescu
0 siblings, 0 replies; 23+ messages in thread
From: Dan Nicolaescu @ 2008-11-13 15:12 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Wed, 12 Nov 2008 23:09:35 -0800 (PST) Dan Nicolaescu <dann@ics.uci.edu> wrote:
>
> DN> Ted Zlatanov <tzz@lifelogs.com> writes:
> >> I think we agree that something is good, but it will be hard to agree on
> >> the particulars of what to put in the buffer. So maybe the answer is a
> >> format-like string (falling back to a function call) that the user can
> >> customize?
>
> DN> Or a list of functions?
>
> Sure. Do you want to put it in or should I?
You are the one doing the work. But you might want to ask Stefan if he
agrees...
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2008-11-13 15:12 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 14:41 VC commit missing ChangeLog message Ted Zlatanov
2008-11-11 14:49 ` Alfred M. Szmidt
2008-11-11 16:25 ` Stefan Monnier
2008-11-11 16:43 ` Ted Zlatanov
2008-11-11 16:58 ` Dan Nicolaescu
2008-11-11 19:11 ` Ted Zlatanov
2008-11-11 19:45 ` Dan Nicolaescu
2008-11-11 21:38 ` Ted Zlatanov
2008-11-12 1:11 ` Dan Nicolaescu
2008-11-12 17:17 ` Ted Zlatanov
2008-11-12 19:42 ` Stefan Monnier
2008-11-12 19:59 ` Dan Nicolaescu
2008-11-12 20:57 ` Stefan Monnier
2008-11-12 21:47 ` Ted Zlatanov
2008-11-13 1:56 ` Stefan Monnier
2008-11-12 19:56 ` Dan Nicolaescu
2008-11-12 21:42 ` Ted Zlatanov
2008-11-13 7:09 ` Dan Nicolaescu
2008-11-13 14:47 ` Ted Zlatanov
2008-11-13 15:12 ` Dan Nicolaescu
2008-11-12 2:38 ` Stefan Monnier
2008-11-11 17:41 ` Stefan Monnier
2008-11-11 19:09 ` Ted Zlatanov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.