GNU logs - #66061, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#66061: 30.0.50; [PATCH] diff-buffer-with-file should reverse the order if the file is modified
Resent-From: Bob Rogers <rogers@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 17 Sep 2023 23:56:01 +0000
Resent-Message-ID: <handler.66061.B.16949949082149 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 66061
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 66061 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16949949082149
          (code B ref -1); Sun, 17 Sep 2023 23:56:01 +0000
Received: (at submit) by debbugs.gnu.org; 17 Sep 2023 23:55:08 +0000
Received: from localhost ([127.0.0.1]:51626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qi1bY-0000Ya-19
	for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 19:55:08 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60128)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rogers@HIDDEN>) id 1qi1bU-0000Xz-R4
 for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 19:55:06 -0400
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 <rogers@HIDDEN>) id 1qi1bE-0007te-8m
 for bug-gnu-emacs@HIDDEN; Sun, 17 Sep 2023 19:54:48 -0400
Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <rogers@HIDDEN>) id 1qi1bB-0001yD-4V
 for bug-gnu-emacs@HIDDEN; Sun, 17 Sep 2023 19:54:48 -0400
Received: by mail-ot1-x32c.google.com with SMTP id
 46e09a7af769-6bd04558784so2524233a34.3
 for <bug-gnu-emacs@HIDDEN>; Sun, 17 Sep 2023 16:54:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=rgrjr-com.20230601.gappssmtp.com; s=20230601; t=1694994883; x=1695599683;
 darn=gnu.org; 
 h=subject:to:date:message-id:content-transfer-encoding:mime-version
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=BWy6ECuKycWy2RfSOLuMLAIRkdNx+tgJQcC+tji2SYI=;
 b=kWeYlkuJHSYt8U8XnhKHefVvOFfAEQce7V8Jkpr+QRBbAITAWMYR7MldQnOBWVvnxX
 MCPZ5nE9JfBZ7CBykLk1UplEW33x92k2ww3R5neJlTff24vQUNFad3Ww3YHGQhOYe82a
 KdgnqFTNPjYFQRFBL7nVFztNydfWSAd/9AHvRShn0YXDFZzIwLBVK8ckloePag7i/Aep
 Q3z8t5Vmd7rQzLnGgrR85IJwbsbG9aYpuLEthmLIXU+klItbPZDJ3w5TuO3JSgkYKTf3
 LMyUiyyTczO65vByjzV3V7WeITgVXF6p1IDXfolzLimLx/h+CVb8/Kt5tiVN4Kx29oOa
 n5KQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1694994883; x=1695599683;
 h=subject:to:date:message-id:content-transfer-encoding:mime-version
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=BWy6ECuKycWy2RfSOLuMLAIRkdNx+tgJQcC+tji2SYI=;
 b=T6lWeYelBgYyWYiBufetFyjt39MWBdwJyWU7obU32i1q6LVgSHTihsGeafjEUIg54T
 5Jkvw3pUQifNyMgHp30ACls8h7PIzN7g4AYJ2kuzUjs3hce46L0ZiHkfatlyXGUuG3FS
 fEjm/b9JK+jjFQqx4gqrOxmaRJsnwUwjRivPAX62tzCW9Mq00B6ev/RemamBYzZyjjv6
 tpiRdnSbbK2mBdyYoSzghJMig7EAl94RP6Qo6SO3rFssbU2o34PR13IRX7wBMqUwom92
 PpaLJcWrqbJuSujLfnNcCT9hWZMAiFN2YgjrkdAWFttOVZZRpbFXU6UEOCWYJWCCFmhF
 MQOw==
X-Gm-Message-State: AOJu0Yw9JX7b5z8lQCpW7v9GL+h7BsOVlIsrRPqc6t9Takdhxv3PVLu4
 +aqxgTzV8vicxFyR99Q27CxKnAR/evy54M381tQ=
X-Google-Smtp-Source: AGHT+IHe/6nH+Ph64Q5z7ZZQXOAF3pKMQAey8VWXHeaB4gUl8yG2dUJSfDP2DkbDJaX1xcmIJKNhDw==
X-Received: by 2002:a05:6830:617:b0:6b8:90cd:47b5 with SMTP id
 w23-20020a056830061700b006b890cd47b5mr9178331oti.7.1694994883439; 
 Sun, 17 Sep 2023 16:54:43 -0700 (PDT)
