help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on frame title


From: Random832
Subject: Re: Question on frame title
Date: Thu, 15 Oct 2015 13:49:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Random832 <random832@fastmail.com> writes:
> This will re-execute the info-data command every time you switch
> buffers. If the command is expensive, you may want to store the value in
> a buffer-local variable.

Actually it turns out it evaluates quite a bit more often than that. I
can't quite find the rhyme or reason to precisely when it gets evaluated.

Fun little test script:

(setq test-index 0)
(setq frame-title-format
      '(:eval (format "frame-title-format evaluated %d times "
                      (setq test-index (1+ test-index)))))

It gets evaluated when:

- Changing buffers
- Changing windows
- (Yes, that's even when it's the same window, or the same buffer)
- (Even the minibuffer. Sometimes.)
- Activating the mark
- Deactivating the mark
- Clicking the mouse anywhere (and again on release)

Probably best to try to get the value in a buffer-local variable.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]