From: Marcin Borkowski <mbork@mbork.pl>
To: help-gnu-emacs@gnu.org
Subject: Re: Question on frame title
Date: Thu, 15 Oct 2015 19:21:27 +0200 [thread overview]
Message-ID: <876128dp48.fsf@mbork.pl> (raw)
In-Reply-To: <d3ecbc36-ee74-485f-9eb4-2d0242dd4528@googlegroups.com>
On 2015-10-15, at 18:43, Benny Sum <benny.sum@gmail.com> wrote:
> ls is just as an example. I want to do unix command to get the revision control of a file. Ultimately, here is what I want to do:
>
> Say unix command:
>> info_data filename
> -> revision number of the file from the database
>
> (setq frame-title-format
> (list (format "%s" (shell-command-to-string(concat "info-data " " %b ")))))
>
> So, I just use ls -1 as an example of unix command.
>
> But the problem is that it seems I don't have filename correctly. It says I can't access the filename. Did you try the command and see if that works for you?
Yes I did - in fact, it was as simple as putting the point in the right
place in your email and pressing C-x C-e;-).
One problem is that you probably want %f, not %b.
A bigger problem there *might* be with your approach is the timing:
apparently, you want the frame title to be updated whenever you switch
buffers, right? This probably means that you want (:eval ...). Another
approach could be to use a symbol as frame-title-format (like in (setq
frame-title-format 'foo) and make the variable foo contain what you want
to have displayed.
If there were a `buffer-switch-hook', you could then update it there.
It seems tere is no such thing, but yu could e.g. advise
switch-to-buffer (or maybe some other function).
Hth,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
next prev parent reply other threads:[~2015-10-15 17:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 15:26 Question on frame title Benny Sum
2015-10-15 16:26 ` Marcin Borkowski
[not found] ` <mailman.391.1444926481.7904.help-gnu-emacs@gnu.org>
2015-10-15 16:43 ` Benny Sum
2015-10-15 17:21 ` Marcin Borkowski [this message]
2015-10-15 17:30 ` Random832
2015-10-15 17:49 ` Random832
[not found] ` <mailman.405.1444931478.7904.help-gnu-emacs@gnu.org>
2015-10-16 11:05 ` Benny Sum
2015-10-16 13:35 ` Random832
[not found] ` <mailman.455.1445002561.7904.help-gnu-emacs@gnu.org>
2015-10-16 18:15 ` Benny Sum
2015-10-16 19:14 ` Benny Sum
[not found] ` <mailman.402.1444930342.7904.help-gnu-emacs@gnu.org>
2015-10-15 23:08 ` Benny Sum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=876128dp48.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.