From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Question on frame title Date: Thu, 15 Oct 2015 18:26:06 +0200 Message-ID: <877fmodroh.fsf@mbork.pl> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444926513 24715 80.91.229.3 (15 Oct 2015 16:28:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Oct 2015 16:28:33 +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 18:28:18 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 1ZmlO0-0003iO-UG for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Oct 2015 18:28:13 +0200 Original-Received: from localhost ([::1]:48574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmlO0-0004oE-9H for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Oct 2015 12:28:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmlMc-0004hG-S7 for help-gnu-emacs@gnu.org; Thu, 15 Oct 2015 12:26:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmlMY-0001Ex-Ph for help-gnu-emacs@gnu.org; Thu, 15 Oct 2015 12:26:46 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:42252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmlMY-0001E5-JH for help-gnu-emacs@gnu.org; Thu, 15 Oct 2015 12:26:42 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 297038F2009 for ; Thu, 15 Oct 2015 18:26:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id orrxstUF6Dq8 for ; Thu, 15 Oct 2015 18:26:10 +0200 (CEST) Original-Received: from localhost (103-115.echostar.pl [213.156.103.115]) by mail.mojserwer.eu (Postfix) with ESMTPSA id AD93A8F2004 for ; Thu, 15 Oct 2015 18:26:10 +0200 (CEST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.110.48.8 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:107656 Archived-At: On 2015-10-15, at 17:26, Benny Sum wrote: > I try to run shell-command to retrieve some information on the file and put it in the title frame. But I got some strange behavior: > > (setq frame-title-format > (list (format "%s" (shell-command-to-string(concat "ls -1 " " %b "))))) > > But it says ls: cannot access filename: No such file or directory on the title frame. > > It seems the filename is correct, but not sure why cannot access it. Is it due to the white space returned from the %b? > > Anyone has a example code to run a shell-command on %b in frame-title-format? Do I get it correctly that "ls" gets a literal "%b" and has no idea what to do with it? What do you want to achieve that (setq frame-title-format "%f") doesn't do? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University