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 16:47:46 +0300 Message-ID: <83tu4m1gn1.fsf@gnu.org> References: <87wn9i73ks.fsf@autistici.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26532"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Andrea Monaco Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 02 15:49:21 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 1oezLM-0006ja-Rt for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 15:49:21 +0200 Original-Received: from localhost ([::1]:42204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oezLL-0004Cp-R2 for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 09:49:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oezKA-0002b1-D9 for emacs-devel@gnu.org; Sun, 02 Oct 2022 09:48:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oezK9-0008S8-Fq; Sun, 02 Oct 2022 09:48:05 -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=TWf9I6VQE2G/c5lf1HdORkufu3dhxmAyhlvaGt1kXME=; b=a/F5zkN7UmDf 0tKl+nbMBpNTwZ4tWeqvj41bOl6075zYh+gjs+o5RiV70OXB5dxhdhiQJgFPmMG6NSBNSYEIe5eNt MzeEncwgdZrmF91eAs5sEeVkEMqYMtbR+4pPd0t3HMGLHyrYQLVghxKQiCptvq/Kx5xFx5o0tl+H5 TYU1UypcezaH2RrNR3cFL9bRx0UPHotFVgKVwxiNeE0zZXCo2VOdxz9oro5H+i089DwMva9mTTqlH UgNFaoqAx2cZUqAEsg7kQPjBbTbBgP2v8T7rSEthrO6Q04HgxcOGBXGOLjl3NrkyfYrc8B59K8hH2 wZj1f6T/yQlP/IX+x4bKrA==; Original-Received: from [87.69.77.57] (port=2550 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 1oezK6-0008AU-Uc; Sun, 02 Oct 2022 09:48:05 -0400 In-Reply-To: <87wn9i73ks.fsf@autistici.org> (message from Andrea Monaco on Sun, 02 Oct 2022 15:33:23 +0200) 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:296608 Archived-At: > From: Andrea Monaco > Date: Sun, 02 Oct 2022 15:33:23 +0200 > > > After an unclean shutdown, I opened a file, say main.c. Emacs said that > the file had auto-save data and suggested a recover-this-file. But upon > checking, #main.c# was byte-by-byte identical to main.c. This generally happens only with plain-ASCII files. Non-ASCII files are saved in auto-save files in the internal representation, which is generally different from the bytestream in the original file. > 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?