🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98510

Re: string evaluation seems inconsistent...

#98510
From: Barry Margolin
Date: Thu, 04 Jul 1991 03:54
34 lines
1810 bytes
In article <9107021544.AA01159@beast.icad.com> nick@icad.COM writes:
>If I eval the string:
>
>"^locks:[ \C-i]*\\([a-zA-Z0-9]*\\):?[ \C-i]*\\([0-9a-z\\.]*\\);[ \C-i]*\\([a-zA-Z]\\)$"
>
>I get:
>
>"^locks:[ 	]*\\([a-zA-Z0-9]*\\):?[ 	]*\\([0-9a-z\\.]*\\);[ 	]*\\([a-zA-Z]\\)$"
>
>Whereas what I *expect* is 
>
>"^locks:[ 	]*\([a-zA-Z0-9]*\):?[ 	]*\([0-9a-z\.]*\);[ 	]*\([a-zA-Z]\)$"
...
>If single backslashes are elided to no backslashes, shouldn't double
>backslashes be elided to single ones?

You are confusing what is *in* the string with how it is displayed.  In
Lisp, objects are displayed in the same way that you would have to type
them.

Just as double backslashes turn into single backslashes on input, single
backslashes are turned into double backslashes on output.  The print and
read functions are inverses of each other.

>    icad inc, 201 broadway		   

If you're at Icad, there must be a few Lisp wizards who should be able to
clear up your confusion.  Say hi to j9 for me.

-- 
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar
Technical Details
Message-ID: <1991Jul4.035455.20947@Think.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!think.UUCP!barmar
References: <9107021544.AA01159@beast.icad.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,5dc08851e7cafa4b
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-07-03 20:54:55 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!think.UUCP!barmar
From: barmar@think.UUCP (Barry Margolin)
Newsgroups: gnu.emacs.bug
Subject: Re: string evaluation seems inconsistent...
Message-ID: <1991Jul4.035455.20947@Think.COM>
Date: 4 Jul 91 03:54:55 GMT
References: <9107021544.AA01159@beast.icad.com>
Sender: gnulists@ai.mit.edu
Reply-To: think!barmar@bloom-beacon.mit.edu
Distribution: gnu
Organization: Thinking Machines Corporation, Cambridge MA, USA
Lines: 34
Approved: bug-gnu-emacs@prep.ai.mit.edu