Re: [Sbcl-help] Problem with with-open-file

Op donderdag 29 jul 2010 17:42 CEST schreef Pascal J. Bourguignon:
> Which is not surprizing since it's in the post-command-hook.
> I thought however that erronous hooks were removed automatically...
>
> Check functions in post-command-hook. (Notice that it's often a
> buffer-local variable, so you should check it in the problematic
> buffer).
It is nil after the error, before it is:
(slime-post-command-hook t autopair-post-command-handler)
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Thread view

I have the following 'code':
(with-open-file (in "~/recepten.db")
(read in))
This looks like it should work, but when I execute this, I get:
error in process filter: Wrong type argument: characterp, nil
What is happening here? In clisp this code worked.
I am using:
GNU Emacs 23.1.1
SBCL 1.0.40
I can not find the version of slime.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Cecil Westerhof <Cecil@...> writes:
> I have the following 'code':
> (with-open-file (in "~/recepten.db")
> (read in))
>
> This looks like it should work, but when I execute this, I get:
> error in process filter: Wrong type argument: characterp, nil
This is an emacs error.
M-: (require 'cl) RET
M-: (setf debug-on-error t) RET
and try it again to fall in the emacs debugger and see where it comes from...
> What is happening here? In clisp this code worked.
> I am using:
> GNU Emacs 23.1.1
> SBCL 1.0.40
>
> I can not find the version of slime.
--
__Pascal Bourguignon__ http://www.informatimago.com/

Cecil Westerhof <Cecil@...> writes:
> I have the following 'code':
> (with-open-file (in "~/recepten.db")
> (read in))
>
> This looks like it should work, but when I execute this, I get:
> error in process filter: Wrong type argument: characterp, nil
>
> What is happening here? In clisp this code worked.
> I am using:
> GNU Emacs 23.1.1
> SBCL 1.0.40
First, SBCL doesn't understand ~, so you need
(merge-pathnames "reception.db" (user-homedir-pathname))
But if you're using the latest slime (check with M-x
slime-changelog-date) I'd be interested to see the backtrace while still
entering your erroneous filename with ~.
--
With Best Regards, Stas.

Op donderdag 29 jul 2010 17:01 CEST schreef Stas Boukarev:
>> I have the following 'code':
>> (with-open-file (in "~/recepten.db")
>> (read in))
>>
>> This looks like it should work, but when I execute this, I get:
>> error in process filter: Wrong type argument: characterp, nil
>>
>> What is happening here? In clisp this code worked.
>> I am using:
>> GNU Emacs 23.1.1
>> SBCL 1.0.40
> First, SBCL doesn't understand ~, so you need
> (merge-pathnames "reception.db" (user-homedir-pathname))
That was the problem. This does not give a problem anymore. But a
little strange that something like this can wreck havoc on emacs. :-[
My problems are not solved yet, because somewhere else something
happens that has the same result. I have something to do. It looks
like it is not easy to write code that can be accepted by all Common
Lisps.
> But if you're using the latest slime (check with M-x
> slime-changelog-date) I'd be interested to see the backtrace while still
> entering your erroneous filename with ~.
I am for sure not using the latest slime. And slime-changelog-date
gives nil. But if I install the latest, would you still like to see
the backtrace?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Cecil Westerhof <Cecil@...> writes:
> Op donderdag 29 jul 2010 17:01 CEST schreef Stas Boukarev:
>
>>> I have the following 'code':
>>> (with-open-file (in "~/recepten.db")
>>> (read in))
>>>
>>> This looks like it should work, but when I execute this, I get:
>>> error in process filter: Wrong type argument: characterp, nil
>>>
>>> What is happening here? In clisp this code worked.
>>> I am using:
>>> GNU Emacs 23.1.1
>>> SBCL 1.0.40
>> First, SBCL doesn't understand ~, so you need
>> (merge-pathnames "reception.db" (user-homedir-pathname))
>
> That was the problem. This does not give a problem anymore. But a
> little strange that something like this can wreck havoc on emacs. :-[
>
> My problems are not solved yet, because somewhere else something
> happens that has the same result. I have something to do. It looks
> like it is not easy to write code that can be accepted by all Common
> Lisps.
It's easy if you're using the standard as a guidance.
>> But if you're using the latest slime (check with M-x
>> slime-changelog-date) I'd be interested to see the backtrace while still
>> entering your erroneous filename with ~.
>
> I am for sure not using the latest slime. And slime-changelog-date
> gives nil. But if I install the latest, would you still like to see
> the backtrace?
Yes, and install Slime from CVS.
--
With Best Regards, Stas.

Op donderdag 29 jul 2010 17:42 CEST schreef Pascal J. Bourguignon:
>>> This is an emacs error.
>>>
>>> M-: (require 'cl) RET
>>> M-: (setf debug-on-error t) RET
>>>
>>> and try it again to fall in the emacs debugger and see where it
>>> comes from...
>>
>> Quit interesting. It is so severe that emacs can not display the debug
>> buffer. I get:
>> Entering debugger...
>> define-key: Wrong type argument: characterp, nil
>> Error in post-command-hook: (wrong-type-argument characterp nil)
>
> Which is not surprizing since it's in the post-command-hook.
> I thought however that erronous hooks were removed automatically...
>
> Check functions in post-command-hook. (Notice that it's often a
> buffer-local variable, so you should check it in the problematic
> buffer).
It is nil. So that is not the problem I think. It looks like it was an
error with the code. Sbcl does not understand ~ in a filename. After
changing that, emacs does not have a problem with this code. It does
have a problem somewhere else. So I keep debugging.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Op donderdag 29 jul 2010 17:42 CEST schreef Pascal J. Bourguignon:
> Which is not surprizing since it's in the post-command-hook.
> I thought however that erronous hooks were removed automatically...
>
> Check functions in post-command-hook. (Notice that it's often a
> buffer-local variable, so you should check it in the problematic
> buffer).
It is nil after the error, before it is:
(slime-post-command-hook t autopair-post-command-handler)
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof