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.devel Subject: Re: When suggesting a file recovery, emacs should maybe check for actual changes Date: Sun, 02 Oct 2022 17:29:08 +0300 Message-ID: <83pmfa1eq3.fsf@gnu.org> References: <87wn9i73ks.fsf@autistici.org> <83tu4m1gn1.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21890"; mail-complaints-to="usenet@ciao.gmane.io" Cc: andrea.monaco@autistici.org, emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 02 16:31:13 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oezzs-0005Z0-Ay for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 16:31:12 +0200 Original-Received: from localhost ([::1]:43890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oezzr-0002kW-DC for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 10:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oezy3-0001zN-Ch for emacs-devel@gnu.org; Sun, 02 Oct 2022 10:29:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oezy2-0006Nd-52; Sun, 02 Oct 2022 10:29:18 -0400 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=hlLcHtYofcabrtOWUT/Q5mLGEzDtYnUpY/1FhNTE+v8=; b=XL3LImFiVsjk gnvJVAHziCS4FagRM8ZeMMJ35EtGRWUR1yJTt0KEuMweqA12WZG3YeADVh4x9wIj5u+R90SkkaY+A 09FpZo8WpgkZVjUtTjdSJqZCU57CCfDOpeLPXMrwZmab4ps5OOMCnWySWQUdm50F7EsvNJ4A+AJhu FZccNLbgmk3jJN2J74GRx5KI0rl7wm6AUelnXcC1sGEi8LrFSAkUOHEQqkJwkY9UfU31/SN7BLFdq zZ3tfsr4RZ6NcQ7QX2kH0A0jY3AnvmcXzAx4ZYqcFGFY6o0i/oRMOQIs9gLSU1G7qB+w5qD3ec+7Z Vt9tf+Qnt/neHf8oX5wttg==; Original-Received: from [87.69.77.57] (port=1225 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 1oezy0-0006t6-LH; Sun, 02 Oct 2022 10:29:17 -0400 In-Reply-To: (message from Stefan Kangas on Sun, 2 Oct 2022 07:08:52 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296616 Archived-At: > From: Stefan Kangas > Date: Sun, 2 Oct 2022 07:08:52 -0700 > Cc: emacs-devel@gnu.org > > Eli Zaretskii writes: > > >> Maybe emacs should check that the auto-save file is not identical before > >> suggesting a recover-this-file. Do you agree? > > > > Why is it a problem that they are identical? > > Either the user or Emacs could verify that the files are identical. > Currently, the user has to do that work. If it was the other way > around, the user would not have to. > > Maybe I'm missing something, but I believe that in that case Emacs > wouldn't even have to show a prompt. The recovery file could just be > deleted, as it doesn't contain anything new. I'm asking if this is an important enough situation to add code that could be buggy to a feature that basically must be 110% safe? If the file is identical, restoring from it does no harm, does it?