From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: suggested feature -- console-mode frame title sets Xterm title Date: 16 Oct 2003 18:07:07 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20031002063338.GA25969@vexed.ozlabs.hp.com> <20031003010404.GB1259@sourcefrog.net> <20031014035931.GH15872@vexed.ozlabs.hp.com> <20031015024709.GC18244@vexed.ozlabs.hp.com> <9743-Thu16Oct2003093207+0200-eliz@elta.co.il> <20031016083506.GC20302@vexed.ozlabs.hp.com> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066295460 26826 80.91.224.253 (16 Oct 2003 09:11:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2003 09:11:00 +0000 (UTC) Cc: Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Oct 16 11:10:58 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AA49p-00034X-00 for ; Thu, 16 Oct 2003 11:10:57 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AA49p-0005A7-00 for ; Thu, 16 Oct 2003 11:10:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AA48T-0004Ck-8k for emacs-devel@quimby.gnus.org; Thu, 16 Oct 2003 05:09:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AA47m-00044X-A0 for emacs-devel@gnu.org; Thu, 16 Oct 2003 05:08:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AA47K-0003vY-NC for emacs-devel@gnu.org; Thu, 16 Oct 2003 05:08:49 -0400 Original-Received: from [210.143.35.52] (helo=TYO202.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AA46H-0003b2-14; Thu, 16 Oct 2003 05:07:17 -0400 Original-Received: from mailgate3.nec.co.jp ([10.7.69.186]) by TYO202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id h9G97Al17483; Thu, 16 Oct 2003 18:07:10 +0900 (JST) Original-Received: from mailsv4.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id h9G979V22165; Thu, 16 Oct 2003 18:07:09 +0900 (JST) Original-Received: from edtmg04.lsi.nec.co.jp ([10.26.17.201]) by mailsv4.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id h9G979X22562; Thu, 16 Oct 2003 18:07:09 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg04.lsi.nec.co.jp (8.9.3p2+3.2W/3.7W_EDC_Ver.1.0) with ESMTP id SAA10930; Thu, 16 Oct 2003 18:07:08 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id h9G9777Q011300; Thu, 16 Oct 2003 18:07:08 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 938293723; Thu, 16 Oct 2003 18:07:07 +0900 (JST) Original-To: Martin Pool System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <20031016083506.GC20302@vexed.ozlabs.hp.com> Original-Lines: 49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17139 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17139 Martin Pool writes: > The obvious thing would be to make it set the name (f->name). It's > documented only in the context of replacing F%d with something more > meaningful. > > However, on X frames it has the user-visible behaviour of setting the > title, although inside emacs it is really setting f->name. Once you > have done this, the format produced by frame-title-format is no longer > seen. I wonder if any users count on this? I wouldn't be surprised if applications that want to create `special' frames use `set-frame-name' and expect it to override frame-title-format (which it currently does on X). > I can't think of any consistent way to resolve it, so I propose that > we make set-frame-name simply set the name, and we let people set the > title using the existing mechanisms (frame-title-format, etc). It looks like you basically just have to always be sure that an _explicitly_ set frame-name overrides the frame-title; under X, the default frame name is apparently "Emacs", setting it explicitly with set-frame-name overrides that, but if you do (set-frame-name nil), you get the default back. So there really seem to be _two_ frame names, the `user set' name, and the `automatic name', acting sort of like: (defun frame-title (f) (or (frame-name f) (format-frame-title frame-title-format f)))) (defun frame-name-for-modeline (f) (or (frame-name f) (frame-automatic-name f))) where the initial `user name' is each frame is nil, and the `automatic name' is "Emacs" on X, and "F..." on ttys. The main difference between X and ttys seems to be that `select-frame-by-name' uses `frame-title' (above) to get the list of names, whereas it uses `frame-name-for-modeline' on ttys. If it were to use _both_ then it the resulting single function would be properly backward compatible on both X and ttys. So perhaps if the `automatic name' were changed to use the tty-style "F..." everywhere and select-frame-by-name changed as above, everything would work properly. -miles -- Saa, shall we dance? (from a dance-class advertisement)