From: "Łukasz Stelmach" <lukasz.stelmach@iem.pw.edu.pl>
To: bug-gnu-emacs@gnu.org
Subject: bug#5221: 23.1; read_escape too greedy with "\x"
Date: Tue, 15 Dec 2009 13:29:33 +0100 [thread overview]
Message-ID: <87fx7cpgia.fsf@dasa3.iem.pw.edu.pl> (raw)
Emacs (read_escape() function at lread.c file) interpretinterprets
"\x3a480" string as "0x3a480" instead of ":" and "480" coming next.
Some software (most? gnupg to name one) assume these escapes represent
single bytes.
Try interpreting "\x3a480" in the *scratch* buffer.
IMHO the while() loop in read_escape for c='x' should depend on
"count < 3" condition.
Why would anyone use multibyte "\x" sequence instead of "\u" one anyway?
In GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.16.6)
of 2009-09-14 on nautilus, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: pl_PL.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
jabber-activity-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
m <backspace> <backspace> <M-tab> SPC <right> <down>
<down> C-e ) C-j <up> C-k C-k C-k C-k C-k C-h f <S-insert>
<return> <help-echo> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> ( d e c <M-tab> o <M-tab> d <M-tab> 0 c i
\ <backspace> <backspace> <backspace> <backspace> c
o d i n g - s t r i n g S-SPC " \ <down-mouse-1> <mouse-movement>
<mouse-1> 3 a <backspace> <backspace> x 3 a " SPC '
u t f 8 ) C-j <up> <up> <down-mouse-1> <mouse-1> <right>
- C-e C-j <up> <up> <end> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <right> 4
8 0 C-e C-j <up> C-x o C-x b B U G <tab> <return> .
<return> <tab> b ł ę <backspace> ą d SPC j e s t SPC
w SPC <help-echo> <help-echo> <down-mouse-1> <mouse-1>
<up> <up> <up> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <backspace> c <right>
<backspace> 5 <delete> <delete> <delete> b c C-e C-j
<up> <up> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
\ x C-e C-j <help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> <down-mouse-1> <mouse-1> <double-down-mouse-1>
<mouse-movement> <mouse-movement> <double-drag-mouse-1>
<help-echo> <down-mouse-2> <mouse-2> SPC k t ó r e
SPC p o ł y k a SPC w i e c e j SPC n i ż SPC d w a
SPC z n a k i SPC M-q <up> <left> <left> <left> <left>
<left> <left> <left> <left> <delete> <down> C-e SPC
p o SPC " \ x " C-x C-s <help-echo> <help-echo> <down-mouse-1>
<mouse-1> M-x r e p o SPC r SPC - <backspace> e m SPC
b SPC <return>
Recent messages:
Entering debugger...
Mark set
Type C-x 4 C-o RET to restore the other window.
Making completion list...done
Making completion list...done
Entering debugger...
Mark set
Saving file /tmp/asdf.txt...
Wrote /tmp/asdf.txt
Making completion list...
--
Miłego dnia,
Łukasz Stelmach
next reply other threads:[~2009-12-15 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 12:29 Łukasz Stelmach [this message]
2009-12-17 15:53 ` bug#5221: 23.1; read_escape too greedy with "\x" Andreas Schwab
2009-12-18 12:04 ` Łukasz Stelmach
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=87fx7cpgia.fsf@dasa3.iem.pw.edu.pl \
--to=lukasz.stelmach@iem.pw.edu.pl \
--cc=5221@emacsbugs.donarmstrong.com \
--cc=bug-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.