From: "Boylan, Ross" <Ross.Boylan@ucsf.edu>
To: Drew Adams <drew.adams@oracle.com>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: Unable to match octal character [SOLVED/WORKAROUND]
Date: Wed, 13 Apr 2016 21:34:55 +0000 [thread overview]
Message-ID: <F1F13E14A610474196571953929C02090C0CBAB2@ex08.net.ucsf.edu> (raw)
When I use M-x find-file-literally the characters do match octal 203 (and decribe-char produces same resul as shown immediately below). I was able to search and replace them.
That gets me what I need. I still wonder a bit what was going on. It seems strange to have the display should \203 but for a match on \203 to fail.
Thanks, Drew, for your help.
Ross
________________________________________
From: Boylan, Ross
Sent: Wednesday, April 13, 2016 2:14 PM
To: Drew Adams; help-gnu-emacs@gnu.org
Subject: RE: Unable to match octal character
The \203 I insert manually has a much different describe-char than the one from the file. Here's the manually inserted one:
position: 212 of 48737 (0%), column: 0
character: \203 (displayed as \203) (codepoint 131, #o203, #x83)
preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x83
syntax: w which means: word
category: l:Latin
to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
buffer code: #xC2 #x83
file code: #xC2 #x83 (encoded by coding system raw-text-unix)
display: terminal code #xC2 #x83
Character code properties: customize what to show
old-name: NO BREAK HERE
general-category: Cc (Other, Control)
decomposition: (131) ('')
So, different character set and codepoint.
I examined the file in binary and there are a bunch of hex 83 = octal 203. I thought maybe the fact that there is a string of such characters was making a difference, since x83 is not a single byte in UTF-8. But inserting a space after one of the characters doesn't help. Perhaps this is because emacs has already encoded it.
Ross
________________________________________
From: Drew Adams [drew.adams@oracle.com]
Sent: Wednesday, April 13, 2016 2:07 PM
To: Boylan, Ross; help-gnu-emacs@gnu.org
Subject: RE: Unable to match octal character
> > I have a file with some characters that display in the emacs buffer as
> > \203. Yet when I search for that, using C-s C-q 203 <ret> I can't match
> > it. Likewise if I use search and replace.
>
> Works for me. Do you see the same thing if you start Emacs using
> `emacs -Q' (no init file)?
>
> YES
So you see the same problem even without your init file.
But when you do it in *scratch* (below) you don't see the problem.
> What happens if you do this, starting from emacs -Q:
> 1. In *scratch*, move point into the text somewhere and use
> `C-q 203 RET' to insert the \203 character.
> 2. `M-<'
> 3. `C-s C-q 2 0 3 RET'
>
> THE SEARCH SUCCEEDS.
Then I guess you will need to explore the difference between
the context where you see the problem, even starting from `emacs -Q',
and the above context (recipe using *scratch*).
Try to provide a step-by-step recipe, which starts from `emacs -Q',
to reproduce the problem.
reply other threads:[~2016-04-13 21:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=F1F13E14A610474196571953929C02090C0CBAB2@ex08.net.ucsf.edu \
--to=ross.boylan@ucsf.edu \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
/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.