bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16301: 24.3.50; [Feature] Split add-change-log-entry to make it reus


From: Daniel Dehennin
Subject: bug#16301: 24.3.50; [Feature] Split add-change-log-entry to make it reusable
Date: Mon, 30 Dec 2013 13:43:00 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

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

Attachment: pgpxTKFlUac4F.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]