GNU bug report logs - #59497
29.0.50; Wrong type argument: number-or-marker-p, nil when enabling Tree Sitter in empty buffer

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Wed, 23 Nov 2022 00:39:02 UTC

Severity: normal

Found in version 29.0.50

Done: Yuan Fu <yuf011 <at> ucsd.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Daniel Martín <mardani29 <at> yahoo.es>
Subject: bug#59497: closed (Re: bug#59497: 29.0.50; Wrong type argument:
 number-or-marker-p,  nil when enabling Tree Sitter in empty buffer)
Date: Wed, 23 Nov 2022 08:29:05 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#59497: 29.0.50; Wrong type argument: number-or-marker-p, nil when enabling Tree Sitter in empty buffer

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 59497 <at> debbugs.gnu.org.

-- 
59497: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59497
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Yuan Fu <yuf011 <at> ucsd.edu>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 59497-done <at> debbugs.gnu.org
Subject: Re: 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 <at> yahoo.es> writes:

> Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> 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

[Message part 3 (message/rfc822, inline)]
From: Daniel Martín <mardani29 <at> yahoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Wrong type argument: number-or-marker-p, nil when enabling
 Tree Sitter in empty buffer
Date: Wed, 23 Nov 2022 01:37:41 +0100
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.



This bug report was last modified 2 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.