From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: git history tracking across renames (and emacs support) Date: Thu, 12 Jul 2018 12:59:08 -0400 Message-ID: References: <838tdiet25.fsf@gnu.org> <87y3li4vh7.fsf@telefonica.net> <87efnan46u.fsf@linux-m68k.org> <86wp12qtgo.fsf@dod.no> <83tvw6chqv.fsf@gnu.org> <86shbprix7.fsf_-_@dod.no> <838t6jgl1k.fsf@gnu.org> <601m6cc6.fsf@lifelogs.com> <83o9fefnv9.fsf@gnu.org> <83in5lg4ol.fsf@gnu.org> <83efg9fxnj.fsf@gnu.org> <87wou0xv8z.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531414637 18469 195.159.176.226 (12 Jul 2018 16:57:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Jul 2018 16:57:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: larsi@gnus.org, Eli Zaretskii , =?windows-1252?Q?Cl=E9ment?= Pit-Claudel , Ted Zlatanov , emacs-devel@gnu.org To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 12 18:57:12 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdeu0-0004gD-Dp for ged-emacs-devel@m.gmane.org; Thu, 12 Jul 2018 18:57:12 +0200 Original-Received: from localhost ([::1]:33146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdew5-0002PS-Qy for ged-emacs-devel@m.gmane.org; Thu, 12 Jul 2018 12:59:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdevz-0002NE-5x for emacs-devel@gnu.org; Thu, 12 Jul 2018 12:59:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdevv-0005k8-6G for emacs-devel@gnu.org; Thu, 12 Jul 2018 12:59:15 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:58017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdevv-0005jp-0W; Thu, 12 Jul 2018 12:59:11 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w6CGxmMB031052; Thu, 12 Jul 2018 12:59:49 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 56EDA660DD; Thu, 12 Jul 2018 12:59:08 -0400 (EDT) In-Reply-To: <87wou0xv8z.fsf@gmail.com> (=?windows-1252?Q?=22Jo=E3o_T=E1vo?= =?windows-1252?Q?ra=22's?= message of "Thu, 12 Jul 2018 17:40:44 +0100") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6328=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6328> : inlines <6747> : streams <1792347> : uri <2672591> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227287 Archived-At: >>> I wish there was a way to make these buffers without buffer-file-name and >>> still have vc collect the entries from them. Also, after committing, the >>> entries would actually be removed. >> How 'bout making C-x 4 a add entries directly to the *vc-log* buffer >> when there's one and there's no ChangeLog? > I though about that too, but how exactly you deal with multi-file > commits? Hmm... I'm missing something because I fail to see in what way this needs to be treated differently than the single-file case: `C-x 4 a` only adds a single entry, and you just call it on every relevant part of the code. >> Maybe another take on it is to use a "hidden" ChangeLog file, saved >> somewhere in ~/.emacs.d, indexed by the project location and with some >> way to recover some earlier commit message you worked on and had >> to abandon? > A single ChangeLog for all my C-x 4 a needs? Doesn't sound bad, too. > All that would be needed, I think, is to make log-edit-insert-changelog > fix the paths and refill the "paragraphs" when collecting entries. I'd think that the file names would already be project-relative when inserting them with `C-x 4 a`: log-edit-insert-changelog shouldn't have to mess with the message at all. More specifically, the suggestion is split into 2 parts: - a feature for vc-log that lets you save a commit message in a file (in ~/.emacs.d, but indexed by the project). When erasing a *vc-log* buffer, I'd probably want the previous message to be automatically be stashed into that file. This would be commit-message-format-agnostic, hence not directly related to change-log-mode. - a new feature of add-log.el which lets you use a vc-log buffer (using the slightly different format expected there) instead of the ChangeLog file. > It leaves me with the multiple-commit-per-day-per-file problem. I think > the entries copied to the vc-log buffer by `log-edit-insert-changelog' > could be deleted from that file when you C-c C-c (log-edit-done). I often re-use some old commit message, so I think I'd rather rely on a better UI to choose which message to use than on actual deletion of messages we think are unlikely to be useful. IOW I think the "multiple-commit-per-day-per-file problem" needs to be solved by looking more carefully at what happens (e.g. the operation to fetch a previous commit message would likely first give you the most recently added message, which should usually be the right choice, no?). I suspect in your case, the issue with "the multiple-commit-per-day-per-file problem" is simply that add-log.el doesn't know where one entry stops and the other starts (and you can "solve" it by explicitly adding a " " line to separate them), but in the model suggested above, each entry would be naturally separated, so I think the problem wouldn't show up at all. Stefan