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: Sat, 04 Jan 2025 23:29:34 +0100 Message-ID: <8734hy1acx.fsf@bernoul.li> References: <20250104162859.13378-1-jonas@bernoul.li> <20250104171108.18590-1-jonas@bernoul.li> <86pll2bezh.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="18308"; 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 Sat Jan 04 23:30:20 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 1tUCex-00048W-Cz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 23:30:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUCel-0006Ig-Op; Sat, 04 Jan 2025 17:30:07 -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 1tUCei-0006H1-Ai for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 17:30:05 -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 1tUCeg-0003Oh-9u for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 17:30:03 -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=3man9wpI78rA6rlXH8Oou1KLtrwEnxuI1iCbkSLa15I=; b=ZEYNCNFPoAr5U+SQ53v4MPn69OfRHOJcH0JRK3SMHKy6UgV2u24pZX5UgA5Iyd0mghcG42xlqtMW6K2Td0HjXlui6QMzVz7K3QIDNw5sYNESVs3EFf8+6dTpDEtw2NnPwOcyhUe7+KZlPXJFOTNJ3izp1HMLORu0BaSG9F8TDbR4TEuarREnndvUSE1Gxk9t5aEzE7KM1tLrnm4nzE85Ys5qkTmaEkuED0yjzizDW5Q8zcEtAH0KIcDnK3oyyUKcGfx4V33y4Z94xtnTFXKS5ARzo9qLnN1vEOSJMkLNHv7WfaAynjsm2wf1GmNb5bG+XYHfUeuxnT8m4VQRa2PMSA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUCeg-0000Ey-4H for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 17:30: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: Sat, 04 Jan 2025 22:30: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.1736029783864 (code B ref 75355); Sat, 04 Jan 2025 22:30:02 +0000 Original-Received: (at 75355) by debbugs.gnu.org; 4 Jan 2025 22:29:43 +0000 Original-Received: from localhost ([127.0.0.1]:57840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUCeM-0000Dr-NQ for submit@debbugs.gnu.org; Sat, 04 Jan 2025 17:29:43 -0500 Original-Received: from mail.hostpark.net ([212.243.197.30]:39008) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUCeK-0000Dg-0i for 75355@debbugs.gnu.org; Sat, 04 Jan 2025 17:29:41 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 25CFD164B1; Sat, 4 Jan 2025 23:29:37 +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=1736029776; bh=Oe7Ep9eVq5ZlWJ+g8Xs/Ln1rmeRGtiFAUoqsKjUeOIg=; b= 0Hblm4zEQluQLv5dtEFIHH0NHqM/V8Khw9NadudXT/W9F2we2BerZn/r9x5BV1B4 MRAO5SgMAOwnzCUXx4F376h6eXZ3MWXlJZ10gqkp74hMbZANl2rFTbjPbKHF/lvB 8qlV8v2qyIISRSEZcckvU3wriEnvzB5dja6gnemYQes= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id lyTs-0MFJB4D; Sat, 4 Jan 2025 23:29:36 +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 8CD7816466; Sat, 4 Jan 2025 23:29:36 +0100 (CET) In-Reply-To: <86pll2bezh.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:298489 Archived-At: 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. 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.