GNU bug report logs - #25068
25.1; Edebug fails to instrument code which uses propertized strings

Previous Next

Package: emacs;

Reported by: Gemini Lasswell <gazally <at> runbox.com>

Date: Tue, 29 Nov 2016 23:11:02 UTC

Severity: normal

Found in version 25.1

Done: Eli Zaretskii <eliz <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 25068 in the body.
You can then email your comments to 25068 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-gnu-emacs <at> gnu.org:
bug#25068; Package emacs. (Tue, 29 Nov 2016 23:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gemini Lasswell <gazally <at> runbox.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 29 Nov 2016 23:11:02 GMT) Full text and rfc822 format available.

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

From: Gemini Lasswell <gazally <at> runbox.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; Edebug fails to instrument code which uses propertized strings
Date: Tue, 29 Nov 2016 15:10:16 -0800
Edebug gives an error message if you try to use it on code which uses
strings with text properties. To reproduce, using emacs -Q if you like,
enter the following code into *scratch* and type C-u C-M-x:

(defun my-fun ()
  (message "%s" #("abcd" 1 3 (face italic))))

This results in the error message: "Invalid read syntax: "Bad char after #"

Here is the backtrace:

Debugger entered--Lisp error: (invalid-read-syntax "Bad char after #")
  signal(invalid-read-syntax ("Bad char after #"))
  edebug-syntax-error("Bad char after #")
  edebug-read-function(#<buffer *scratch*>)
  edebug-read-storing-offsets(#<buffer *scratch*>)
  edebug-read-list(#<buffer *scratch*>)
  edebug-read-storing-offsets(#<buffer *scratch*>)
  edebug-read-list(#<buffer *scratch*>)
  edebug-read-storing-offsets(#<buffer *scratch*>)
  edebug-read-and-maybe-wrap-form1()
  edebug-read-and-maybe-wrap-form()
  edebug-read-top-level-form()
  edebug-eval-defun((4))
  apply(edebug-eval-defun (4))
  eval-defun((4))
  funcall-interactively(eval-defun (4))
  call-interactively(eval-defun nil nil)
  command-execute(eval-defun)

In GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004))
 of 2016-10-09 built on rainbow.local
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/25.1/share/info/emacs
 --prefix=/usr/local/Cellar/emacs/25.1 --without-x --with-xml2
 --without-dbus --with-gnutls --with-imagemagick --with-rsvg --with-ns
 --disable-ns-self-contained'

Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
edebug-syntax-error: Invalid read syntax: "Bad char after #"

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode mail-prsvr
mail-utils edebug easymenu cl-loaddefs pcase cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 198711 10003)
 (symbols 48 20106 0)
 (miscs 40 50 167)
 (strings 32 16048 5094)
 (string-bytes 1 457556)
 (vectors 16 33450)
 (vector-slots 8 658299 4717)
 (floats 8 160 49)
 (intervals 56 222 0)
 (buffers 976 17))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25068; Package emacs. (Sat, 04 Feb 2017 11:27:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: 25068 <at> debbugs.gnu.org
Subject: Re: bug#25068: 25.1;
 Edebug fails to instrument code which uses propertized strings
Date: Sat, 04 Feb 2017 13:26:35 +0200
> From: Gemini Lasswell <gazally <at> runbox.com>
> Date: Tue, 29 Nov 2016 15:10:16 -0800
> 
> Edebug gives an error message if you try to use it on code which uses
> strings with text properties. To reproduce, using emacs -Q if you like,
> enter the following code into *scratch* and type C-u C-M-x:
> 
> (defun my-fun ()
>   (message "%s" #("abcd" 1 3 (face italic))))
> 
> This results in the error message: "Invalid read syntax: "Bad char after #"

Could someone please look into fixing this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25068; Package emacs. (Sat, 04 Feb 2017 17:41:01 GMT) Full text and rfc822 format available.

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

From: Gemini Lasswell <gazally <at> runbox.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25068 <at> debbugs.gnu.org
Subject: Re: bug#25068: 25.1;
 Edebug fails to instrument code which uses propertized strings
Date: Sat, 04 Feb 2017 09:39:51 -0800
[Message part 1 (text/plain, inline)]
This could be fixed by updating the list in edebug-read-function of
characters that might possibly follow # to keep up with the changes to
read1 since the last time that list was updated (in 2001). But I think
it's better to remove the test entirely. If there is an invalid
character then read1 will report a syntax error.

[0001-Add-tests-for-lisp-kmacro.el.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25068; Package emacs. (Sun, 05 Feb 2017 01:51:01 GMT) Full text and rfc822 format available.

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

From: Gemini Lasswell <gazally <at> runbox.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25068 <at> debbugs.gnu.org
Subject: Re: bug#25068: 25.1;
 Edebug fails to instrument code which uses propertized strings
Date: Sat, 04 Feb 2017 17:49:49 -0800
[Message part 1 (text/plain, inline)]
Gemini Lasswell <gazally <at> runbox.com> writes:

> This could be fixed by updating the list in edebug-read-function of
> characters that might possibly follow # to keep up with the changes to
> read1 since the last time that list was updated (in 2001). But I think
> it's better to remove the test entirely. If there is an invalid
> character then read1 will report a syntax error.

Ooops, attached the wrong patch. Here's the right one:

[0001-Remove-syntax-error-check-from-edebug-read-function-.patch (text/plain, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 10 Feb 2017 09:38:01 GMT) Full text and rfc822 format available.

Notification sent to Gemini Lasswell <gazally <at> runbox.com>:
bug acknowledged by developer. (Fri, 10 Feb 2017 09:38:02 GMT) Full text and rfc822 format available.

Message #19 received at 25068-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: 25068-done <at> debbugs.gnu.org
Subject: Re: bug#25068: 25.1;
 Edebug fails to instrument code which uses propertized strings
Date: Fri, 10 Feb 2017 11:37:26 +0200
> From: Gemini Lasswell <gazally <at> runbox.com>
> Cc: 25068 <at> debbugs.gnu.org
> Date: Sat, 04 Feb 2017 17:49:49 -0800
> 
> Gemini Lasswell <gazally <at> runbox.com> writes:
> 
> > This could be fixed by updating the list in edebug-read-function of
> > characters that might possibly follow # to keep up with the changes to
> > read1 since the last time that list was updated (in 2001). But I think
> > it's better to remove the test entirely. If there is an invalid
> > character then read1 will report a syntax error.
> 
> Ooops, attached the wrong patch. Here's the right one:

Thanks, pushed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Mar 2017 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 159 days ago.

Previous Next


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