From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: hostname and filename as frame title Date: Fri, 12 Feb 2010 10:35:14 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265967382 8946 80.91.229.12 (12 Feb 2010 09:36:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Feb 2010 09:36:22 +0000 (UTC) Cc: Emacs mailing list To: Suvayu Ali Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 12 10:36:20 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nfrwd-0006bl-Nz for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Feb 2010 10:36:16 +0100 Original-Received: from localhost ([127.0.0.1]:44299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nfrwd-0002Fd-29 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Feb 2010 04:36:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfrwB-0002F7-5I for help-gnu-emacs@gnu.org; Fri, 12 Feb 2010 04:35:47 -0500 Original-Received: from [140.186.70.92] (port=60672 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nfrw9-0002EM-Qn for help-gnu-emacs@gnu.org; Fri, 12 Feb 2010 04:35:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nfrw9-0001cY-6D for help-gnu-emacs@gnu.org; Fri, 12 Feb 2010 04:35:45 -0500 Original-Received: from mailrelay2.alcatel.de ([194.113.59.96]:59149) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nfrw8-0001b5-Uc for help-gnu-emacs@gnu.org; Fri, 12 Feb 2010 04:35:45 -0500 Original-Received: from destgsu0048.stgl.sel.alcatel.de (destgsu0048.de.alcatel-lucent.com [149.204.242.4]) by mailrelay2.alcatel.de (8.13.8/8.13.8/ICT) with ESMTP id o1C9ZFtx023145; Fri, 12 Feb 2010 10:35:15 +0100 Original-Received: from slbhn1.alcatel.de (slbhn1.de.alcatel-lucent.com [149.204.90.35]) by destgsu0048.stgl.sel.alcatel.de (8.12.3/8.12.3) with ESMTP id o1C9ZEu9004046; Fri, 12 Feb 2010 10:35:15 +0100 (MET) In-Reply-To: (Suvayu Ali's message of "Fri, 12 Feb 2010 00:46:51 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) X-Alcanet-virus-scanned: o1C9ZEu9004046 at destgsu0048.stgl.sel.alcatel.de X-Scanned-By: MIMEDefang 2.57 on 149.204.45.73 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71820 Archived-At: Suvayu Ali writes: > Hi everyone, Hi, > > I do a lot of remote editing on several remote machines. I recently > came across the variable `frame-title-format' and was wondering if > there is a way to set the hostname of the file being edited and the > file name as the frame title? Something like file@remote-host. > > I don't even know where to start looking, any pointers would be awesome. :) What about this: (setq-default frame-title-format '(:eval (format "%s@%s:%s" (or (file-remote-p default-directory 'user) user-login-name) (or (file-remote-p default-directory 'host) system-name) (file-name-nondirectory (or (buffer-file-name) default-directory))))) It needs Emacs 23.1, due to the parameters of file-remote-p. Best regards, Michael.