Subject: Re: bug#46552: 27.1; image-mode should not move current point
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 16 Feb 2021 18:24:04 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: [email-masked]
> Date: Tue, 16 Feb 2021 18:21:43 +0900
> 
> 
> If an image which is a binary file is opened in image-mode,
> the current point is moved from the beginning of the buffer to
> elsewhere. And if the image display is toggled off and on again,
> the current point is moved to the end of the buffer.
> Then some operations, such as image-increase-size, cause an error.

The initial movement of point when visiting the image the first time
is a regression in Emacs 27 due to adding the Exif support: the code
which detects Exif moves point as side effect.  I've now fixed that on
the emacs-27 branch.

Once point moves into the image data, the second "C-c C-c" moves point
to EOB, because we don't let point end up inside a display property.
So this part is not a separate problem, but a side effect of the first
part.