From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52242: 29.0.50; Feature Request: Offer to run`diff-buffer-with-file' in `recover-this-file' prompt Date: Sat, 09 Dec 2023 11:33:18 +0200 Message-ID: <83h6kryb35.fsf@gnu.org> References: <8734wfwxi4.fsf@gmail.com> <87wmtqvaqb.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15879"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52242@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 09 10:34:11 2023 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 1rBtis-0003sv-TU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Dec 2023 10:34:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBtiZ-0006RK-Js; Sat, 09 Dec 2023 04:33:51 -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 1rBtiW-0006Ql-U5 for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:33:49 -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 1rBtiW-0007hk-BJ for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:33:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBtij-0004Le-OR for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2023 09:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52242 X-GNU-PR-Package: emacs Original-Received: via spool by 52242-submit@debbugs.gnu.org id=B52242.170211443616701 (code B ref 52242); Sat, 09 Dec 2023 09:34:01 +0000 Original-Received: (at 52242) by debbugs.gnu.org; 9 Dec 2023 09:33:56 +0000 Original-Received: from localhost ([127.0.0.1]:46833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBtid-0004LJ-T4 for submit@debbugs.gnu.org; Sat, 09 Dec 2023 04:33:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBtib-0004L2-MQ for 52242@debbugs.gnu.org; Sat, 09 Dec 2023 04:33:54 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBtiI-0007gs-Rz; Sat, 09 Dec 2023 04:33:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qjOWV8b1l+7cux3uxXP0SyvHuY/kWA034o6SCPwKTnw=; b=d+jDAGdDkK4i cYSRw+m3mzklvPR3qBJiJ4Do7Yk26H69GzaeFx5xXYW5duONa9Mkcl4KC8AxvJYMghFmQIwojYfml 2BiuhxklphFNzogHSu7jntHi+nR6kJuA9ngsd/SQp23Zw/P5RpWKWiMgK/dJKgHflwOEwfCznOoez n3yCmrpOHtrqAaesu+gxAXmrrjL8bIdNzzaqJq5VHsyvjpi9qHMk8mAUDsvu29ElsOzW73O3fVy3I TKviyUtaIT4ASoWShapAdGiICycV3SJcVCSfXvTb3sh7LfuameMGNfWFkzUIn9tllWOa/4yJC46EA 5FYiiWQq90euUP1LH+2VBQ==; In-Reply-To: <87wmtqvaqb.fsf@gmail.com> (message from Visuwesh on Thu, 07 Dec 2023 11:02:28 +0530) 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:275837 Archived-At: > From: Visuwesh > Date: Thu, 07 Dec 2023 11:02:28 +0530 > > I didn't notice that recover-file was covered in the Emacs manual, I > have now updated the manual and marked the NEWS entry accordingly in the > attached patch. Thanks, I have a few comments: > diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi > index 917e937d32d..c791a6f1c98 100644 > --- a/doc/emacs/files.texi > +++ b/doc/emacs/files.texi > @@ -1325,9 +1325,11 @@ Recover > @end example > > Before asking for confirmation, @kbd{M-x recover-file} displays a > -directory listing describing the specified file and the auto-save file, > -so you can compare their sizes and dates. If the auto-save file > -is older, @kbd{M-x recover-file} does not offer to read it. > +directory listing describing the specified file and the auto-save > +file, so you can compare their sizes and dates. If you answer > +@kbd{diff}, it shows the diff between @var{file} and its auto-save > +file @file{#@var{file}#}. If the auto-save file is older, @kbd{M-x > +recover-file} does not offer to read it. It is better to make the documentation of the 'diff' response separate from the rest, since the original text doesn't describe the responses at all, it only mentions the need for confirmation. So I suggest to leave the text starting at "Before asking for confirmation" alone, and add a new paragraph after that one, like this: When @kbd{M-x recover-file} asks for confirmation, if you respond with @kbd{diff} or @kbd{=}, it shows the diffs between ... > ++++ > +** 'recover-file' can show diff between auto save file and current file. ^^^^ We use "diffs", plural. > +When answering the prompt with "diff" or "=", it now shows the diff ^^^^ Same here. > +between the auto save file and the current file. > + (choices > + '(("yes" ?y "recover auto save file") > + ("no" ?n "don't recover auto save file") > + ("diff" ?= "diff auto save file with current file"))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Maybe a better text would be show changes between auto save file and current file > + ans) > + (while (equal "diff" (setq ans (read-answer prompt choices))) > + (diff file file-name)) > + (equal ans "yes")) Thanks.