GNU bug report logs - #75355
[PATCH 0/1] Improve comment cycling in log-edit

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Sat, 4 Jan 2025 16:30:02 UTC

Severity: wishlist

Tags: patch

Full log


View this message in rfc822 format

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75355 <at> debbugs.gnu.org
Subject: bug#75355: [PATCH 1/1] Improve comment cycling in log-edit
Date: Sat, 04 Jan 2025 23:29:34 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Sat,  4 Jan 2025 18:11:08 +0100
>> From:  Jonas Bernoulli via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> Save the current message before cycling to older messages, making it
>> possible to cycle back to that initial message.
>
> Thanks, but can you provide some rationale for this?  Is the
> assumption that users need to make several commits that all share the
> same comment or something?

That is one use-case for the feature as it exists now, yes.  Messages
are already automatically saved once the user either finished or aborts
the commit.

These changes don't really affect that.  I consider this additional
automatic saving a bugfix.  Without it, a user may start typing a new
message, decide to use a recent message instead, navigate to it but then
change their mind about that, and then they would not be able to go back
to the new message they had already started typing, because it was
discarded when they moved a way from it.  By saving the new message when
we move away from it, we make it possible to navigate back to it.

By additionally defining log-edit-save-comment as a command we gain the
ability to save the message at random point.  This could, for example,
be useful if we have to use very similar messages in different commits,
potentially across multiple repositories.  We could then write the
common part, save it as a "template", edit it some more, and finally
create a first commit.  Without the save command we could rely on the
automatic saving at the very end of that process, which would mean that
when creating the second commit we could not use the template as such,
but only template with the modifications for the first commit already
filled in.  More editing could be required to go from that to what we
actually want to use in the second commit.




This bug report was last modified 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.