GNU bug report logs -
#52242
29.0.50; Feature Request: Offer to run`diff-buffer-with-file' in `recover-this-file' prompt
Previous Next
Reported by: Visuwesh <visuwesh <at> tutanota.com>
Date: Thu, 2 Dec 2021 12:29:02 UTC
Severity: wishlist
Merged with 53280,
58253
Found in version 29.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
[சனி டிசம்பர் 09, 2023] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm <at> gmail.com>
>> 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:
Thanks for the review.
>> 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 ...
OK, I made it into a separate paragraph and added that it reprompts for
confirmation.
>> ++++
>> +** '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.
Done.
>> +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
Thank you, that is indeed clear. I have now changed the help text to
your suggestion.
[0001-Offer-to-show-diff-against-auto-save-in-recover-file.patch (text/x-diff, attachment)]
This bug report was last modified 1 year and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.