help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: query-replace?


From: B. T. Raven
Subject: Re: query-replace?
Date: Sun, 08 Jan 2006 05:38:25 GMT

"Eli Zaretskii" <eliz@gnu.org> wrote in message
news:mailman.301.1136694143.26925.help-gnu-emacs@gnu.org...
> > From: "B. T. Raven" <ecinmn@peoplepc.com>
> > Date: Sat, 07 Jan 2006 19:04:29 GMT
> >
> > I have a character \234 in a file that should be displayed as an oe
> > ligature. I have tried M-% C-q (0)234 but this doesn't work for
getting it
> > into the patter to be replaced. How do I refer to this character?
>
> Not as \234.  Internally, non-ASCII characters are encoded differently
> inside Emacs buffers; \234 is that character's _external_ encoding, in
> a file.
>
> To see what is the internal codepoint, go to that character and type
> "C-u C-x =".  In the buffer that Emacs pops up, look for the number
> labeled "buffer code".
>
> > Is it possible to include newlines in regexps?
>
> Yes, use "C-q C-j".
>
> > .*\n can't work of course. Since some of the lines are blank, I
inserted
> > C-q C-j into the string but that produced a litteral ^M. ??
>
> C-q C-j should produce a literal newline, not ^M.
>
> Btw, in the future I suggest not to ask several different unrelated
> questions in the same message, but instead split it into several
> messages.  That would allow you to give meaningful Subject lines to
> each message, and readers of this forum will be able to tell in
> advance, by just reading the Subject lines, whether they can help you
> with some of the problems.
>
>

Thanks, Eli. Actually \234 (dec. 156, hex 9c) was the internal
representation of the char. It was the only one with diacriticals that
showed up that way(clicking anywhere in the string put the cursor at the
backslash). The actual oe ligature is 01210163, 331891, 0x51073 but
wherever \234 was needed to be 'oe' from context. I had left
read-quoted-char-radix  at 16 and thought I could override it by typing
C-q 0234 but that is also a hex number I guess. I used query-replace for
the subject line because I saw both questions as related to that function.
I suppose one was really a question on regexp syntax. Anyway I understand
both procedures a little better now (until next time).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]