GNU bug report logs - #47521
28.0.50; [PATCH] [image-mode] reduce calling for image-toggle-display-text

Previous Next

Package: emacs;

Reported by: LinSun <lin.sun <at> zoom.us>

Date: Wed, 31 Mar 2021 12:19:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47521 in the body.
You can then email your comments to 47521 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47521; Package emacs. (Wed, 31 Mar 2021 12:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to LinSun <lin.sun <at> zoom.us>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 31 Mar 2021 12:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: LinSun <lin.sun <at> zoom.us>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 28.0.50; [PATCH] [image-mode] reduce calling for
 image-toggle-display-text
Date: Wed, 31 Mar 2021 20:17:57 +0800
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47521; Package emacs. (Wed, 31 Mar 2021 14:48:02 GMT) Full text and rfc822 format available.

Message #8 received at 47521 <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <lin.sun <at> zoom.us>
To: 47521 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>, sunlin <sunlin7 <at> yahoo.com>
Subject: 28.0.50;
 [PATCH] [image-mode] reduce calling for image-toggle-display-text
Date: Wed, 31 Mar 2021 22:47:33 +0800
[Message part 1 (text/plain, inline)]
(Resend in text mail format.)
Hi,

When opening a png file and toggle display from image to text by C-c
C-c, the `image-toggle-display-text` will be called twice in function
`image-toggle-display-text`.
The first call is from the major mode change hook, in the following
line will cause `change-major-mode-hook` be run and it’s
`image-toggle-display-text` for image-mode.
image-mode.el:730         (major-mode-restore '(image-mode image-mode-as-text))

The second call is from the direct call at
image-mode.el:736         (image-toggle-display-text)

Try debug-on-entry on `image-toggle-display-text`, then switch image
to text in image-mode by press C-c C-c to observe the issue.

And the patch tries to reduce calling for `image-toggle-display-text`.

Best Regards
Lin Sun
[0001-image-mode-reduce-calling-for-image-toggle-display-t.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47521; Package emacs. (Mon, 05 Apr 2021 16:13:01 GMT) Full text and rfc822 format available.

Message #11 received at 47521 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Lin Sun <lin.sun <at> zoom.us>
Cc: Glenn Morris <rgm <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
 47521 <at> debbugs.gnu.org, sunlin <sunlin7 <at> yahoo.com>
Subject: Re: bug#47521: 28.0.50; [PATCH] [image-mode] reduce calling for
 image-toggle-display-text
Date: Mon, 05 Apr 2021 18:12:40 +0200
Lin Sun <lin.sun <at> zoom.us> writes:

> And the patch tries to reduce calling for `image-toggle-display-text`.

Thanks; applied to Emacs 28.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 05 Apr 2021 16:13:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 47521 <at> debbugs.gnu.org and LinSun <lin.sun <at> zoom.us> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 05 Apr 2021 16:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 May 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 348 days ago.

Previous Next


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