From: Daniel Dehennin <daniel.dehennin@baby-gnu.org>
To: 16301@debbugs.gnu.org
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 [thread overview]
Message-ID: <87bnzyv7aj.fsf@hati.baby-gnu.org> (raw)
[-- 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 --]
next reply other threads:[~2013-12-30 12:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-30 12:43 Daniel Dehennin [this message]
2014-01-02 4:12 ` bug#16301: 24.3.50; [Feature] Split add-change-log-entry to make it reusable 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bnzyv7aj.fsf@hati.baby-gnu.org \
--to=daniel.dehennin@baby-gnu.org \
--cc=16301@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).