unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16301: 24.3.50; [Feature] Split add-change-log-entry to make it reusable
@ 2013-12-30 12:43 Daniel Dehennin
  2014-01-02  4:12 ` Stefan Monnier
  2019-07-05  1:57 ` Noam Postavsky
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Dehennin @ 2013-12-30 12:43 UTC (permalink / raw)
  To: 16301

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

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 #2: Type: application/pgp-signature, Size: 229 bytes --]

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

end of thread, other threads:[~2019-08-04  0:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-30 12:43 bug#16301: 24.3.50; [Feature] Split add-change-log-entry to make it reusable Daniel Dehennin
2014-01-02  4:12 ` Stefan Monnier
2019-07-05  1:57 ` Noam Postavsky
2019-07-16 23:47   ` Noam Postavsky
2019-07-28 14:13     ` Noam Postavsky
2019-08-04  0:16       ` Noam Postavsky

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