When compiling a code snippet with C-c C-c, I get the following error in SLIME:
Invalid protocol message: SB-INT:SIMPLE-READER-ERROR at 191 (line 3, column 41) on #<SB-IMPL::STRING-INPUT-STREAM
{10049826B1}>: illegal sharp macro character: #\
"(:emacs-rex (swank:compile-string-for-emacs "(defun show-pdf (pathname) (external-program:start \"xpdf\" (list (namestring pathname) \"-z page\"))) " #("external.lisp" 0 13 (buffer-name #2 buffer #<buffer external.lisp> font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer")) (quote ((:position 1951) (:line 43 1))) "/home/tamas/src/lisp/cl-pgf/external.lisp" (quote nil)) ":cl-pgf" t 88) "
I pasted *slime-events* at http://paste.lisp.org/display/124254.
C-c C-k compiles everything cleanly, there are no # characters in the entire file. I am using the latest SLIME from the repo, GNU Emacs 24.0.50.1 "(x86_64-pc-linux-gnu, GTK+ Version 2.24.5) of 2011-08-21 on keller, modified by Debian", and SBCL 1.0.50.0.debian. The error shows up with other version of SLIME, but not with Emacs23, and it is not specific to the particular code snippet.
Thanks,
Tamas
* Tamas Papp [2011-08-25 14:14] writes:
When compiling a code snippet with C-c C-c, I get the following error in SLIME:
Invalid protocol message: SB-INT:SIMPLE-READER-ERROR at 191 (line 3, column 41) on #<SB-IMPL::STRING-INPUT-STREAM
{10049826B1}>:
illegal sharp macro character: #\
"(:emacs-rex (swank:compile-string-for-emacs "(defun show-pdf (pathname) (external-program:start \"xpdf\" (list (namestring pathname) \"-z page\"))) " #("external.lisp" 0 13 (buffer-name #2 buffer #<buffer external.lisp> font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer")) (quote ((:position 1951) (:line 43 1))) "/home/tamas/src/lisp/cl-pgf/external.lisp" (quote nil)) ":cl-pgf" t 88) "
It looks like something added text properties to the string returned by buffer-name. Do you use a package like iswitch-buffer that, unintentionally, adds text properties to buffer names?
We could always strip text properties just to be sure but that's rather awkward.
Helmut
On Thu, 25 Aug 2011 16:33:54 +0200, Helmut Eller wrote:
- Tamas Papp [2011-08-25 14:14] writes:
When compiling a code snippet with C-c C-c, I get the following error in SLIME:
Invalid protocol message: SB-INT:SIMPLE-READER-ERROR at 191 (line 3, column 41) on #<SB-IMPL::STRING-INPUT-STREAM
{10049826B1}
:
illegal sharp macro character: #\
"(:emacs-rex (swank:compile-string-for-emacs "(defun show-pdf (pathname) (external-program:start \"xpdf\" (list (namestring pathname) \"-z page\"))) " #("external.lisp" 0 13 (buffer-name #2 buffer #<buffer external.lisp> font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer")) (quote ((:position 1951) (:line 43 1))) "/home/tamas/src/lisp/cl-pgf/external.lisp" (quote nil)) ":cl-pgf" t 88) "
It looks like something added text properties to the string returned by buffer-name. Do you use a package like iswitch-buffer that, unintentionally, adds text properties to buffer names?
I am not using iswitch-buffer, but I don't really know much about text properties to allow me to figure out what is adding them, it looks like something triggered by SLIME.
If I start emacs-snapshot, open a .lisp file and eval (buffer-name), I get something like "foo.lisp".
Then, if I start SLIME (ie an inferior lisp), and eval (buffer-name) in the lisp buffer, I get something like
#("foo.lisp" 0 8 (buffer-name #0 buffer #<buffer foo.lisp> font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer"))
Apparently SLIME is changing something. Suggestions on how I could find what it is would be appreciated, I can reproduce this with a minimal SLIME setup, but only with the latest emacs snapshot. The relevant part of *Messages* is
"foo.lisp" Polling "/tmp/slime.13780".. (Abort with `M-x slime-abort-connection'.) [6 times] Connecting to Swank on port 52256.. [2 times] Connected. Lemonodor-fame is but a hack away! Quit #("foo.lisp" 0 8 (buffer-name #0 buffer #<buffer foo.lisp> font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer))
*slime-events* is at http://paste.lisp.org/+2NVM .
Thanks,
Tamas
* Tamas Papp [2011-08-25 15:05] writes:
On Thu, 25 Aug 2011 16:33:54 +0200, Helmut Eller wrote:
- Tamas Papp [2011-08-25 14:14] writes:
When compiling a code snippet with C-c C-c, I get the following error in SLIME:
Invalid protocol message: SB-INT:SIMPLE-READER-ERROR at 191 (line 3, column 41) on #<SB-IMPL::STRING-INPUT-STREAM
{10049826B1}
:
illegal sharp macro character: #\
"(:emacs-rex (swank:compile-string-for-emacs "(defun show-pdf (pathname) (external-program:start \"xpdf\" (list (namestring pathname) \"-z page\"))) " #("external.lisp" 0 13 (buffer-name #2 buffer #<buffer external.lisp> font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer")) (quote ((:position 1951) (:line 43 1))) "/home/tamas/src/lisp/cl-pgf/external.lisp" (quote nil)) ":cl-pgf" t 88) "
It looks like something added text properties to the string returned by buffer-name. Do you use a package like iswitch-buffer that, unintentionally, adds text properties to buffer names?
I am not using iswitch-buffer, but I don't really know much about text properties to allow me to figure out what is adding them, it looks like something triggered by SLIME.
If I start emacs-snapshot, open a .lisp file and eval (buffer-name), I get something like "foo.lisp".
Then, if I start SLIME (ie an inferior lisp), and eval (buffer-name) in the lisp buffer, I get something like
#("foo.lisp" 0 8 (buffer-name #0 buffer #<buffer foo.lisp> font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer"))
Apparently SLIME is changing something. Suggestions on how I could find what it is would be appreciated, I can reproduce this with a minimal SLIME setup, but only with the latest emacs snapshot. The relevant part of *Messages* is
How recent is your Emacs snapshot? Coincidentally this ChangeLog entry:
2011-08-25 Eli Zaretskii eliz@gnu.org
* buff-menu.el (Buffer-menu-buffer+size): Remove calls to bidi-string-mark-left-to-right; they are unnecessary now.
probably fixes the problem. bidi-string-mark-left-to-right does normally not copy the string, i.e. does the opposite of what the "Don't put properties on (buffer-name)" comment in buff-menu.el says.
Helmut