From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#16170: Customizable log-edit commit messages Date: Thu, 19 Dec 2013 01:52:45 +0200 Organization: JURTA Message-ID: <87sitrutqs.fsf@mail.jurta.org> References: <87fvpsgvmd.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387410855 31206 80.91.229.3 (18 Dec 2013 23:54:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Dec 2013 23:54:15 +0000 (UTC) To: 16170-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 19 00:54:19 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 1VtQwU-0002fV-VE for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Dec 2013 00:54:19 +0100 Original-Received: from localhost ([::1]:41338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtQwU-0004Qw-CV for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Dec 2013 18:54:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtQwM-0004F9-51 for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 18:54:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtQwF-0005uJ-9W for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 18:54:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtQwF-0005uF-6O for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 18:54:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VtQwE-0004OX-Rz for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 18:54:03 -0500 Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2013 23:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 16170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 16170@debbugs.gnu.org, juri@jurta.org, juri@jurta.org Original-Received: via spool by 16170-done@debbugs.gnu.org id=D16170.138741080716834 (code D ref 16170); Wed, 18 Dec 2013 23:54:01 +0000 Original-Received: (at 16170-done) by debbugs.gnu.org; 18 Dec 2013 23:53:27 +0000 Original-Received: from localhost ([127.0.0.1]:57868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtQvf-0004NR-8H for submit@debbugs.gnu.org; Wed, 18 Dec 2013 18:53:27 -0500 Original-Received: from [69.163.184.122] (port=54175 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtQvd-0004NG-9y for 16170-done@debbugs.gnu.org; Wed, 18 Dec 2013 18:53:25 -0500 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B4CBC30366ACFA for <16170-done@debbugs.gnu.org>; Wed, 18 Dec 2013 15:53:23 -0800 (PST) In-Reply-To: <87fvpsgvmd.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 17 Dec 2013 02:38:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) 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:82199 Archived-At: > Currently the commit message is hard-coded that might be unsuitable > to other projects with different conventions. This patch leaves the > current default unchanged, and moves it to a separate function, > so a set of messages could by easily configured in `log-edit-hook'. > Adding `save-excursion' to `log-edit-insert-cvs-template' was > necessary to not move point set by `message-position-point' in > `log-edit-insert-message-template'. This is a useful addition to accompany log-edit-insert-filenames to insert the names of files that don't require ChangeLog entry, but should be mentioned in the commit message: === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2013-12-04 00:37:33 +0000 +++ lisp/vc/log-edit.el 2013-12-18 23:52:35 +0000 @@ -137,6 +137,7 @@ log-edit-insert-cvs-template log-edit-insert-changelog log-edit-insert-filenames + log-edit-insert-filenames-without-changelog log-edit-show-files))) (defcustom log-edit-mode-hook (if (boundp 'vc-log-mode-hook) vc-log-mode-hook) @@ -664,6 +666,21 @@ (insert "Affected files: \n" (mapconcat 'identity (log-edit-files) " \n"))) +(defun log-edit-insert-filenames-without-changelog () + "Insert the list of files that have no ChangeLog message." + (interactive) + (let ((files + (delq nil + (mapcar + (lambda (file) + (unless (or (cdr-safe (log-edit-changelog-entries file)) + (equal (file-name-nondirectory file) "ChangeLog")) + file)) + (log-edit-files))))) + (when files + (goto-char (point-max)) + (insert (mapconcat 'identity files ", ") ": ")))) + (defun log-edit-add-to-changelog () "Insert this log message into the appropriate ChangeLog file." (interactive)