help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: special-display-regexps


From: Drew Adams
Subject: RE: special-display-regexps
Date: Thu, 26 Apr 2007 21:49:46 -0700

> 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.

In case it helps, here's a library that uses special-display for *Help* and
*Completions* (in a different way, however):

Code: http://www.emacswiki.org/cgi-bin/wiki/oneonone.el
Doc: http://www.emacswiki.org/cgi-bin/wiki/Help_and_Completions_Frames





reply via email to

[Prev in Thread] Current Thread [Next in Thread]