Subject: bug#24104: 25.1.50; frame-or-buffer-changed-p also check file size

From: Eli Zaretskii <[email-masked]>
Date: Fri, 29 Jul 2016 16:20:35 +0300

> From: Tino Calancha <[email-masked]>
> Date: Fri, 29 Jul 2016 21:10:29 +0900 (JST)
> 
> 
> Assume a buffer BUF, with size, SIZE, returning non-nil for predicate
> 'buffer-modified-p'; then we write some text on BUF, so that the
> new size is SIZE_2 != SIZE.
> In this scenario, 'frame-or-buffer-changed-p' return nil, i.e.,
> the buffer state appears to not have changed.

Because it didn't.  The buffer was changed, and it still is.  In
particular, the original change that caused buffer-modified-p to
return non-nil could also be (and normally is) a change in the size of
the buffer.

> It might be convenient to extend 'frame-or-buffer-changed-p' so that,
> it also check the buffer size.

This function is used to decide whether we need to recompute menus, so
your proposed change will cause extra recomputation of them.  I'm not
sure we want that, as recomputing menus might be expensive.

> Then, for instance, Ibuffer operating
> on auto mode ('ibuffer-auto-mode') would update the listing.

If Ibuffer has some problem, I suggest to describe that problem and
try solving it for Ibuffer alone.

Thanks.