GNU bug report logs - #5221
23.1; read_escape too greedy with "\x"

Previous Next

Package: emacs;

Reported by: Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl>

Date: Tue, 15 Dec 2009 12:35:04 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5221 in the body.
You can then email your comments to 5221 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#5221; Package emacs. (Tue, 15 Dec 2009 12:35:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 15 Dec 2009 12:35:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; read_escape too greedy with "\x"
Date: Tue, 15 Dec 2009 13:29:33 +0100
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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5221; Package emacs. (Fri, 18 Dec 2009 14:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 5221 <at> debbugs.gnu.org (full text, mbox):

From: Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 5221 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5221: 23.1; read_escape too greedy with "\x"
Date: Fri, 18 Dec 2009 13:04:17 +0100
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl> writes:
>
>> 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.
>
> Then they are broken.  The syntax of strings is documented in
> (elisp)String Type.

OK, good point. We need a workaround somewhere else (in GnuPG maybe?).
Please consider this bug solved/closed/non-existent.

-- 
Miłego dnia,
Łukasz Stelmach




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5221; Package emacs. (Fri, 18 Dec 2009 17:05:03 GMT) Full text and rfc822 format available.

Message #11 received at 5221 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl>
Cc: 5221 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5221: 23.1; read_escape too greedy with "\x"
Date: Thu, 17 Dec 2009 16:53:43 +0100
Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl> writes:

> 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.

Then they are broken.  The syntax of strings is documented in
(elisp)String Type.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




bug closed, send any further explanations to Łukasz Stelmach <lukasz.stelmach <at> iem.pw.edu.pl> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 18 Dec 2009 23:18:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <bug-gnu-emacs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Jan 2010 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.