* using special-display-regexps
@ 2004-06-17 22:19 Barman Brakjoller
2004-06-17 22:23 ` Barman Brakjoller
2004-06-17 23:43 ` Michael Slass
0 siblings, 2 replies; 6+ messages in thread
From: Barman Brakjoller @ 2004-06-17 22:19 UTC (permalink / raw)
I'm trying to teach emacs to treat some buffers in a special way using
this code that is supposed to work:
(setq special-display-regexps
'(("jabber-chat"
((top . 10) (height . 5) (left . 200)))))
In the documentation string thew following can be seen:
*List of regexps saying which buffers should have their own special
frames. If a buffer name matches one of these regexps, it gets its
own frame. Displaying a buffer whose name is in this list makes a
special frame for it using `special-display-function'.
An element of the list can be a list instead of just a string.
There are two ways to use a list as an element:
(REGEXP FRAME-PARAMETERS...) (REGEXP FUNCTION OTHER-ARGS...)
In the first case, FRAME-PARAMETERS are used to create the frame.
It works only half way, emacs opens up matching buffers in a new
frame, but the supplied frame parameters is not applied.
What am I doing wrong?
I have loaded emacs using --no-init-file and --no-site-file but to no
avail.
/Mathias
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using special-display-regexps
2004-06-17 22:19 using special-display-regexps Barman Brakjoller
@ 2004-06-17 22:23 ` Barman Brakjoller
2004-06-17 23:43 ` Michael Slass
1 sibling, 0 replies; 6+ messages in thread
From: Barman Brakjoller @ 2004-06-17 22:23 UTC (permalink / raw)
Barman Brakjoller <brakjoller@hotmail.com> writes:
> I'm trying to teach emacs to treat some buffers in a special way using
> this code that is supposed to work:
>
> (setq special-display-regexps
> '(("jabber-chat"
> ((top . 10) (height . 5) (left . 200)))))
>
Sorry, I forgot to tell you that I use display-buffer after having
set this up and that does not fully work as expected.
/Mathias
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using special-display-regexps
2004-06-17 22:19 using special-display-regexps Barman Brakjoller
2004-06-17 22:23 ` Barman Brakjoller
@ 2004-06-17 23:43 ` Michael Slass
2004-06-18 6:48 ` Mathias Dahl
1 sibling, 1 reply; 6+ messages in thread
From: Michael Slass @ 2004-06-17 23:43 UTC (permalink / raw)
Barman Brakjoller <brakjoller@hotmail.com> writes:
>I'm trying to teach emacs to treat some buffers in a special way using
>this code that is supposed to work:
>
>(setq special-display-regexps
> '(("jabber-chat"
> ((top . 10) (height . 5) (left . 200)))))
>
>In the documentation string thew following can be seen:
>
> *List of regexps saying which buffers should have their own special
> frames. If a buffer name matches one of these regexps, it gets its
> own frame. Displaying a buffer whose name is in this list makes a
> special frame for it using `special-display-function'.
>
> An element of the list can be a list instead of just a string.
> There are two ways to use a list as an element:
> (REGEXP FRAME-PARAMETERS...) (REGEXP FUNCTION OTHER-ARGS...)
> In the first case, FRAME-PARAMETERS are used to create the frame.
>
>It works only half way, emacs opens up matching buffers in a new
>frame, but the supplied frame parameters is not applied.
>
>What am I doing wrong?
>
>I have loaded emacs using --no-init-file and --no-site-file but to no
>avail.
>
>/Mathias
The frame parameters should each be elements at the same level as
"jabber-chat", rather than in their own enclosing list, as you've got it.
Also, it's better to use (add-to-list ...) rather than setq in this
context, because setq will clobber anything that's already there.
Put those together, and I think you get something like this:
(add-to-list 'special-display-regexps
'("jabber-chat" (top . 10) (height . 5) (left . 200)))
--
Mike Slass
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using special-display-regexps
2004-06-17 23:43 ` Michael Slass
@ 2004-06-18 6:48 ` Mathias Dahl
2004-06-18 14:44 ` Michael Slass
2004-06-18 15:34 ` Kevin Rodgers
0 siblings, 2 replies; 6+ messages in thread
From: Mathias Dahl @ 2004-06-18 6:48 UTC (permalink / raw)
Michael Slass <miknrene@drizzle.com> writes:
> >I'm trying to teach emacs to treat some buffers in a special way using
> >this code that is supposed to work:
> >
> >(setq special-display-regexps
> > '(("jabber-chat"
> > ((top . 10) (height . 5) (left . 200)))))
> >
> >In the documentation string thew following can be seen:
> >
> > *List of regexps saying which buffers should have their own special
> > frames. If a buffer name matches one of these regexps, it gets its
> > own frame. Displaying a buffer whose name is in this list makes a
> > special frame for it using `special-display-function'.
> >
> > An element of the list can be a list instead of just a string.
> > There are two ways to use a list as an element:
> > (REGEXP FRAME-PARAMETERS...) (REGEXP FUNCTION OTHER-ARGS...)
> > In the first case, FRAME-PARAMETERS are used to create the frame.
> >
> >It works only half way, emacs opens up matching buffers in a new
> >frame, but the supplied frame parameters is not applied.
> >
> >What am I doing wrong?
> >
> >I have loaded emacs using --no-init-file and --no-site-file but to no
> >avail.
> >
> >/Mathias
>
>
> The frame parameters should each be elements at the same level as
> "jabber-chat", rather than in their own enclosing list, as you've got it.
> Also, it's better to use (add-to-list ...) rather than setq in this
> context, because setq will clobber anything that's already there.
>
> Put those together, and I think you get something like this:
>
> (add-to-list 'special-display-regexps
> '("jabber-chat" (top . 10) (height . 5) (left . 200)))
>
Aaaaaah! Yes, that did the trick! Is this just a problem with me
or could the documentation be more clear on this subject? I have
fiddles with frame parameters from time to time and then I had
always needed to enclose them in their own list. This is the
reason I thought I had to do the same now.
Thanks!
/Mathias
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using special-display-regexps
2004-06-18 6:48 ` Mathias Dahl
@ 2004-06-18 14:44 ` Michael Slass
2004-06-18 15:34 ` Kevin Rodgers
1 sibling, 0 replies; 6+ messages in thread
From: Michael Slass @ 2004-06-18 14:44 UTC (permalink / raw)
Mathias Dahl <brakjoller@hotmail.com> writes:
>Aaaaaah! Yes, that did the trick! Is this just a problem with me
>or could the documentation be more clear on this subject? I have
>fiddles with frame parameters from time to time and then I had
>always needed to enclose them in their own list. This is the
>reason I thought I had to do the same now.
>
> > An element of the list can be a list instead of just a string.
> > There are two ways to use a list as an element:
> > (REGEXP FRAME-PARAMETERS...) (REGEXP FUNCTION OTHER-ARGS...)
Whether or not the docs could be more clear is a matter of debate, but
I think they're consistent; if the frame parameters in this context
were meant to be enclosed in their own list, the above would probably
show some extra parens:
> > (REGEXP (FRAME-PARAMETERS...) )
That said, if you were to re-write this variable documentation in a
way that's clearer to you, and submit it as an emacs docs bug, someone
with greater authority could decide whether or not to incorporate it.
--
Mike Slass
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using special-display-regexps
2004-06-18 6:48 ` Mathias Dahl
2004-06-18 14:44 ` Michael Slass
@ 2004-06-18 15:34 ` Kevin Rodgers
1 sibling, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2004-06-18 15:34 UTC (permalink / raw)
Mathias Dahl wrote:
> Michael Slass <miknrene@drizzle.com> writes:
>>>I'm trying to teach emacs to treat some buffers in a special way using
>>>this code that is supposed to work:
>>>
>>>(setq special-display-regexps
>>> '(("jabber-chat"
>>> ((top . 10) (height . 5) (left . 200)))))
>>>
>>>In the documentation string thew following can be seen:
>>>
>>> *List of regexps saying which buffers should have their own special
>>> frames. If a buffer name matches one of these regexps, it gets its
>>> own frame. Displaying a buffer whose name is in this list makes a
>>> special frame for it using `special-display-function'.
>>>
>>> An element of the list can be a list instead of just a string.
>>> There are two ways to use a list as an element:
>>> (REGEXP FRAME-PARAMETERS...) (REGEXP FUNCTION OTHER-ARGS...)
>>> In the first case, FRAME-PARAMETERS are used to create the frame.
>>>
>>>It works only half way, emacs opens up matching buffers in a new
>>>frame, but the supplied frame parameters is not applied.
>>
>>The frame parameters should each be elements at the same level as
>>"jabber-chat", rather than in their own enclosing list, as you've got it.
>>Also, it's better to use (add-to-list ...) rather than setq in this
>>context, because setq will clobber anything that's already there.
>>
>>Put those together, and I think you get something like this:
>>
>>(add-to-list 'special-display-regexps
>> '("jabber-chat" (top . 10) (height . 5) (left . 200)))
>>
>
> Aaaaaah! Yes, that did the trick! Is this just a problem with me
> or could the documentation be more clear on this subject? I have
> fiddles with frame parameters from time to time and then I had
> always needed to enclose them in their own list. This is the
> reason I thought I had to do the same now.
Yes, I think the correct way to denote that data structure would be:
(REGEXP . FRAME-PARAMETERS) ; FRAME-PARAMETERS is an association list
; of (PARAMETER . VALUE) conses
or
(REGEXP (PARAMETER . VALUE) ...)
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-18 15:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-17 22:19 using special-display-regexps Barman Brakjoller
2004-06-17 22:23 ` Barman Brakjoller
2004-06-17 23:43 ` Michael Slass
2004-06-18 6:48 ` Mathias Dahl
2004-06-18 14:44 ` Michael Slass
2004-06-18 15:34 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).