From: Tim Johnson <tim@johnsons-web.com>
Subject: Info [was Re: re-search beginning of line or whitespace]
Date: Fri, 4 Nov 2005 07:38:28 -0900 [thread overview]
Message-ID: <20051104163828.GG1791@johnsons-web.com> (raw)
In-Reply-To: <20051103203316.GA29396@SDF.LONESTAR.ORG>
* Neon Absentius <absent@sdf.lonestar.org> [051103 11:45]:
> On Wed, Nov 02, 2005 at 08:19:14AM -0900, thus spake Tim Johnson:
> It is explained nicely in the elisp manual:
>
> ,----[ (info "(elisp) Regexp Special") ]
> | `\'
> | has two functions: it quotes the special characters (including
> | `\'), and it introduces additional special constructs.
> |
> | Because `\' quotes special characters, `\$' is a regular
> | expression that matches only `$', and `\[' is a regular expression
> | that matches only `[', and so on.
> |
> | Note that `\' also has special meaning in the read syntax of Lisp
> | strings (*note String Type::), and must be quoted with `\'. For
> | example, the regular expression that matches the `\' character is
> | `\\'. To write a Lisp string that contains the characters `\\',
> | Lisp syntax requires you to quote each `\' with another `\'.
> | Therefore, the read syntax for a regular expression matching `\'
> | is `"\\\\"'.
> `----
>
> You see, for the regular expression parser of emacs certain
> characters have to be escaped for example "|" when one uses it to
> indicate disjunction, so you write it "\|". However when you write
> a Lisp program the regexp is entered as a string, and since "\" is
> an elisp escape character a sting that contains "\|" is interpreted
> as "|". You don't want that, you want the string to pass to the
> "regexp machine" as is, you want the regexp to have "\|"; therefore
> you have to escape the slash thus "\\|".
>
> I hope this makes some sense.
Indeed. Thank you very much Neon.
FYI: I use both Xemacs and GNU emacs. I note that from emacs and
in invoking 'info' from the bash shell that I can not find
a Menu item for emacs or elisp. It looks as if those
components are not installed.
In Xemacs, info provides "Lispref: (lispref)" as a menu
item, which leads me to the regex topic.
For GNU emacs, how may I install these missing items?
cheers
tim
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
next prev parent reply other threads:[~2005-11-04 16:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-01 15:23 ^[$B:G?78D<<3+J|^[(B info
2005-11-02 2:39 ` re-search beginning of line or whitespace Tim Johnson
2005-11-02 3:23 ` Neon Absentius
2005-11-02 17:19 ` Tim Johnson
2005-11-03 20:33 ` Neon Absentius
2005-11-04 16:38 ` Tim Johnson [this message]
[not found] ` <mailman.13851.1131050044.20277.help-gnu-emacs@gnu.org>
2005-11-04 1:05 ` Johan Bockgård
2005-11-04 1:47 ` Neon Absentius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051104163828.GG1791@johnsons-web.com \
--to=tim@johnsons-web.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).