unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to get rid of the "Summary: " inserted by vc log-edit.el?
@ 2019-10-27  8:57 Steinar Bang
  2019-10-28  8:17 ` Richard Copley
  2019-10-29 15:14 ` Dmitry Gutov
  0 siblings, 2 replies; 8+ messages in thread
From: Steinar Bang @ 2019-10-27  8:57 UTC (permalink / raw)
  To: help-gnu-emacs

Platform: emacs 26

Is there a simple way to get rid of the "Summary: " tag inserted into
the comment buffer when making a commit with 'C-x v v'?

The first, and only, thing I do with the Summary: tag is to delete
it. And it would be nice not to have to.

But it doesn't look like this tag is configurable...?  And it wasn't all
that easy to find where it is set either.

The place I've found is set, are:
 When the author field is set
  http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/vc/log-edit.el#n834
 When the Amend header is toggled
  http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/vc/log-edit.el#n1179
 Possibly as a side effect of extracting headers from the commit message...?
  http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/vc/log-edit.el#n1124

Or is it perhaps set in a completely different place?

Thanks!


- Steinar



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

* Re: How to get rid of the "Summary: " inserted by vc log-edit.el?
  2019-10-27  8:57 How to get rid of the "Summary: " inserted by vc log-edit.el? Steinar Bang
@ 2019-10-28  8:17 ` Richard Copley
  2019-10-29 17:48   ` Steinar Bang
  2019-10-29 15:14 ` Dmitry Gutov
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Copley @ 2019-10-28  8:17 UTC (permalink / raw)
  To: Steinar Bang; +Cc: help-gnu-emacs

On Sun, 27 Oct 2019 at 08:56, Steinar Bang <sb@dod.no> wrote:

> Platform: emacs 26
>
> Is there a simple way to get rid of the "Summary: " tag inserted into
> the comment buffer when making a commit with 'C-x v v'?
>
> The first, and only, thing I do with the Summary: tag is to delete
> it. And it would be nice not to have to.
>
> But it doesn't look like this tag is configurable...?  And it wasn't all
> that easy to find where it is set either.
>
> The place I've found is set, are:
>  When the author field is set
>   http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/vc/log-edit.el#n834
>  When the Amend header is toggled
>
> http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/vc/log-edit.el#n1179
>  Possibly as a side effect of extracting headers from the commit
> message...?
>
> http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/vc/log-edit.el#n1124
>
> Or is it perhaps set in a completely different place?
>

Hi,
Customize the variable "log-edit-hook" and remove
"log-edit-insert-message-template" from the list of functions there. There
are three functions on the list by default. They can all be removed if you
want, without causing any problems.


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

* Re: How to get rid of the "Summary: " inserted by vc log-edit.el?
  2019-10-27  8:57 How to get rid of the "Summary: " inserted by vc log-edit.el? Steinar Bang
  2019-10-28  8:17 ` Richard Copley
@ 2019-10-29 15:14 ` Dmitry Gutov
  2019-10-29 17:48   ` Steinar Bang
  1 sibling, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2019-10-29 15:14 UTC (permalink / raw)
  To: Steinar Bang, help-gnu-emacs

On 27.10.2019 10:57, Steinar Bang wrote:
> The first, and only, thing I do with the Summary: tag is to delete
> it. And it would be nice not to have to

Why, though? The idea behind it is to use email headers-like interface 
for additional info. Like Author and Amend, for example.



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

* Re: How to get rid of the "Summary: " inserted by vc log-edit.el?
  2019-10-29 15:14 ` Dmitry Gutov
@ 2019-10-29 17:48   ` Steinar Bang
  2019-10-29 18:50     ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2019-10-29 17:48 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Dmitry Gutov <dgutov@yandex.ru>:

> Why, though? The idea behind it is to use email headers-like interface
> for additional info. Like Author and Amend, for example.

Well, I don't need the additional info don't and want the additional
info.  I don't see what I would use it for. :-)

What I want is to have human readable commit messages with a first line
that are as clear and concise as I can make them (using imperative is a
great tool for this).



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

* Re: How to get rid of the "Summary: " inserted by vc log-edit.el?
  2019-10-28  8:17 ` Richard Copley
@ 2019-10-29 17:48   ` Steinar Bang
  0 siblings, 0 replies; 8+ messages in thread
From: Steinar Bang @ 2019-10-29 17:48 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Richard Copley <rcopley@gmail.com>:

> Customize the variable "log-edit-hook" and remove
> "log-edit-insert-message-template" from the list of functions
> there. There are three functions on the list by default. They can all
> be removed if you want, without causing any problems.

Thanks! I will try this!



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

* Re: How to get rid of the "Summary: " inserted by vc log-edit.el?
  2019-10-29 17:48   ` Steinar Bang
@ 2019-10-29 18:50     ` Dmitry Gutov
  2019-10-29 20:24       ` Steinar Bang
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2019-10-29 18:50 UTC (permalink / raw)
  To: Steinar Bang, help-gnu-emacs

On 29.10.2019 19:48, Steinar Bang wrote:
> What I want is to have human readable commit messages with a first line
> that are as clear and concise as I can make them (using imperative is a
> great tool for this).

VC removes "Summary: " before creating a commit, so you can have said 
commit messages either way.



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

* Re: How to get rid of the "Summary: " inserted by vc log-edit.el?
  2019-10-29 18:50     ` Dmitry Gutov
@ 2019-10-29 20:24       ` Steinar Bang
  2019-10-29 20:34         ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2019-10-29 20:24 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Dmitry Gutov <dgutov@yandex.ru>:

> VC removes "Summary: " before creating a commit, so you can have said
> commit messages either way.

Hm... I was going to say that the commit is not removed when I commit
with vc.

But then I decided to try it, and "Summary: " was removed.  This is on
 GNU Emacs 25.2.1 (i686-w64-mingw32) of 2017-04-24

"Summary " is also removed on git versioning on emacs 26 on
 GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-09-23, modified by Debian

"Summary: " is *not* removed when using vc-rcs (I use RCS to version
config files on GNU/linux) and that may be what has confused me.

Or it could be that the interplay between magit and vc-git on occasion
leaves the "Summary: " in place...?  (of course it easy to amend if you
see it before you have pushed, but...).

But in any case I want to lose "Summary: " for RCS where it isn't
removed, so I'll use the config changes suggested in the other post.



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

* Re: How to get rid of the "Summary: " inserted by vc log-edit.el?
  2019-10-29 20:24       ` Steinar Bang
@ 2019-10-29 20:34         ` Dmitry Gutov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2019-10-29 20:34 UTC (permalink / raw)
  To: Steinar Bang, help-gnu-emacs

On 29.10.2019 22:24, Steinar Bang wrote:
> But in any case I want to lose "Summary: " for RCS where it isn't
> removed, so I'll use the config changes suggested in the other post.

That's very weird. I don't see anything in vc-rcs.el that would suggest 
it treats the Summary header differently.

Anyway, maybe file a bug report. Somebody might have a better idea.



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

end of thread, other threads:[~2019-10-29 20:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-27  8:57 How to get rid of the "Summary: " inserted by vc log-edit.el? Steinar Bang
2019-10-28  8:17 ` Richard Copley
2019-10-29 17:48   ` Steinar Bang
2019-10-29 15:14 ` Dmitry Gutov
2019-10-29 17:48   ` Steinar Bang
2019-10-29 18:50     ` Dmitry Gutov
2019-10-29 20:24       ` Steinar Bang
2019-10-29 20:34         ` Dmitry Gutov

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).