🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188977

Re: Directory Files

#188977
From: Dale Worley
Date: Fri, 24 May 1991 14:02
23 lines
1862 bytes
In article <1991May23.164059.8461@m.cs.uiuc.edu> joshi@m.cs.uiuc.edu (Anil Joshi) writes:
   2. In the emacs syntax to represent the period, I need to escape it but
      that is not enough. I need to escape the escape (\\). This is
      totally counter-intuitive (as many things in emacs are). Why o why?

Because what you are typing goes through two layers of interpretation:
(1) the emacs lisp reader reads what you type to produce a string, and
(2) the regexp processor reads the string.

To build a regexp to match the string ".", the regexp processor needs
as input two characters: backslash-period.  But in order to get the
lisp reader to insert a backslash into a string, it needs to be
represented as: backslash-backslash.  Thus, to get the effect you
want, you have to type backslash-backslash-period.

It all comes from using the same escape character for both the lisp
reader and the regexp processor.

Dale Worley		Compass, Inc.			worley@compass.com
--
Necessity is the plea for every infringement of human freedom.
It is the argument of tyrants; it is the creed of slaves.
-- William Pitt
Technical Details
Message-ID: <WORLEY.91May24100247@sn1987a.compass.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!think.com!compass!worley
References: <1991May21.213101.22515@m.cs.uiuc.edu> <May.22.23.29.43.1991.19252@yoko.rutgers.edu> <1991May23.164059.8461@m.cs.uiuc.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,47d8d87ddf6099a4
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-05-24 12:58:12 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!think.com!compass!worley
From: worley@compass.com (Dale Worley)
Newsgroups: gnu.emacs.help
Subject: Re: Directory Files
Message-ID: <WORLEY.91May24100247@sn1987a.compass.com>
Date: 24 May 91 14:02:47 GMT
References: <1991May21.213101.22515@m.cs.uiuc.edu>
 <May.22.23.29.43.1991.19252@yoko.rutgers.edu>
 <1991May23.164059.8461@m.cs.uiuc.edu>
Sender: root@compass.com
Organization: Compass, Inc., Wakefield, MA, U.S.A.
Lines: 23
In-reply-to: joshi@m.cs.uiuc.edu's message of 23 May 91 16:40:59 GMT