From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75355: [PATCH 1/1] Improve comment cycling in log-edit Date: Sun, 05 Jan 2025 12:37:38 +0100 Message-ID: <87cyh17app.fsf@bernoul.li> References: <20250104162859.13378-1-jonas@bernoul.li> <20250104171108.18590-1-jonas@bernoul.li> <86pll2bezh.fsf@gnu.org> <8734hy1acx.fsf@bernoul.li> <86a5c5afdu.fsf@gnu.org> Reply-To: Jonas Bernoulli Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12457"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75355@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 12:38:26 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tUOxe-00035T-J1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 12:38:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUOxQ-0003Vp-9H; Sun, 05 Jan 2025 06:38:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUOxG-0003VO-Qi for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:38:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUOxG-0006VW-ID for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=4tVOevxeVL6qAo5gcFgm0kDu8RZYXnPGllKdFIoT/z4=; b=sdDcVuKXrmusr/Aht9F+ZoGs8EG4r/vg+wJvVaIIYw9+mEmxkYBGSX+CMgNOsFNPBwglogktWzY97dfrtvQAj3ct4ZUMEHCNDEpCODguShWk2RXfwICnwPRPgQTsw/VYl8a82WtrbwRzod6kYnk71beYvNnNXvKDSDeJvrl/Eih4DTvTc/VpatoeqJlwA1t0IaL9aZS0ZN6rNqrgysSLOMQX+o7MifSHHULV8xxEsiUtCEOwk9DTWAsiW67jJPwyzQrcqHiLFg+9Mgd2ojG8ImIdI49xwvfltC4YcdzetVyZOFlO6sHit3Dc+/TR4th5xit96J2aV2pqBwbxtYl4yg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUOxG-0005Sy-CX for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 11:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 75355-submit@debbugs.gnu.org id=B75355.173607706620945 (code B ref 75355); Sun, 05 Jan 2025 11:38:02 +0000 Original-Received: (at 75355) by debbugs.gnu.org; 5 Jan 2025 11:37:46 +0000 Original-Received: from localhost ([127.0.0.1]:60174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUOwz-0005Rl-Ip for submit@debbugs.gnu.org; Sun, 05 Jan 2025 06:37:46 -0500 Original-Received: from mail.hostpark.net ([212.243.197.30]:37836) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUOwx-0005RY-Ae for 75355@debbugs.gnu.org; Sun, 05 Jan 2025 06:37:44 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id F3F131660B; Sun, 5 Jan 2025 12:37:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from; s=sel2011a; t=1736077060; bh=IdjSpnDaXxot4j5D5V/acUCIrjui4GIl71H2lG5wGQ8=; b= KbMMfFb+UMwfIppyejSIcaBHbHoocqtk4cphodxfXRvWwxSOp5GCXVQrED68aU59 M3HK88Vd6iXM8MfHcjNwH15L4Bo43TZ6KwEoVIZjee+hUXZhwnPLQEdR8Wev5WOm aAcpi4uF2H4BW8GtUOkgRawXVcK7ywcXNZu9ofYrnLI= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id YSzrSDyF2Lrn; Sun, 5 Jan 2025 12:37:40 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 63AA2161E1; Sun, 5 Jan 2025 12:37:40 +0100 (CET) In-Reply-To: <86a5c5afdu.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298545 Archived-At: Eli Zaretskii writes: >> From: Jonas Bernoulli >> Cc: 75355@debbugs.gnu.org >> Date: Sat, 04 Jan 2025 23:29:34 +0100 >> >> Eli Zaretskii 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" >> >> >> >> 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. > > What do you mean by "move away" and "navigate", in the context of > log-edit? The buffer contains a draft to be used as the message for the commit you are about to create. "Moving away" from the message means using the commands log-edit-previous/next-comment to "navigate" to another message. Doing so erased the contents of the buffer, and another recently used message is inserted in its place. >> 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. > > Is this a frequent use case? Why would the same log message be used > for different commits? Using the same or very similar commit messages across different repositories is a very frequent occurrence for me. The last such message was "Bump copyright years", but through out the year I also use messages such as "Fix spelling errors", after running a spell-checker on all my packages. Granted, those two examples didn't need a "template". I also frequently fix some class of error across many third-party packages, as part of my work on Melpa and the Emacsmirror. In such cases I often write a long, message explaining why something should be done a certain way. The message is almost the same for every repository/package but I try to use the names of the files in each particular repository, to make things more engaging and actionable for each individual package maintainer. Note that the command log-edit-save-comment is also used in code twice, so the cost of making it a command is just the line " (interactive)". If you feel this command is not useful enough to receive a default key bindings, we can drop that, but the interactive form should remain.