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#62817: Extension request: Must-Recover flag for files with auto-save information Date: Sat, 15 Apr 2023 11:23:17 +0300 Message-ID: <83bkjpeeq2.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7017"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62817@debbugs.gnu.org To: Johann =?UTF-8?Q?H=C3=B6chtl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 15 10:24:21 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 1pnbCm-0001cK-Qp for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Apr 2023 10:24:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnbCW-0002XY-GR; Sat, 15 Apr 2023 04:24:04 -0400 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 1pnbCU-0002XP-NN for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 04:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pnbCU-0004MB-Bm for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 04:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pnbCT-0002Qu-Tf for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 04:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Apr 2023 08:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62817 X-GNU-PR-Package: emacs Original-Received: via spool by 62817-submit@debbugs.gnu.org id=B62817.16815470059298 (code B ref 62817); Sat, 15 Apr 2023 08:24:01 +0000 Original-Received: (at 62817) by debbugs.gnu.org; 15 Apr 2023 08:23:25 +0000 Original-Received: from localhost ([127.0.0.1]:48180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnbBt-0002Pu-Bk for submit@debbugs.gnu.org; Sat, 15 Apr 2023 04:23:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnbBr-0002Ph-Bl for 62817@debbugs.gnu.org; Sat, 15 Apr 2023 04:23:24 -0400 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 1pnbBl-0004Ca-V0; Sat, 15 Apr 2023 04:23:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=f+E/aMLH7c3W940QAwIp5DgcAmNYVRQoUcTnJlmBiII=; b=LvQzac/r2O30O3iUGoad NV3pftKfL4AQS0c52NpNu1JBmktpXp2FF1GoCqvFHQcnaJaLvSRLSXczR4sz5w9dJa+lz5hlpi1+y pMuxaHZraVVzWyZQBek2v7qPjYScc+xzfA83jwHDAHJeb5Y9U/C/MmE3Xfhw/Np/nM1EGVQFaHdRc BwTY8dzgaX9ZzNiR0LVIMLhETROhtlzqRt/N2ZK0NqSOSDxju99ry5sQ6LVCccdW3cIimYNepeaXL NwS8Bnv8+wx+LqE21YkpXwIgpFKBpRlZyfVGO2aAFYTuSG1k5IJcNbMSR81PlTFfcLHMpDIzHqdT9 Gvji5OP2n2apqw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnbBk-00068K-T6; Sat, 15 Apr 2023 04:23:17 -0400 In-Reply-To: (message from Johann =?UTF-8?Q?H=C3=B6chtl?= on Thu, 13 Apr 2023 18:42:15 +0200) 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:260001 Archived-At: > From: Johann Höchtl > Date: Thu, 13 Apr 2023 18:42:15 +0200 > > Currently when Emacs crashes, it keeps a list of affected files in auto-save-list. Alternatively when > opening a file where auto-save information is more current than the actual file, emacs will display a > message in the status buffer and keep the entry in messages. > > However, for novice users, this helpful hint can be easily missed, eg. if a verbose mode prints > messages in the status buffer, like lsp-modes comes to mind. In such a case the hint that a more > recent autosave file exists is displayed and will get quickly replaced with other messages. If the user is > not aware of recover-this-file, he will likely overwrite more recent auto-save information with > subsequent edits. > > I propose that this is bad behaviour and a configuration exists which halts any further processing until > the user actively finishes what a manual recover-this-file would offer him to do. This feature makes > sense, especially as of Emacs 29? auto-save-files can be reliably deleted by Emacs itself. I don't think delaying initialization is a good idea. Instead, how about using the warnings facility for showing these messages? See the "Warnings" node in the ELisp Reference manual for more details. In particular, we have a "delayed warnings" feature, which allows to delay the actual display of the warnings till after the running command finishes. Would you like to work on a patch along these lines?