[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on frame title
From: |
Marcin Borkowski |
Subject: |
Re: Question on frame title |
Date: |
Thu, 15 Oct 2015 19:21:27 +0200 |
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
- Question on frame title, Benny Sum, 2015/10/15
- Re: Question on frame title, Marcin Borkowski, 2015/10/15
- Message not available
- Re: Question on frame title, Benny Sum, 2015/10/15
- Re: Question on frame title,
Marcin Borkowski <=
- Re: Question on frame title, Random832, 2015/10/15
- Re: Question on frame title, Random832, 2015/10/15
- Message not available
- Re: Question on frame title, Benny Sum, 2015/10/16
- Re: Question on frame title, Random832, 2015/10/16
- Message not available
- Re: Question on frame title, Benny Sum, 2015/10/16
- Re: Question on frame title, Benny Sum, 2015/10/16
- Message not available
- Re: Question on frame title, Benny Sum, 2015/10/15