GNU bug report logs - #43397
28.0.50; Adding tool bar items: update tool bar

Previous Next

Package: emacs;

Reported by: Caio Henrique <caiohcs0 <at> gmail.com>

Date: Mon, 14 Sep 2020 14:31:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 43397 <at> debbugs.gnu.org, Caio Henrique <caiohcs0 <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#43397: 28.0.50; Adding tool bar items: update tool bar
Date: Fri, 27 Aug 2021 19:40:13 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Then evaluate the forms and press F5.  The tool bar won't change.

This was a year ago, but I can still reproduce this on the current
trunk.  Here's an even easier variation of the recipe:

(progn
  (blink-cursor-mode -1)
  (global-eldoc-mode -1)

  (defun myfun ()
    (interactive)
    (tool-bar-add-item "redo" 'undo-redo 'undo-redo))

  (global-set-key [f5] 'myfun))

And then M-: (garbage-collect) makes the tool bar update.

However!  The garbage-collect in itself isn't sufficient to trigger it.
With this variation:

(progn
  (blink-cursor-mode -1)
  (global-eldoc-mode -1)
  (tool-bar-add-item "redo" 'undo-redo 'undo-redo)
  (global-set-key [f5] (lambda () (interactive) (garbage-collect))))

pressing <f5> does not make the icon appear.

> Now do some random clicks, watching the echo area: you will see that
> the tool bar is updated with the "redo" icon precisely when the
> "Garbage collecting..." message appears in the echo area.

Very mysterious.

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




This bug report was last modified 3 years and 18 days ago.

Previous Next


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