Subject: bug#54060: 29.0.50; diff-buffers should take narrowing into account

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 19 Feb 2022 13:29:23 +0100

Philipp Stephani <[email-masked]> writes:

> Unlike ediff-buffers, diff-buffers always compares the entire buffer
> contents, not the accessible portion.  I think it would be better to
> restrict the diff to the accessible portion, since normally buffer
> commands only act on the accessible portion (and the capability to
> compare only portions of buffers is occasionally quite useful!).

Makes sense to me, but I rarely use diff-buffers, so I don't really know
what the expectations are.  

> IIUC the only change needed would be to replace (write-region nil nil
> ...)  in diff-file-local-copy with (write-region (point-min)
> (point-max) ...).  If we don't want to change the default behavior,
> then this could be made configurable with a customization option.

I think it would make sense to change the default behaviour, but perhaps
have an option to switch it back to the old behaviour.

Any opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no