unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: emacs-devel@gnu.org
Subject: curious bug in Emacs (or slime.el or autopair.el)
Date: Sat, 3 Jul 2010 19:11:31 +0200	[thread overview]
Message-ID: <79EA007B-F084-4676-94C6-0A0D620B7621@gmail.com> (raw)

Hi,

I've come across a problem using these packages that makes Emacs quite unusable, but can't seem to trace down the problem.  The bug causes emacs to emit frequent errors

error in process filter: define-key: Wrong type argument: characterp, nil
error in process filter: Wrong type argument: characterp, nil
error in process filter: define-key: Wrong type argument: characterp, nil
error in process filter: Wrong type argument: characterp, nil
Error in post-command-hook: (wrong-type-argument characterp nil)

but (setq debug-on-error t) does *not* pop up a backtrace which leads me to suspect emacs as well. It can be reproduced like so

$ /Applications/Emacs\ -\ 23.app/Contents/MacOS/Emacs -Q --load ~/Source/autopair/autopair.el --load 50sbcl.el -e autopair-global-mode -e slime

where autopair.el is at http://autopair.googlecode.com/svn/trunk/autopair.el and 50sbcl.el sets up a some recent CVS of slime.

(add-to-list 'load-path "~/Source/Emacs/slime")
(require 'slime)
;; (add-hook 'sldb-mode-hook #'(lambda () (setq autopair-dont-activate t))) ;; this line will work around the problem.
(setq inferior-lisp-program "/opt/local/bin/sbcl")
(setenv "SBCL_HOME" "/opt/local/lib/sbcl")

As soon as the user attempts to evaluate an unbound symbol in the REPL,  the strange error appears. 
I apologize for such a complicated recipe, but couldn't come up with anything simpler.

The following things cause the error not to happen:
1. (add-hook 'sldb-mode-hook #'(lambda () (setq autopair-dont-activate t))) ;; disables autopair.el in the sbcl-mode buffer, where it was useless anyway
2. disable slime.el setting of ">" to the syntax class ")" in slime.el
3. in sldb-mode's function definition, remove the call to (kill-all-local-variables)
4. in sldb-mode's function definition, which I got by pretty-printing (symbol-function sldb-mode), insert a `debug' call between the calls to 'use-local-map and 'set-syntax-table. Continue after the debug and no error should happen.
5. prevent autopair.el from  binding ">" to 'autopair-skip-close-maybe in a keymap which is used in a keymap alist which in turn autopair uses as an element of `emulation-mode-map-alists'

The error has been reproduced by more people, also in w32 i think.  See http://code.google.com/p/autopair/issues/detail?id=32. No idea how to catch it in the act. I could attach gdb to it,  but then what?

J


                 reply	other threads:[~2010-07-03 17:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79EA007B-F084-4676-94C6-0A0D620B7621@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).