GNU bug report logs - #16301
24.3.50; [Feature] Split add-change-log-entry to make it reusable

Previous Next

Package: emacs;

Reported by: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>

Date: Mon, 30 Dec 2013 12:44:01 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 24.3.50

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16301 in the body.
You can then email your comments to 16301 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16301; Package emacs. (Mon, 30 Dec 2013 12:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Dec 2013 12:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; [Feature] Split add-change-log-entry to make it reusable
Date: Mon, 30 Dec 2013 13:43:00 +0100
[Message part 1 (text/plain, inline)]
Hello,

I just start to use magit in complement[1] of vc-git and was wondering
why there is no feature like “add-change-log-entry(-other-window)” that
insert in the commit log instead of creating/adding to a plain
ChangeLog.

I finally found[2] the “magit-commit-add-log” which behave like what I
had in DVC[3].

All these functions do near the same thing but code is duplicated.

I propose to split the “add-change-log-entry” function to make parts
usable by third parties.

You can consider the following as pure product of my damaged brain:

A templating system could avoid much of third parties code by supporting
more than one changelog format:

1. Provide the changelog file name: .git/COMMIT_EDITMSG for magit

2. Set buffer parameter “new entry template”: this could be useful to
   inform about best practice, for example, magit could use:
   #+begin_src git-commit
   Subject == Why this commit is necessary?

   Long description of what was wrong before this commit.

   * file (function): short description of the change.
   #+end_src

   If possible:

   - each part should vanish when user modify the line by some kind of
     “special property”:
     + user place point on first line
     + user hit “A”
     + “special property” delete the line, the “special property” is
       removed for this line (not the others)
     + “A” is inserted a pos 0 of first line

   - function calls should be usable in template, for example to fill
     the list of modified files instead of a static vanish-on-write
     example

3. Provide offset for items: 0 for magit as in the previous template

I don't know the feasibility of a such feature, but I think it could be
great.

Regards.

In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.6)
 of 2013-12-26 on prometheus, modified by Debian
 (emacs-snapshot package, version 2:20131226-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
Configured using:
 `configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info/emacs-snapshot
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --with-crt-dir=/usr/lib/x86_64-linux-gnu/ --with-x=yes
 --with-x-toolkit=gtk3 --with-imagemagick=yes 'CFLAGS=-DDEBIAN
 -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' CPPFLAGS=-D_FORTIFY_SOURCE=2
 'LDFLAGS=-g -Wl,--as-needed -znocombreloc''

Important settings:
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Magit


Footnotes: 
[1]  http://git.baby-gnu.net/gitweb/gitweb.cgi?p=user/dad/config/emacs.git;a=blob;f=lisp/startup.d/VC.el

[2]  https://github.com/magit/magit/issues/1130

[3]  http://www.emacswiki.org/emacs/DistributedVersionControl

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16301; Package emacs. (Thu, 02 Jan 2014 04:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 16301 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>
Cc: 16301 <at> debbugs.gnu.org
Subject: Re: bug#16301: 24.3.50;
 [Feature] Split add-change-log-entry to make it reusable
Date: Wed, 01 Jan 2014 23:12:01 -0500
> I just start to use magit in complement[1] of vc-git and was wondering
> why there is no feature like “add-change-log-entry(-other-window)” that
> insert in the commit log instead of creating/adding to a plain
> ChangeLog.

Indeed, we need this feature.  For VC as well.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16301; Package emacs. (Fri, 05 Jul 2019 01:58:01 GMT) Full text and rfc822 format available.

Message #11 received at 16301 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>
Cc: 16301 <at> debbugs.gnu.org
Subject: Re: bug#16301: 24.3.50;
 [Feature] Split add-change-log-entry to make it reusable
Date: Thu, 04 Jul 2019 21:57:44 -0400
[Message part 1 (text/plain, inline)]
Daniel Dehennin <daniel.dehennin <at> baby-gnu.org> writes:

> I just start to use magit in complement[1] of vc-git and was wondering
> why there is no feature like “add-change-log-entry(-other-window)” that
> insert in the commit log instead of creating/adding to a plain
> ChangeLog.
>
> I finally found[2] the “magit-commit-add-log” which behave like what I
> had in DVC[3].
>
> All these functions do near the same thing but code is duplicated.
>
> I propose to split the “add-change-log-entry” function to make parts
> usable by third parties.

I've started working on this, patch attached below.  It's not entirely
baked, but I thought I'd post it now to let people know about it.

[0001-Improved-ChangeLog-generation-for-vc-log-Bug-16301.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16301; Package emacs. (Tue, 16 Jul 2019 23:48:02 GMT) Full text and rfc822 format available.

Message #14 received at 16301 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>
Cc: 16301 <at> debbugs.gnu.org
Subject: Re: bug#16301: 24.3.50;
 [Feature] Split add-change-log-entry to make it reusable
Date: Tue, 16 Jul 2019 19:47:35 -0400
[Message part 1 (text/plain, inline)]
tags 16301 + patch
quit

>> I propose to split the “add-change-log-entry” function to make parts
>> usable by third parties.
>
> I've started working on this, patch attached below.  It's not entirely
> baked, but I thought I'd post it now to let people know about it.

I've made enough progress that this should be usable by now.  One
problem I noticed is that add-log-current-defun returns "foo" for lines
like

    (require 'foo)

Which is usually not wanted.  So we might try to make
add-log-current-defun a bit more discriminating, although missing
definitions might be more annoying than false positives.

[0001-Improved-ChangeLog-generation-for-vc-log-Bug-16301.patch (text/plain, attachment)]

Added tag(s) patch. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 16 Jul 2019 23:48:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16301; Package emacs. (Sun, 28 Jul 2019 14:14:02 GMT) Full text and rfc822 format available.

Message #19 received at 16301 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>
Cc: 16301 <at> debbugs.gnu.org
Subject: Re: bug#16301: 24.3.50;
 [Feature] Split add-change-log-entry to make it reusable
Date: Sun, 28 Jul 2019 10:13:05 -0400
[Message part 1 (text/plain, inline)]
> I've made enough progress that this should be usable by now.

I found a few more corner cases while using it.  I'll push to master
soon.

[0001-Improved-ChangeLog-generation-for-vc-log-Bug-16301.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16301; Package emacs. (Sun, 04 Aug 2019 00:17:01 GMT) Full text and rfc822 format available.

Message #22 received at 16301 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>
Cc: 16301 <at> debbugs.gnu.org
Subject: Re: bug#16301: 24.3.50;
 [Feature] Split add-change-log-entry to make it reusable
Date: Sat, 03 Aug 2019 20:16:36 -0400
tags 16301 fixed
close 16301 27.1
quit

Noam Postavsky <npostavs <at> gmail.com> writes:

>> I've made enough progress that this should be usable by now.
>
> I found a few more corner cases while using it.  I'll push to master
> soon.

Done.

01661f33c1 2019-08-03T20:14:52-04:00 "Improved ChangeLog generation for vc log (Bug#16301)"
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=01661f33c11654d1fe5fe1013332db2500b7f449





Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 04 Aug 2019 00:17:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 16301 <at> debbugs.gnu.org and Daniel Dehennin <daniel.dehennin <at> baby-gnu.org> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 04 Aug 2019 00:17:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Sep 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 232 days ago.

Previous Next


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