[slime-devel] invalid protocol message / illegal sharp macro character

Helmut Eller heller at common-lisp.net
Thu Aug 25 16:48:00 UTC 2011


* 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 at 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





More information about the slime-devel mailing list