From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Dehennin Newsgroups: gmane.emacs.bugs 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 Message-ID: <87bnzyv7aj.fsf@hati.baby-gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1388407453 1367 80.91.229.3 (30 Dec 2013 12:44:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Dec 2013 12:44:13 +0000 (UTC) To: 16301@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 30 13:44:16 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VxcCd-0004VN-2L for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 13:44:15 +0100 Original-Received: from localhost ([::1]:58063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxcCc-0007up-O3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 07:44:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxcCV-0007uQ-Dj for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 07:44:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxcCQ-0005UG-Kd for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 07:44:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxcCQ-0005UC-Hg for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 07:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VxcCQ-0004UO-2x for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 07:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Dehennin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Dec 2013 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16301 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138840741817200 (code B ref -1); Mon, 30 Dec 2013 12:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Dec 2013 12:43:38 +0000 Original-Received: from localhost ([127.0.0.1]:51921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VxcC1-0004TM-Ro for submit@debbugs.gnu.org; Mon, 30 Dec 2013 07:43:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39621) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VxcBz-0004TA-QJ for submit@debbugs.gnu.org; Mon, 30 Dec 2013 07:43:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxcBv-0005Oh-67 for submit@debbugs.gnu.org; Mon, 30 Dec 2013 07:43:35 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxcBv-0005OY-2p for submit@debbugs.gnu.org; Mon, 30 Dec 2013 07:43:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxcBq-0007dp-MQ for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 07:43:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxcBm-0005MH-6J for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 07:43:26 -0500 Original-Received: from zion.baby-gnu.net ([82.225.168.180]:50426 helo=zion.baby-gnu.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxcBl-0005L8-TY for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 07:43:22 -0500 Original-Received: from hati.asgardr.info ([192.168.1.2] helo=hati.baby-gnu.org) by zion.baby-gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1VxcBY-0001Cs-3V for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2013 13:43:08 +0100 Organisation: Dark Church of Emacs User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82742 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I just start to use magit in complement[1] of vc-git and was wondering why there is no feature like =E2=80=9Cadd-change-log-entry(-other-window)= =E2=80=9D that insert in the commit log instead of creating/adding to a plain ChangeLog. I finally found[2] the =E2=80=9Cmagit-commit-add-log=E2=80=9D 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 =E2=80=9Cadd-change-log-entry=E2=80=9D function to m= ake 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 =E2=80=9Cnew entry template=E2=80=9D: this could be= useful to inform about best practice, for example, magit could use: #+begin_src git-commit Subject =3D=3D 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 =E2=80=9Cspecial property=E2=80=9D: + user place point on first line + user hit =E2=80=9CA=E2=80=9D + =E2=80=9Cspecial property=E2=80=9D delete the line, the =E2=80=9Cspe= cial property=E2=80=9D is removed for this line (not the others) + =E2=80=9CA=E2=80=9D 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=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var --infodir=3D/usr/share/info/emacs-snapshot --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs-snapshot:/etc/emacs:/usr/local/share/e= macs/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=3D/usr/lib/x86_64-linux-gnu/ --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-imagemagick=3Dyes 'CFLAGS=3D-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=3D5000 -g -O2' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 'LDFLAGS=3D-g -Wl,--as-needed -znocombreloc'' Important settings: value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix Major mode: Magit Footnotes:=20 [1] http://git.baby-gnu.net/gitweb/gitweb.cgi?p=3Duser/dad/config/emacs.gi= t;a=3Dblob;f=3Dlisp/startup.d/VC.el [2] https://github.com/magit/magit/issues/1130 [3] http://www.emacswiki.org/emacs/DistributedVersionControl =2D-=20 Daniel Dehennin R=C3=A9cup=C3=A9rer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREKAAYFAlLBalsACgkQFrLRMcygGktOGgD+P5YRSANqJoiPEZTF8y1S0IVs o+5YpAxkTPcnLUtruQUA/0pjTitCR9FrVICjd697gCROjSYsepy0fYB5rBGXyVJx =SidY -----END PGP SIGNATURE----- --=-=-=--