* "title" frame param: Want "string %f %b" with string different for some frames
@ 2008-08-28 16:28 Allan Gottlieb
2008-08-28 17:23 ` Nikolaj Schumacher
0 siblings, 1 reply; 5+ messages in thread
From: Allan Gottlieb @ 2008-08-28 16:28 UTC (permalink / raw)
To: help-gnu-emacs
If I want the frame to have a unique title I use
(modify-frame-parameters nil '((title . "sam")))
Which works fine, making the title "sam".
Since I like the title to contain %b %f (buffer and file names), I
have in my .emacs
(setq frame-title-format '("Emacs: %b <%f>")))
which also works fine.
I would like a combination of the two and am having trouble.
Say I want the current frame to have "sam" in the title together with
the current file and buffer names, I would like to say something like
(setq current-frame-title-format '("sam: %b <%f>")))
and have all other frames still use '("Emacs: %b <%f>")))
Any help would be appreciated.
thanks,
allan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "title" frame param: Want "string %f %b" with string different for some frames
2008-08-28 16:28 "title" frame param: Want "string %f %b" with string different for some frames Allan Gottlieb
@ 2008-08-28 17:23 ` Nikolaj Schumacher
2008-08-28 19:43 ` Allan Gottlieb
0 siblings, 1 reply; 5+ messages in thread
From: Nikolaj Schumacher @ 2008-08-28 17:23 UTC (permalink / raw)
To: Allan Gottlieb; +Cc: help-gnu-emacs
Allan Gottlieb <gottlieb@nyu.edu> wrote:
> Say I want the current frame to have "sam" in the title together with
> the current file and buffer names, I would like to say something like
>
> (setq current-frame-title-format '("sam: %b <%f>")))
>
> and have all other frames still use '("Emacs: %b <%f>")))
Well, you can do:
(set (make-variable-buffer-local 'frame-title-format) '("sam: %b <%f>"))
That's not exactly what you want, but maybe it'll get you a little
closer.
There's also `make-variable-frame-local', but I couldn't quite get it to
work.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "title" frame param: Want "string %f %b" with string different for some frames
2008-08-28 17:23 ` Nikolaj Schumacher
@ 2008-08-28 19:43 ` Allan Gottlieb
2008-08-28 21:00 ` Nikolaj Schumacher
0 siblings, 1 reply; 5+ messages in thread
From: Allan Gottlieb @ 2008-08-28 19:43 UTC (permalink / raw)
To: help-gnu-emacs
At Thu, 28 Aug 2008 19:23:03 +0200 Nikolaj Schumacher <me@nschum.de> wrote:
> Allan Gottlieb <gottlieb@nyu.edu> wrote:
>
>> Say I want the current frame to have "sam" in the title together with
>> the current file and buffer names, I would like to say something like
>>
>> (setq current-frame-title-format '("sam: %b <%f>")))
>>
>> and have all other frames still use '("Emacs: %b <%f>")))
>
> Well, you can do:
>
> (set (make-variable-buffer-local 'frame-title-format) '("sam: %b <%f>"))
>
> That's not exactly what you want, but maybe it'll get you a little
> closer.
>
> There's also `make-variable-frame-local', but I couldn't quite get it to
> work.
buffer-local isn't really good enough. I do want to use the frame for
several files/buffers.
make-variable-frame-local is listed as obsolete in emacs 22.2 and
beyond, which are the ones I use (22.2 and 23.0.60). The interesting
output of (describe-function 'make-variable-frame-local) is
make-variable-frame-local is an interactive built-in function in `C source code'.
(make-variable-frame-local VARIABLE)
This function is obsolete since 22.2;
use a frame-parameter instead.
Enable VARIABLE to have frame-local bindings.
This does not create any frame-local bindings for VARIABLE,
it just makes them possible.
A frame-local binding is actually a frame parameter value.
If a frame F has a value for the frame parameter named VARIABLE,
that also acts as a frame-local binding for VARIABLE in F--
provided this function has been called to enable VARIABLE
to have frame-local bindings at all.
The only way to create a frame-local binding for VARIABLE in a frame
is to set the VARIABLE frame parameter of that frame. See
`modify-frame-parameters' for how to set frame parameters.
Buffer-local bindings take precedence over frame-local bindings.
I have been able to set the frame parameter "title", but that doesn't
give the ability to use %b %f. My attempts at using
make-variable-frame-local and/or modify-frame-parameters have not
yet yielded the equivalent of my desired
current-frame-title-format
as described above.
Thanks for your comments.
allan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "title" frame param: Want "string %f %b" with string different for some frames
2008-08-28 19:43 ` Allan Gottlieb
@ 2008-08-28 21:00 ` Nikolaj Schumacher
2008-08-28 21:54 ` Allan Gottlieb
0 siblings, 1 reply; 5+ messages in thread
From: Nikolaj Schumacher @ 2008-08-28 21:00 UTC (permalink / raw)
To: Allan Gottlieb; +Cc: help-gnu-emacs
Allan Gottlieb <gottlieb@nyu.edu> wrote:
> At Thu, 28 Aug 2008 19:23:03 +0200 Nikolaj Schumacher <me@nschum.de> wrote:
>
>> (set (make-variable-buffer-local 'frame-title-format) '("sam: %b <%f>"))
I made a mistake there. It should of course by `make-local-variable'.
> buffer-local isn't really good enough. I do want to use the frame for
> several files/buffers.
Yes, I thought as much. It might work if these buffers are dedicated or
never displayed in two frames at once, but still requires hackery.
> make-variable-frame-local is listed as obsolete in emacs 22.2 and
> beyond, which are the ones I use (22.2 and 23.0.60).
I found a lengthy discussion in emacs-devel, which started with a bug
and apparently concluded with the realization that nobody needs
frame-local variables. Sorry. I think there is no other way to achieve
what you want.
> I have been able to set the frame parameter "title", but that doesn't
> give the ability to use %b %f. My attempts at using
> make-variable-frame-local and/or modify-frame-parameters have not
> yet yielded the equivalent of my desired
I had no success with `make-variable-frame-local', either, though it should
theoretically work.
`modify-frame-parameters' won't work, because there is no
frame-parameter for this. I find the documentation a little fuzzy on this.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "title" frame param: Want "string %f %b" with string different for some frames
2008-08-28 21:00 ` Nikolaj Schumacher
@ 2008-08-28 21:54 ` Allan Gottlieb
0 siblings, 0 replies; 5+ messages in thread
From: Allan Gottlieb @ 2008-08-28 21:54 UTC (permalink / raw)
To: help-gnu-emacs
At Thu, 28 Aug 2008 23:00:14 +0200 Nikolaj Schumacher <me@nschum.de> wrote:
> Allan Gottlieb <gottlieb@nyu.edu> wrote:
>
>> I have been able to set the frame parameter "title", but that doesn't
>> give the ability to use %b %f. My attempts at using
>> make-variable-frame-local and/or modify-frame-parameters have not
>> yet yielded the equivalent of my desired
>
> I had no success with `make-variable-frame-local', either, though it should
> theoretically work.
>
> `modify-frame-parameters' won't work, because there is no
> frame-parameter for this. I find the documentation a little fuzzy on this.
Indeed the entry for make-variable-frame-local is hard for me to
parse. I sometimes think that this function turns a variable into a
frame parameter.
This does not create any frame-local bindings for VARIABLE,
it just makes them possible.
A frame-local binding is actually a frame parameter value.
If a frame F has a value for the frame parameter named VARIABLE,
that also acts as a frame-local binding for VARIABLE in F--
provided this function has been called to enable VARIABLE
to have frame-local bindings at all.
The only way to create a frame-local binding for VARIABLE in a frame
is to set the VARIABLE frame parameter of that frame. See
`modify-frame-parameters' for how to set frame parameters.
But as you say, none of this seems to work.
allan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-28 21:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-28 16:28 "title" frame param: Want "string %f %b" with string different for some frames Allan Gottlieb
2008-08-28 17:23 ` Nikolaj Schumacher
2008-08-28 19:43 ` Allan Gottlieb
2008-08-28 21:00 ` Nikolaj Schumacher
2008-08-28 21:54 ` Allan Gottlieb
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.