From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: When suggesting a file recovery, emacs should maybe check for actual changes Date: Sun, 2 Oct 2022 08:07:33 -0700 Message-ID: References: <87wn9i73ks.fsf@autistici.org> <83tu4m1gn1.fsf@gnu.org> <83pmfa1eq3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39634"; mail-complaints-to="usenet@ciao.gmane.io" Cc: andrea.monaco@autistici.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 02 17:08:24 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 1of0Zs-000ACz-Mu for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 17:08:24 +0200 Original-Received: from localhost ([::1]:40204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of0Zr-000894-1x for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Oct 2022 11:08:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of0Z6-0007Sx-Ok for emacs-devel@gnu.org; Sun, 02 Oct 2022 11:07:36 -0400 Original-Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]:34574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of0Z5-0003Qb-6m; Sun, 02 Oct 2022 11:07:36 -0400 Original-Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1321a1e94b3so4797509fac.1; Sun, 02 Oct 2022 08:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date; bh=1GeskGKpSrmk/W/+pZQA15ocOWBwsoSlBEUEajUW7CE=; b=CfaC7X8T3vqkV5pr3/sxXXXa2Bbk/1URYJLfSl9lAoqYNe9kyKT/h6mLy7OUQfTwTt eLHCH/VCaR5GsB9ZdKhjhlfdPBeJu6Hnqocb0JLVvXnmYcZZFu/jFzSXYc7PJgbOgO2k aR5Q/WCtdHYteA3RBymJZQTFOtdTTk+Zu2MA8U34+4isYefCzPrUWzZpb4KUgNoYaxIY Tv+QD2/TEbzJ6ZoRntP/EGJgYzn4NZRw2BV4FNL5TTIy4TGJiHgkqll9xCWQqdkiYfFc bkLraSKBYQZkhe5cSgTY5/OKurUVuSi+w5Hw1pjdpw2RIya7WSALVPVsq2n+ppD7BFh7 xm/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date; bh=1GeskGKpSrmk/W/+pZQA15ocOWBwsoSlBEUEajUW7CE=; b=RyDFeRrwdMr0a5+6tKlRFK4rx1FIPEmE8C6pueI3/1d25AlZ/u/tGo0BaL5Q/dAkii P5kG918p+lw9rwQeLjNuNtumUI9dUkF51wYnbzYiCqwReaiowYzCKFE4KnYlN2YVeeqn 4kIAtOHnUx/Qlzyzl5GRsWV/HDRwz3TfHO47gLlF2fuH1ozB2Kv8HKcbvV//WjSvt8Sa Ff1IcbJZN+hmyxdMkscHBXuiKypP6SCAIhZVCQQwNeA9iPfyUsxf9LYWUtnbvQL/vYb9 7PXYgNjlo5FeYn+qKBH1KsiH4115yBXxGP5MCkSBTEfuM/5DrXTHe13TFAIIMtB097hN LWWA== X-Gm-Message-State: ACrzQf33OddHMURQ4vFhYEYBa+ItNmwoZ3t1UVghrqHuW8V0EcPhjT6Q iPQMbKaySzravfVlxCfyRs5fnDffr5eYjkWW/0Y7T3GC X-Google-Smtp-Source: AMsMyM7BjBPHrbn25tvquSHMmZdYVSBjGbP/qwfKnJEAOsH34KcxeH0Wqjr8f36OpE3JQ6y86o3OJzZ2UpXt+qmauFg= X-Received: by 2002:a05:6870:d38e:b0:132:7895:e135 with SMTP id k14-20020a056870d38e00b001327895e135mr18609oag.199.1664723253518; Sun, 02 Oct 2022 08:07:33 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 2 Oct 2022 08:07:33 -0700 In-Reply-To: <83pmfa1eq3.fsf@gnu.org> X-Hashcash: 1:20:221002:emacs-devel@gnu.org::B6bR2hFKYpP0YlEs:2RB6 Received-SPF: pass client-ip=2001:4860:4864:20::2f; envelope-from=stefankangas@gmail.com; helo=mail-oa1-x2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:296622 Archived-At: Eli Zaretskii writes: > 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? You're right that it sounds a bit scary on the face of it. Maybe it's okay if we do it in Emacs 30, and add tests? Adding tests would of course be good even if we don't make any changes. > If the file is identical, restoring from it does no harm, does it? No, but it's somewhat jarring. Especially with files that are not under version control. My usual response, if I care enough about the file, is to manually make a copy, restore the file from Emacs, and then check the diff. Now that I think about it, this suggests another nice feature to have would be to show the diff directly from the Emacs prompt.