[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: special-display-regexps
From: |
Tyler Smith |
Subject: |
Re: special-display-regexps |
Date: |
Fri, 27 Apr 2007 12:40:56 GMT |
User-agent: |
slrn/0.9.8.1pl1 (Debian) |
On 2007-04-27, Drew Adams <drew.adams@oracle.com> wrote:
>> I'm trying to set up special display frames. I want to use if for the
>> following buffers:
>>
>> *Completions*
>> *Help*
>> *help[R](functionname)*
>>
>> I've tried the following regexps:
>> (setq special-display-regexps
>> '("^\\*Help\\*$"
>> "^\\*Completions\\*$"
>> "^\\*help\\[R\\]([a-z]*)\\*$"))
>>
>> This works fine for the first two, but the third doesn't catch. I've
>> also tried with single \ and double \, as well as simpler things like
>> "\*help.*" -- this works for regexp searches when I paste the buffer
>> name into scratch, but they don't work for the special display. What
>> am I doing wrong?
>
> "[*]Help[*]" etc. is simpler.
>
> You want the backslash to be in the string itself, so that the * is escaped.
> To put a single backslash into a string in Lisp, you need to use \\\\. See
> node "Regexp Special" in the Elisp manual.
>
This is really confusing now.
"^\\*Completions\\*$" matches *Completions*, although I'm not sure
why since it is actually the regexp ^*Completions*$, since the double
\ should get filtered out by the string reader??
and "^[*]help.*" still doesn't match *help[R](help-topic)* , but the
same thing entered in a regexp search will match.
Any other advice?
Thanks,
Tyler