From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46552: 27.1; image-mode should not move current point Date: Tue, 16 Feb 2021 18:24:04 +0200 Message-ID: <83zh047zh7.fsf@gnu.org> References: <86v9astljs.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12160"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46552-done@debbugs.gnu.org To: ynyaaa@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 16 17:59:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lC3he-000314-Py for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 17:59:58 +0100 Original-Received: from localhost ([::1]:53352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC3hd-0005VA-QD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 11:59:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC39r-0000bY-Cj for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 11:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lC39q-0003kc-V0 for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 11:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lC39q-0003Y8-QT for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 11:25:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Feb 2021 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 46552 X-GNU-PR-Package: emacs Mail-Followup-To: 46552@debbugs.gnu.org, eliz@gnu.org, ynyaaa@gmail.com Original-Received: via spool by 46552-done@debbugs.gnu.org id=D46552.161349265013570 (code D ref 46552); Tue, 16 Feb 2021 16:25:02 +0000 Original-Received: (at 46552-done) by debbugs.gnu.org; 16 Feb 2021 16:24:10 +0000 Original-Received: from localhost ([127.0.0.1]:41337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lC390-0003Wo-AL for submit@debbugs.gnu.org; Tue, 16 Feb 2021 11:24:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lC38y-0003Wb-G0 for 46552-done@debbugs.gnu.org; Tue, 16 Feb 2021 11:24:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54555) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC38t-0003en-Cc; Tue, 16 Feb 2021 11:24:03 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1470 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lC38n-0006Uv-L5; Tue, 16 Feb 2021 11:24:03 -0500 In-Reply-To: <86v9astljs.fsf@gmail.com> (ynyaaa@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200133 Archived-At: > From: ynyaaa@gmail.com > 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.