[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: improving debug output of get-buffer
|
From: |
StrawberryTea |
|
Subject: |
Re: improving debug output of get-buffer |
|
Date: |
Wed, 01 Nov 2023 15:02:48 -0500 |
|
User-agent: |
mu4e 1.10.7; emacs 30.0.50 |
That makes sense. But basically, we were using with-current-buffer, which uses
set-buffer and it took time to realize the “(wrong-type-argument stringp nil)”
error was from that with-current-buffer.
Eli Zaretskii <eliz@gnu.org> writes:
>> From: StrawberryTea <look@strawberrytea.xyz>
>> Date: Wed, 01 Nov 2023 13:06:16 -0500
>>
>> Following our PR discussion in
>> <https://github.com/akreisher/eshell-syntax-highlighting/pull/15>
>
> Please in the future post the main points of the discussions here.
> Some of us don’t like (or cannot) accessing GitHub.
>
>> I was wondering if anyone thinks it’s a good idea to modify the
>> get-buffer C code so that it returns an error like
>> “(wrong-type-argument string-or-buffer-p nil)” instead of
>> “(wrong-type-argument stringp nil)”.
>
> IMO, “wrong-type-argument string-or-buffer-p” is not much better than
> what we have now.
>
> The reason why we signal “wrong-type-argument stringp”
> is that the argument is almost always a string, because calling the
> function with a buffer as an argument is not useful.