Received: from orion.rgrjr.com ([2600:1700:7c2c:e000::22])
 by smtp.gmail.com with ESMTPSA id
 v10-20020a63ac0a000000b00563e1ef0491sm5750761pge.8.2023.09.17.16.54.42
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 17 Sep 2023 16:54:42 -0700 (PDT)
From: Bob Rogers <rogers@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	 boundary="7lRsBY2lEc"
Content-Transfer-Encoding: 7bit
Message-ID: <25863.37313.113980.876021@HIDDEN>
Date: Sun, 17 Sep 2023 16:54:41 -0700
X-Mailer: VM 8.2.0b under 30.0.50 (x86_64-pc-linux-gnu)
Received-SPF: none client-ip=2607:f8b0:4864:20::32c;
 envelope-from=rogers@HIDDEN; helo=mail-ot1-x32c.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--7lRsBY2lEc
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit

   If you use diff-buffer-with-file in an unmodified buffer after the
file has changed on disk, the buffer and file are logically reversed;
the modified file is treated as the old version, and the original buffer
as the new one.  It may seem like this is inconsistent, but since I am
expecting diff to show me what has changed but instead find myself
looking at the reverse, I find reading the resulting diff awkward and
somewhat jarring.

   The attached patch reverses the order of the arguments to diff only
when the buffer is unmodified.  Either the file has changed on disk, in
which case it is probably newer, or it hasn't, in which case the diff
will be empty anyway so the order doesn't matter (and that saves
checking the actual file mod time).  If the buffer is modified, then it
could be that both have changed, but then it's a tossup which should go
first.

   Note that this doesn't affect the user experience of typing C-c C-c
in the resulting diff buffer; it still takes you to the same place in
the buffer.  (After asking if you want to revert, every single time.
Which could be the subject of another bug/enhancement.)

					-- Bob Rogers
					   http://www.rgrjr.com/

------------------------------------------------------------------------
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.34, cairo version 1.16.0) of 2023-09-14 built on orion
Repository revision: 1442f4043a7
Repository branch: rgr-smtpmail-env-from
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: openSUSE Leap 15.5

Configured using:
 'configure --with-dbus=no --with-gsettings=no --with-gif=ifavailable
 --with-tiff=no --with-gnutls=yes --with-gconf=no'

Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBSELINUX LIBXML2
MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS
TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix


--7lRsBY2lEc
Content-Type: text/x-patch;
	 name="diff-buffer-with-file-rev-if-disk-changed-1.patch"
Content-Description: 
Content-Disposition: inline;
	 filename="diff-buffer-with-file-rev-if-disk-changed-1.patch"
Content-Transfer-Encoding: 7bit

diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index a411d98da31..dfa44fc00d6 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -266,7 +266,13 @@ diff-buffer-with-file
     (with-current-buffer (or (buffer-base-buffer buf) buf)
       (unless buffer-file-name
         (error "Buffer is not visiting a file"))
-      (diff buffer-file-name (current-buffer) nil 'noasync))))
+      ;; If the buffer is unmodified, then the file version may be
+      ;; newer, so use the buffer as the old version.
+      (if (buffer-modified-p)
+          ;; Assume the buffer is newer (though both could be modified).
+          (diff buffer-file-name (current-buffer) nil 'noasync)
+        ;; Disk version may be newer.
+        (diff (current-buffer) buffer-file-name nil 'noasync)))))
 
 ;;;###autoload
 (defun diff-buffers (old new &optional switches no-async)

--7lRsBY2lEc--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Bob Rogers <rogers@HIDDEN>
Subject: bug#66061: Acknowledgement (30.0.50; [PATCH] diff-buffer-with-file
 should reverse the order if the file is modified)
Message-ID: <handler.66061.B.16949949082149.ack <at> debbugs.gnu.org>
References: <25863.37313.113980.876021@HIDDEN>
X-Gnu-PR-Message: ack 66061
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Reply-To: 66061 <at> debbugs.gnu.org
Date: Sun, 17 Sep 2023 23:56:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 66061 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
66061: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D66061
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#66061: 30.0.50; [PATCH] diff-buffer-with-file should reverse the order if the file is modified
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 18 Sep 2023 10:49:02 +0000
Resent-Message-ID: <handler.66061.B66061.169503408330540 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 66061
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Bob Rogers <rogers@HIDDEN>
Cc: 66061 <at> debbugs.gnu.org
Received: via spool by 66061-submit <at> debbugs.gnu.org id=B66061.169503408330540
          (code B ref 66061); Mon, 18 Sep 2023 10:49:02 +0000
Received: (at 66061) by debbugs.gnu.org; 18 Sep 2023 10:48:03 +0000
Received: from localhost ([127.0.0.1]:52180 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiBnP-0007wV-4p
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 06:48:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56906)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qiBnM-0007vM-Rv
 for 66061 <at> debbugs.gnu.org; Mon, 18 Sep 2023 06:48:01 -0400
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 <eliz@HIDDEN>)
 id 1qiBn9-000767-Ay; Mon, 18 Sep 2023 06:47:47 -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=t54KLHLCAUUY+31DJkw5OiZQWjgxau/k8DmAJTeVA0I=; b=Y371cfFVxqvW
 y8ghrYkZvzJV3gy7R+WsLQGgXcQA4Uyse60uOTSgXaWxZt1aEFzCVqvKXqtzsexnGs3+g64iCMT5T
 pIRhfYnpviSwhimAmQ4+f4sKHPCclBRIyANFyuzBpPK2U9ARuVd1voUWK5QvWAeTRCtmXhmGfHleG
 gvWirJTz7tA9owvpxswuSnlT05hifGLS9o079Ef2M9ulBQmzh5/k7C/8grP55//eUiJENu7O4CWSk
 /5IAecOnGN8yhYurqT9AiF0BEPAhRamkeJyvz+WA5d85hj/VzLEupO8HYG2fDXSTrsCFXj+8oi7Li
 2YNC8X8a8BVKaEs5i9pA2Q==;
Date: Mon, 18 Sep 2023 13:47:39 +0300
Message-Id: <83cyyfg3lg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <25863.37313.113980.876021@HIDDEN> (message from Bob
 Rogers on Sun, 17 Sep 2023 16:54:41 -0700)
References: <25863.37313.113980.876021@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Bob Rogers <rogers@HIDDEN>
> Date: Sun, 17 Sep 2023 16:54:41 -0700
> 
>    If you use diff-buffer-with-file in an unmodified buffer after the
> file has changed on disk, the buffer and file are logically reversed;
> the modified file is treated as the old version, and the original buffer
> as the new one.  It may seem like this is inconsistent, but since I am
> expecting diff to show me what has changed but instead find myself
> looking at the reverse, I find reading the resulting diff awkward and
> somewhat jarring.
> 
>    The attached patch reverses the order of the arguments to diff only
> when the buffer is unmodified.  Either the file has changed on disk, in
> which case it is probably newer, or it hasn't, in which case the diff
> will be empty anyway so the order doesn't matter (and that saves
> checking the actual file mod time).

I don't think we can automatically always reverse them in this case.
Here's a simple case where we shouldn't:

  . visit a file
  . make some edits
  . save the buffer to the file
  . copy from the backup file (or some other previous version) over
    the edited file on disk

I think only the user knows what is "old" and what is "new".  We
should, of course, allow the user to reverse them, but we shouldn't
reverse automatically.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#66061: 30.0.50; [PATCH] diff-buffer-with-file should reverse the order if the file is modified
Resent-From: Bob Rogers <rogers@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 18 Sep 2023 16:04:02 +0000
Resent-Message-ID: <handler.66061.B66061.169505303916230 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 66061
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 66061 <at> debbugs.gnu.org
Received: via spool by 66061-submit <at> debbugs.gnu.org id=B66061.169505303916230
          (code B ref 66061); Mon, 18 Sep 2023 16:04:02 +0000
Received: (at 66061) by debbugs.gnu.org; 18 Sep 2023 16:03:59 +0000
Received: from localhost ([127.0.0.1]:54207 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiGj8-0004Dh-RI
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 12:03:59 -0400
Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:50444)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rogers@HIDDEN>) id 1qiGj4-0004DF-77
 for 66061 <at> debbugs.gnu.org; Mon, 18 Sep 2023 12:03:57 -0400
Received: by mail-pg1-x52c.google.com with SMTP id
 41be03b00d2f7-577f6205f42so3381012a12.1
 for <66061 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 09:03:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=rgrjr-com.20230601.gappssmtp.com; s=20230601; t=1695053019; x=1695657819;
 darn=debbugs.gnu.org; 
 h=references:in-reply-to:subject:cc:to:date:message-id
 :content-transfer-encoding:mime-version:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=rZrUdBObGuy6EnsYf/A1pH7LRkUWym462piqpaCwRi0=;
 b=ZUoXW8zyaDo1FaljHV3+dKySVhOB1g6GxmvtwkTr/xqeQQm8X8yuJGcGtoRi3hsUPL
 kbdkE5CGPuLUblLkBK+dC/tN1iT0tJESLsQiIVrf0ADrW8Ngqcvqo2yrwNVrZySZ0FEd
 O63SE4dbV4ixq/EjFZ3Ql88s76nPwP/AixHZtMYrNs9TLjccUgR3xxr+krlQlFH0hesG
 YzMtlLTPZi6ap8CVuuwC0k9wwydYBxQnbPdXHxR0O9xQGYB4FUE1umV42Af8iy2Q7/Xe
 VnEtREQdC/2qXUcN6gdrws6B2936WcuIrWHIf3WGWhFMZdFIjicrV7bLPd6ODFOpLK4N
 lc1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695053019; x=1695657819;
 h=references:in-reply-to:subject:cc:to:date:message-id
 :content-transfer-encoding:mime-version:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=rZrUdBObGuy6EnsYf/A1pH7LRkUWym462piqpaCwRi0=;
 b=EJ6+KtxnIj6cJxIZN3zEdWIyGHeOSspLwWnE3Py4YdkIa9r5LBXHABNbd7hJvLIgoR
 yUPRp4Q4DLFH9vzzUOaQ9Q066vsPBE4ATQlLnmD++y9BW0zdMLwykVEB0K80gL7eLOdf
 AZidQ9RoaAd5M+LWsydWTEE5ho7FaK59FMNOASJ8hfup2pibBAXS+cyKjFqNVzPpKXfi
 FvT6Dq50RJTq3LAhKMAUzdysF33kXF3a7gK+tJ2G4KugoqKDtARC3HonbhPkvYiBxY3b
 N3+sczDrKdp63ZnbkGxvOfikE6dj69lEF9oJYvauvKgSKaPE5aBlSQCY/VfCm6uNBWeI
 yKVA==
X-Gm-Message-State: AOJu0YwKnR1wwYLONU92W6uTdo5jdA8U/FV364vxjQZ/19G5sBafCdQZ
 Ng5Awu9atXJOmGlpl8XA71bouw==
X-Google-Smtp-Source: AGHT+IGjhJKzTB+4k4gL5ih8iQ93DoLJ+7l8JG4rO1EK5VjvsNFAuF8HPO3bighDR7yBs/HSjPYIHA==
X-Received: by 2002:a17:90a:8c11:b0:268:557e:1848 with SMTP id
 a17-20020a17090a8c1100b00268557e1848mr6780259pjo.2.1695053019436; 
 Mon, 18 Sep 2023 09:03:39 -0700 (PDT)
Received: from orion.rgrjr.com ([2600:1700:7c2c:e000::22])
 by smtp.gmail.com with ESMTPSA id
 8-20020a17090a004800b0026b420ae167sm9942873pjb.17.2023.09.18.09.03.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 09:03:38 -0700 (PDT)
From: Bob Rogers <rogers@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <25864.29913.674034.686550@HIDDEN>
Date: Mon, 18 Sep 2023 09:03:37 -0700
In-Reply-To: <83cyyfg3lg.fsf@HIDDEN>
References: <25863.37313.113980.876021@HIDDEN>
 <83cyyfg3lg.fsf@HIDDEN>
X-Mailer: VM 8.2.0b under 30.0.50 (x86_64-pc-linux-gnu)
X-Spam-Score: -1.5 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.5 (--)

   From: Eli Zaretskii <eliz@HIDDEN>
   Date: Mon, 18 Sep 2023 13:47:39 +0300

   > From: Bob Rogers <rogers@HIDDEN>
   > Date: Sun, 17 Sep 2023 16:54:41 -0700
   > 
   > . . .
   >
   > The attached patch reverses the order of the arguments to diff only
   > when the buffer is unmodified.  Either the file has changed on disk, in
   > which case it is probably newer, or it hasn't, in which case the diff
   > will be empty anyway so the order doesn't matter (and that saves
   > checking the actual file mod time).

   I don't think we can automatically always reverse them in this case.
   Here's a simple case where we shouldn't:

     . visit a file
     . make some edits
     . save the buffer to the file
     . copy from the backup file (or some other previous version) over
       the edited file on disk

I thought of that, but figured this was a much less likely scenario, and
could be ignored for the sake of getting closer to the right thing.

   I think only the user knows what is "old" and what is "new".  We
   should, of course, allow the user to reverse them, but we shouldn't
   reverse automatically.

Fair enough.  I suppose M-x diff-reverse-direction is not that much
extra trouble.  (I should probably find a keybinding for it.)

					-- Bob




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 18 Sep 2023 22:50:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 18:50:18 2023
Received: from localhost ([127.0.0.1]:54887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiN4M-0004h9-Lm
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 18:50:18 -0400
Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:56380)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qiN4K-0004gr-G7
 for control <at> debbugs.gnu.org; Mon, 18 Sep 2023 18:50:17 -0400
Received: by mail-lj1-x229.google.com with SMTP id
 38308e7fff4ca-2bff7d81b5eso36264321fa.0
 for <control <at> debbugs.gnu.org>; Mon, 18 Sep 2023 15:50:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695077402; x=1695682202; darn=debbugs.gnu.org;
 h=to:subject:message-id:date:mime-version:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=xY7yplZy2M7U+NzSidcwJAj5KHC+CslHkba1DVh217c=;
 b=YwuSvqHqwYgX4E9A5karlzLZVyQXpKkhcPN0HecbojzE2rjGd4oSkwLoTCQ5njLQjD
 VotrFcKuSKn1IDvQz+CkeNUL8YYWGSKeSPbj80x0apQJrIVIAeDWCJaquobnPoFajggK
 Ptj4Z68CP6+MeZMHd0gDVduPbcBmggkE4J0UJmzomDHZwFHSeLUwaBrbBDpMaVVV6KaB
 CMBT3pf1FMd7/IYSag9JwKjWqH4Z/3QIZd4GtuS0aTt7PA20jFVaP7EH0/NpOCl7gbA3
 rHBPl3TtpBmIAYeboXPA3slEJGDIZAqD+alNhwQzElD5ncWqSkHYPHG60iNBKs/cLfKU
 3lpw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695077402; x=1695682202;
 h=to:subject:message-id:date:mime-version:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=xY7yplZy2M7U+NzSidcwJAj5KHC+CslHkba1DVh217c=;
 b=PdnMBAbIS7EfTQhVaR9epBV7guHaKnwBwkR9oBhDYeQyT43w6CsmmGDWCPy8XJQ0Qt
 7LTW6WXoalVM+9C8QnP/xQDtknd7qyeCw/jlMB7hXxNL3t4MoNwd9vnUjuXC8Qy/8/AH
 0M37a1Wwa+ke9z1aRcMlmOn+PsacT77fO/g+Hu38qy5x/upvn7p5E1OwGvZfb5nK4qow
 2RnMuOJBT89G925x5agWAsBAvONfsVGNf9r7SiQqevcxwjMKnkWqPfzA4dFAdlnSkn8c
 V7HSC5O6/brdtpQz6zG4Ph7Y9WKQh9vLvUfEAXleninAhILmU/CEr6L5sHQutrEmtZsp
 7iIA==
X-Gm-Message-State: AOJu0YzaH195RRHkpM5baeCADknopxbY+mPFucnHRWckc2G9bSqkVaMX
 TCYSi5rv3nHpNBPYQeDb80A6q5WF87nxxaHm8e4gHkZk
X-Google-Smtp-Source: AGHT+IFXROfN17i5cLLFH8urpdasGkGZZTFumG4As0JmRkycFR1bzwmmAIcn7XBgCE2Y0oBjVdZgMHsFBxtyMG1KBuQ=
X-Received: by 2002:a2e:9517:0:b0:2b9:e53f:e201 with SMTP id
 f23-20020a2e9517000000b002b9e53fe201mr7761831ljh.31.1695077402099; Mon, 18
 Sep 2023 15:50:02 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 18 Sep 2023 15:50:01 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
MIME-Version: 1.0
Date: Mon, 18 Sep 2023 15:50:01 -0700
Message-ID: <CADwFkm=uWwkQQ27MgX1YK-HBTZ9=sOp1Czx2p1grjvO-PPzgww@HIDDEN>
Subject: control message for bug #66061
To: control <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

severity 66061 wishlist
quit





Last modified: Mon, 18 Sep 2023 23:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.