From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Random832 Newsgroups: gmane.emacs.help Subject: Re: Question on frame title Date: Thu, 15 Oct 2015 13:49:50 -0400 Message-ID: <87si5chvi9.fsf@fastmail.com> References: <87y4f4hwer.fsf@fastmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444931533 12518 80.91.229.3 (15 Oct 2015 17:52:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Oct 2015 17:52:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 15 19:52:02 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zmmh2-0005lr-W2 for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Oct 2015 19:51:57 +0200 Original-Received: from localhost ([::1]:48948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zmmh2-0007kG-Bn for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Oct 2015 13:51:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmmfQ-0006lx-BA for help-gnu-emacs@gnu.org; Thu, 15 Oct 2015 13:50:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmmfK-0000ju-Mi for help-gnu-emacs@gnu.org; Thu, 15 Oct 2015 13:50:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:45384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmmfK-0000jV-Gb for help-gnu-emacs@gnu.org; Thu, 15 Oct 2015 13:50:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZmmfI-0003w4-Ts for help-gnu-emacs@gnu.org; Thu, 15 Oct 2015 19:50:08 +0200 Original-Received: from c-68-39-146-59.hsd1.in.comcast.net ([68.39.146.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Oct 2015 19:50:08 +0200 Original-Received: from random832 by c-68-39-146-59.hsd1.in.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Oct 2015 19:50:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:fCP8BaljS2/MN36+VLQdDZ6fUXw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107660 Archived-At: Random832 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.