From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: bug#6283: doc/lispref/searching.texi reference to octal code `0377' correct? Date: Sat, 29 May 2010 08:28:57 -0600 Message-ID: References: <83vda9md09.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1275152296 28357 80.91.229.12 (29 May 2010 16:58:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 May 2010 16:58:16 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 29 18:58:13 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 1OIPMR-0002ZE-SU for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 May 2010 18:58:12 +0200 Original-Received: from localhost ([127.0.0.1]:54801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIPMQ-0002Fz-CC for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 May 2010 12:58:10 -0400 Original-Received: from [140.186.70.92] (port=46219 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIOPv-0001yn-F7 for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 11:57:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIOPp-00054p-QV for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 11:57:43 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46059) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIOPp-00054e-Ox for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 11:57:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OIO8p-0001A6-Gl; Sat, 29 May 2010 11:40:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Rodgers Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2010 15:40:03 +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 submit@debbugs.gnu.org id=B.12751475864457 (code B ref -1); Sat, 29 May 2010 15:40:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 May 2010 15:39:46 +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 1OIO8X-00019q-V4 for submit@debbugs.gnu.org; Sat, 29 May 2010 11:39:46 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIO8U-00019j-Dm for submit@debbugs.gnu.org; Sat, 29 May 2010 11:39:43 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:47830) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OIO8P-0008Hs-68 for submit@debbugs.gnu.org; Sat, 29 May 2010 11:39:37 -0400 Original-Received: from [140.186.70.92] (port=46246 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIO8L-000203-FJ for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 11:39:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIN2C-0006Cj-TA for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 10:29:10 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:48334) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIN2C-0006CO-Jj for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 10:29:08 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OIN29-0005gY-OA for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 16:29:05 +0200 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 May 2010 16:29:05 +0200 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 May 2010 16:29:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 54 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 29 May 2010 11:40:03 -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:37387 Archived-At: MON KEY wrote: > On Thu, May 27, 2010 at 2:10 PM, Eli Zaretskii wrote: >>> `---- :FILE doc/lispref/searching.texi (info "(elisp)Regexp Special") >>> >>> Shouldn't that be: >>> >>> "characters have codes above octal #o377" >> What's the difference between what's written and what you suggest? >> > > (string-equal "0377" "#o377") => nil > (string-equal "0377" "0377") => t > (string-equal "#o377" "#o377") => t Those strings are not what you seem to think: (length "0377") ⇒ 4 (length "#o377") ⇒ 5 I think "\377" aka "\xFF" aka "\u00FF" is what you mean. > The latter forms read syntax being more in keeping with how the lisp > reader would interpret what the info docs are referring to as `octal > 0377', and is at in keeping with what is presented in > (info "(elisp)Integer Basics"): > > (eval #o377) => 255 > > 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 \255 > is arrived at with something more like: > > (insert (char-to-string #o17777655)) > > (insert (char-to-string #x3fffad)) > > (insert (char-to-string 4194221)) > > e.g. decimal 4194221 -> octal #o17777655 -> hex #x3fffad > > Without knowing what do with that octal value simply referencing \255 > as octal 0377 or hex X3FFFAD isn't all that informative of itself. > > 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 docs > whenever I need to manually revert some raw-bytes or improperly > encoded bit-rotted text using regexps. > -- Kevin Rodgers Denver, Colorado, USA