bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#59497: 29.0.50; Wrong type argument: number-or-marker-p, nil when en


From: Yuan Fu
Subject: bug#59497: 29.0.50; Wrong type argument: number-or-marker-p, nil when enabling Tree Sitter in empty buffer
Date: Tue, 22 Nov 2022 17:33:26 -0800

Daniel Martín <mardani29@yahoo.es> writes:

> Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@gnu.org> writes:
>
>> Steps to reproduce:
>>
>> emacs -Q
>> C-x b foo RET
>> M-x python-ts-mode RET
>>
>> Wrong type argument: number-or-marker-p is thrown.
>>
>> The bug seems to be in treesit-ready-p, specifically at:
>>
>> (> (position-bytes (1- (point-max))) treesit-max-buffer-size)
>>
>> This check fails if the buffer is empty.
>
> I think the correct check should be:
>
> (> (1- (position-bytes (point-max))) treesit-max-buffer-size)

Thanks, this should be fixed by c69858b3f0a.

Yuan





reply via email to

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