unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 43397@debbugs.gnu.org, Caio Henrique <caiohcs0@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#43397: 28.0.50; Adding tool bar items: update tool bar
Date: Fri, 27 Aug 2021 19:40:13 +0200	[thread overview]
Message-ID: <874kban5vm.fsf@gnus.org> (raw)
In-Reply-To: <83lfhb83hm.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 15 Sep 2020 18:27:17 +0300")

Eli Zaretskii <eliz@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





  parent reply	other threads:[~2021-08-27 17:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 14:30 bug#43397: 28.0.50; Adding tool bar items: update tool bar Caio Henrique
2020-09-14 21:44 ` Caio Henrique
2020-09-15 15:27 ` Eli Zaretskii
2020-09-15 20:05   ` Stefan Monnier
2020-09-16  2:26     ` Eli Zaretskii
2021-08-27 17:40   ` Lars Ingebrigtsen [this message]
2021-08-27 22:04     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-28 15:30       ` Lars Ingebrigtsen
2022-05-03 15:28         ` Lars Ingebrigtsen
2022-05-03 15:41           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 16:09             ` Lars Ingebrigtsen
2022-05-03 16:19               ` Lars Ingebrigtsen
2022-05-03 16:49                 ` Eli Zaretskii
2022-05-03 16:50                   ` Lars Ingebrigtsen
2022-05-03 16:31               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 16:39                 ` Lars Ingebrigtsen
2022-05-03 16:46                   ` Lars Ingebrigtsen
2022-05-03 16:54                     ` Eli Zaretskii
2022-05-03 16:57                       ` Lars Ingebrigtsen
2022-05-03 17:53                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 18:58                     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kban5vm.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=43397@debbugs.gnu.org \
    --cc=caiohcs0@gmail.com \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).