From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6283: doc/lispref/searching.texi reference to octal code `0377' correct? Date: Fri, 28 May 2010 10:15:39 +0300 Message-ID: <83sk5cmr8k.fsf@gnu.org> References: <83vda9md09.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1275031662 18596 80.91.229.12 (28 May 2010 07:27:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 May 2010 07:27:42 +0000 (UTC) Cc: 6283@debbugs.gnu.org To: MON KEY Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 28 09:27:40 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OHtyk-00061t-Bj for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 May 2010 09:27:38 +0200 Original-Received: from localhost ([127.0.0.1]:54810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHtyj-000085-ND for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 May 2010 03:27:37 -0400 Original-Received: from [140.186.70.92] (port=42956 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHtya-00007q-J3 for bug-gnu-emacs@gnu.org; Fri, 28 May 2010 03:27:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHtyZ-0003yn-9t for bug-gnu-emacs@gnu.org; Fri, 28 May 2010 03:27:28 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35227) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHtyZ-0003yf-8M for bug-gnu-emacs@gnu.org; Fri, 28 May 2010 03:27:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OHtoU-0003Xn-95; Fri, 28 May 2010 03:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 May 2010 07:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6283 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6283-submit@debbugs.gnu.org id=B6283.127503097513605 (code B ref 6283); Fri, 28 May 2010 07:17:02 +0000 Original-Received: (at 6283) by debbugs.gnu.org; 28 May 2010 07:16:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHtni-0003XO-E4 for submit@debbugs.gnu.org; Fri, 28 May 2010 03:16:14 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHtnf-0003XA-2Q for 6283@debbugs.gnu.org; Fri, 28 May 2010 03:16:12 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L3400I00C49PV00@a-mtaout22.012.net.il> for 6283@debbugs.gnu.org; Fri, 28 May 2010 10:15:41 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.111.84]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L3400DS0C64S0F0@a-mtaout22.012.net.il>; Fri, 28 May 2010 10:15:41 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 28 May 2010 03:17:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37360 Archived-At: > Date: Thu, 27 May 2010 18:56:51 -0400 > From: MON KEY >=20 > On Thu, May 27, 2010 at 2:10 PM, Eli Zaretskii wrote= : >=20 > >> | characters have codes above octal 0377. =C2=A0{....} > >> `---- :FILE doc/lispref/searching.texi =C2=A0(info "(elisp)Regex= p Special") > >> > >> Shouldn't that be: > >> > >> "characters have codes above octal #o377" > > > > What's the difference between what's written and what you suggest= ? > > >=20 > (string-equal "0377" "#o377") =3D> nil > (string-equal "0377" "0377") =3D> t > (string-equal "#o377" "#o377") =3D> t Sorry, I don't see the relevance. The manual talks about the _numeric_ code of characters, not about their read syntax. It uses "octal 0377" to present values because octal notation of single-byte characters is something many people are familiar with, regardless of them being Lisp programmers or not. After all, that is the codepoint of the character. > What isn't at all clear in the infos in general is that the octal (= or > FTM decimal, hex, etc. representations) for the literal raw-byte \2= 55 > is arrived at with something more like: >=20 > (insert (char-to-string #o17777655)) This is explained in "Non-ASCII Characters". But we generally try no= t to advertise this issue too much, because there should be no good reason for a Lisp program to create raw bytes. Emacs is a text editor, while raw bytes are not text > FWIW It took me a coupla years to figure out what how to frob those > values into a raw-byte and I still require to relearn it from the d= ocs > whenever I need to manually revert some raw-bytes or improperly > encoded bit-rotted text using regexps. It's hard to believe Emacs couldn't handle any such text in some othe= r way. What "improper encoding" was that which Emacs couldn't handle? Could it be that you simply gave up too early and tried to solve the problem by treating text as bytes, while it really wasn't?