[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in post-command-hook (completion-in-region--postch): (wrong-ty

From: Tassilo Horn
Subject: Re: Error in post-command-hook (completion-in-region--postch): (wrong-type-argument stringp nil)
Date: Fri, 24 Aug 2012 13:23:05 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux)

Thien-Thi Nguyen <address@hidden> writes:

>    (defun nrepl-complete-at-point ()
>      (interactive)
>      (let ((sap (symbol-at-point)))
>        (when (and sap (not (in-string-p)))
>          (nrepl-send-string [...])
>          [...]
>          )))
>    I'm happy for any pointers!
> Many times, the value of a variable depends on the current buffer.
> (This is the beauty and curse of Emacs.)
> Does ‘nrepl-send-string’ change the current buffer?


> The same questions could apply to any of the functions involved.
> To find out, i would add some calls to ‘message’, not trusting builtin
> debug, Edebug (or, more to the point, my fumblings w/ these facilities)
> to not distort the state under study.

I tried that, and message always said I'm in the buffer I was supposed
to be in, even though the next message was the error.

To be super-safe I added

    (assert (eq major-mode 'clojure-mode))

before every single form of my function!  Right now, I only have one
clojure-mode buffer open.  The original post-command-hook error still
occurs, but the assertions are always true anyhow.  So it doesn't seem
to be caused by being in the wrong buffer...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]