From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Kanis Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] show difference when recovering file Date: Mon, 17 Dec 2012 11:53:12 +0100 Message-ID: <871uep9ch3.fsf@googlemail.com> References: <877goi0wcz.fsf@kanis.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355742077 12401 80.91.229.3 (17 Dec 2012 11:01:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Dec 2012 11:01:17 +0000 (UTC) Cc: emacs devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 17 12:01:28 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TkYRr-000496-AD for ged-emacs-devel@m.gmane.org; Mon, 17 Dec 2012 12:01:27 +0100 Original-Received: from localhost ([::1]:55864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkYRe-0004wg-3L for ged-emacs-devel@m.gmane.org; Mon, 17 Dec 2012 06:01:14 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkYNO-0003uO-NP for emacs-devel@gnu.org; Mon, 17 Dec 2012 06:01:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkYJv-0007t5-Qx for emacs-devel@gnu.org; Mon, 17 Dec 2012 05:56:50 -0500 Original-Received: from mail-wg0-f51.google.com ([74.125.82.51]:58873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkYJv-0007sm-Ki for emacs-devel@gnu.org; Mon, 17 Dec 2012 05:53:15 -0500 Original-Received: by mail-wg0-f51.google.com with SMTP id gg4so2553148wgb.30 for ; Mon, 17 Dec 2012 02:53:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:face :x-hashcash:x-hashcash:date:message-id:mime-version:content-type; bh=XLu0aEyy2ZJlX77QXdxZJ4qALMJZyeSjSOpZbceujuA=; b=HrKA4d1507Ou3b6EAFQOmSNkylKEnCXnMsHq/VojXOZsUHpE9iNevOEiVPZGTmGJtk UAIFfkgYGWol88E9/TNUazlWXCdzIBO71V8Dxm3mPBf8xjHVzNkkzWdaVG8HjaotVGR5 2EvG6hjPbwkmmzqmUGqhGyohThn9NbA6gY4wSTFrsbHdzw0crDC53rdxmCdjguthNQhJ V3YCyfSl0GFlSkV5Ou/jrop7PEnBH+Rr+XV80nsl0Y3OwcZHW0y3IQfj/rCymeCZZ9Xj zT4z7PTrFo+Mk1oaEyFsbTnRtpr82HaGds4seDAejOxaJ6YThrlYD8rpHf0SOmLUYymw sqag== Original-Received: by 10.180.95.228 with SMTP id dn4mr14856814wib.16.1355741594346; Mon, 17 Dec 2012 02:53:14 -0800 (PST) Original-Received: from tao (lns-c10k-ft-02-t2-89-83-137-164.dsl.sta.abo.bbox.fr. [89.83.137.164]) by mx.google.com with ESMTPS id ew4sm11114855wid.11.2012.12.17.02.53.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Dec 2012 02:53:13 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 16 Dec 2012 16:55:31 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAAB5QTFRF IBkXUxMTOCwoTC4qcUY8iFxQmmper31txpaJ/v/8aKZ1oAAAAcVJREFUOMt100tu2zAQAFDCXnUZ oAcIqG68LZULVLQBbwuSiffm6AIRRyeotAySJoVu2+FPpJWWC3/4NKOZocSW/yxWfnJ2+Bdwzhj7 8gleWVy7DXC2rkMNr2V/zRbghXIwthf3VbIA9Ffc71vZCSFyCEsBggtNS8ludwvfmhYA0Vn9o4DP zMWxR7+cPWzAYFzwM0ModtdmcDbDS6i/hT7L+RZof5yCXGrYe5jn2YO6BYMjgY+51tCIAqHgBLwR pwLnGuRjAKyBJkuN4yd4U92uCY1vUr2D/c5b8DuxyQwfOHUeaLqDJhnkkuGXbB56h2C1IVBdgncc bBi6feroa9B6jUDojnQPQKupbyXyeeCE1oT7Oqrt+SnfY3mkiyGA/3AmD3H5g32CcBx6hY8pRkwJ 9PpcjRGobUfprFnhAa1vepwcgMOhwG+pdSgKHFU9HAvoAH6XUl7lDUCCq5Qb6GMbVm3Aj++qDYCt wdBc/YHgOFCmS3mjDMRcSE2qY4E3Q3PVIQRQmeodNH4QEbRUFZzW+VotzwX4yTcRTySOML1qjcE5 hTirVqDHkMAP0PjAywp3d18JZtqzvr9zDYD+GaSKtE6Zlr/DLPNFmOcvBAAAAABJRU5ErkJggg== X-Hashcash: 1:20:121217:emacs-devel@gnu.org::98v77GEX75TKTtXo:0000000000000000000000000000000000000000000bWC X-Hashcash: 1:20:121217:monnier@iro.umontreal.ca::9LtpEwXC9CgcXR3H:00000000000000000000000000000000000000ROa X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155612 Archived-At: Stefan Monnier wrote: >> This trivial patch offer to see the difference between the current file >> and the backup file. This helps making the decision whether one wants to >> recover the file. > >> + (diff file file-name) > > There's a problem here: the autosave file is saved using the internal > coding-system (so it always succeeds, no matter what weird mix of > characters happens to be currently in the buffer), where the > non-autosave file will use the encoding which happens to be in use for > this file. Is it possible to open the non-autosave file in the internal format just to run the diff? I guess not. > So the diff may show lots of spurious changes. I think it's a borderline case. It's more useful to see what the difference is between the two files even though on rare occasion the diff will show garbage -- Ivan Kanis http://ivan.kanis.fr I had an interest in death from an early age. It fascinated me. When I heard 'Humpty Dumpty sat on a wall,' I thought, 'Did he fall or was he pushed?' -- P.D. James