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: Benny Sum
Subject: Re: Question on frame title
Date: Fri, 16 Oct 2015 04:05:48 -0700 (PDT)
User-agent: G2/1.0

On Thursday, October 15, 2015 at 1:51:21 PM UTC-4, Random832 wrote:
> 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.

Yes, it is very slow.  How do I get the value in a buffer-local variable?


reply via email to

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