From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Pool Newsgroups: gmane.emacs.devel Subject: Re: suggested feature -- console-mode frame title sets Xterm title Date: Wed, 15 Oct 2003 16:36:00 +1000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20031015063555.GG18244@vexed.ozlabs.hp.com> References: <20031002063338.GA25969@vexed.ozlabs.hp.com> <20031003010404.GB1259@sourcefrog.net> <20031014035931.GH15872@vexed.ozlabs.hp.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066199965 24864 80.91.224.253 (15 Oct 2003 06:39:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 06:39:25 +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 Wed Oct 15 08:39:22 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 1A9fJa-00038K-00 for ; Wed, 15 Oct 2003 08:39:22 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9fJa-0006hP-00 for ; Wed, 15 Oct 2003 08:39:22 +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 1A9fJH-0006uB-0r for emacs-devel@quimby.gnus.org; Wed, 15 Oct 2003 02:39:03 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9fJ1-0006lS-7K for emacs-devel@gnu.org; Wed, 15 Oct 2003 02:38:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9fIJ-0006EO-JW for emacs-devel@gnu.org; Wed, 15 Oct 2003 02:38:34 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1A9fIJ-00069w-8k; Wed, 15 Oct 2003 02:38:03 -0400 Original-Received: from [192.6.86.210] (helo=sngrel5.hp.com) by mx20.gnu.org with esmtp (Exim 4.24) id 1A9fGd-0004R7-9b; Wed, 15 Oct 2003 02:36:19 -0400 Original-Received: from XAUBRG2.AUS.HP.COM (xaubrg2.aus.hp.com [15.23.69.43]) by sngrel5.hp.com (Postfix) with SMTP id EF4F840C; Wed, 15 Oct 2003 14:36:06 +0800 (SGP) Original-Received: from 15.23.69.43 by XAUBRG2.AUS.HP.COM (InterScan E-Mail VirusWall NT); Wed, 15 Oct 2003 16:36:06 +1000 Original-Received: from XAUBRG2.AUS.HP.COM (localhost [127.0.0.1]) by XAUBRG2.AUS.HP.COM with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id TTGLVHW5; Wed, 15 Oct 2003 16:36:05 +1000 Original-Received: from 16.176.65.49 by XAUBRG2.AUS.HP.COM (InterScan E-Mail VirusWall NT); Wed, 15 Oct 2003 16:36:05 +1000 Original-Received: from mbp by vexed with local (Exim 3.36 #1 (Debian)) id 1A9fGK-0004zj-00; Wed, 15 Oct 2003 16:36:00 +1000 Original-To: Miles Bader Content-Disposition: inline In-Reply-To: X-GPG: 1024D/A0B3E88B: AFAC578F 1841EE6B FD95E143 3C63CA3F A0B3E88B User-Agent: Mutt/1.5.4i 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:17108 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17108 On 15 Oct 2003, Miles Bader wrote: > Eli Zaretskii writes: > > > If you're talking about the frame's name, what you would specify to > > > switch frames, then I don't see why this is desirable. Always using > > > the F name seems better. > > > > I thought about using the xterm's title as the frame's name. People > > may wish to use the name displayed in the xterm's title because it's > > more descriptive, and thuis more easily remembered, than F. In > > effect, the string in the title could act as the frame's name, making > > the use of set-frame-name unnecessary. (Which means, btw, that, if > > Miles's suggestion is implemented, we should decide what to do with > > set-frame-name: should it affect the xterm title or the F displayed > > in the mode line [or both]). > > I really think it ought to work as close to the way X does as possible, > with the F%d notation only used as (1) an abbreviated form displayed in > the mode-line (since the `true name' is too long), and (2) possibly as a > `shortcut name' allowed for switching-frame commands as I described > earlier. I agree. > In X, the displayed frame `title' is either the frame's name (set by > set-frame-name), or if that's nil, a string computed using > frame-title-format. select-frame-by-name actually seems to use the > frame's title, not it's name. This is how it looks to the user. On the inside it is much more messy, because f->name and f->title are not used in the way their documentation suggests. select-frame-by-name uses what seems to be the frame's title because that gets written into f->name. There is also some stuff about "explicitly set titles" -- I can see basically what this is about but I don't understand all the interactions. However, it is only software, and can be fixed, if we decide how we want it to work. Here is how I think it should work on the inside: f->name holds the frame's name, which is initially F%d and can be set by set-frame-name f->title holds the title generated by frame-title-format, except it holds the "explicit title" if one is set. f->title is always used for the window title on X or (where possible and desired) on ttys. f->name is used for the '%F' format in mode-line-frame-identification. If you want, you can even put '%F' in frame-title-format to include the frame name. I haven't tried this yet, so it might not work. But it sounds like it will give the behaviour we want, and it's cleaner than the present code. We have a choice of either making select-frame-by-name look only at f->name (as it does on tty frames at the moment), or having it also look at titles as Miles suggested. If we choose the first, we could add select-frame-by-title. > I see no reason _not_ to use this same model for ttys, and doing so > would be a big win for consistency. If, as I described earlier, F%d > notation were still be displayed in mode-lines, and usable for > select-frame-by-name, the current tty behavior would also largely be > preserved. > > I also think that the F%d stuff should work on X -- then there would be > basically no difference between X and ttys in this area. Yes, and users on ttys who like the F%d name could even arrange for it to be shown in their xterm title if they wanted. -- Martin