all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: MON KEY <monkey@sandpframing.com>
Cc: 6283@debbugs.gnu.org
Subject: bug#6283: doc/lispref/searching.texi reference to octal code	`0377' correct?
Date: Fri, 28 May 2010 10:15:39 +0300	[thread overview]
Message-ID: <83sk5cmr8k.fsf@gnu.org> (raw)
In-Reply-To: <AANLkTikjCByug1U69tbhsnmS4c1VXSNzoqAOAxmbt3bI@mail.gmail.com>

> Date: Thu, 27 May 2010 18:56:51 -0400
> From: MON KEY <monkey@sandpframing.com>
> 
> On Thu, May 27, 2010 at 2:10 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> >> | characters have codes above octal 0377.  {....}
> >> `---- :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

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 \255
> is arrived at with something more like:
> 
> (insert (char-to-string #o17777655))

This is explained in "Non-ASCII Characters".  But we generally try not
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 docs
> 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 other
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?






  parent reply	other threads:[~2010-05-28  7:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 17:28 bug#6283: doc/lispref/searching.texi reference to octal code `0377' correct? MON KEY
2010-05-27 18:10 ` Eli Zaretskii
2010-05-27 22:59   ` MON KEY
2010-05-29 14:28     ` Kevin Rodgers
     [not found]   ` <AANLkTikjCByug1U69tbhsnmS4c1VXSNzoqAOAxmbt3bI@mail.gmail.com>
2010-05-28  7:15     ` Eli Zaretskii [this message]
2010-05-28 23:20       ` MON KEY
2010-05-29  6:45         ` Eli Zaretskii
2010-05-31  5:35           ` MON KEY
2010-05-31 18:49             ` Eli Zaretskii
2010-06-01  0:24               ` MON KEY
2010-06-01 18:38                 ` Eli Zaretskii
2010-06-02 19:41                   ` MON KEY
2010-06-03 14:39                     ` Kevin Rodgers
2010-05-31 14:45           ` MON KEY
2010-05-31 18:51             ` Eli Zaretskii
2010-05-31 23:44 ` MON KEY
2010-06-02 16:06 ` MON KEY
2010-06-02 17:30   ` Chong Yidong
2010-06-02 17:46   ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sk5cmr8k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=6283@debbugs.gnu.org \
    --cc=monkey@sandpframing.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.