From: "Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 59497@debbugs.gnu.org
Subject: 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 01:51:52 +0100 [thread overview]
Message-ID: <m1o7sya3x3.fsf@yahoo.es> (raw)
In-Reply-To: <m1zgcia4kq.fsf@yahoo.es> ("Daniel Martín via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\""'s message of "Wed, 23 Nov 2022 01:37:41 +0100")
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)
next prev parent reply other threads:[~2022-11-23 0:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m1zgcia4kq.fsf.ref@yahoo.es>
2022-11-23 0:37 ` bug#59497: 29.0.50; Wrong type argument: number-or-marker-p, nil when enabling Tree Sitter in empty buffer Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23 0:51 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-11-23 1:33 ` Yuan Fu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1o7sya3x3.fsf@yahoo.es \
--to=bug-gnu-emacs@gnu.org \
--cc=59497@debbugs.gnu.org \
--cc=mardani29@yahoo.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).