From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Taka Obsid <liaotx2@gmail.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#74412: 31.0.50; Treesit-outline conflict with outli in Emacs 31
Date: Tue, 19 Nov 2024 09:47:34 +0800
Message-ID: <7a42b50d-39f1-4628-a1d6-eb036946ee8a@gmail.com>
References: <9e9fcc46-e6ca-42e6-bb0e-6770ae65f150@gmail.com>
 <86h684vi6l.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------rcHVY0xVwfq0xLn9zyfNeXLj"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="39274"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Mozilla Thunderbird
Cc: 74412@debbugs.gnu.org
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 19 02:49:24 2024
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1tDDMn-0009z5-FE
	for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Nov 2024 02:49:21 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1tDDMa-0003ET-0k; Mon, 18 Nov 2024 20:49:08 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tDDMV-0003EC-Hd
 for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 20:49:04 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tDDMU-0006xS-DA
 for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 20:49:02 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=debbugs.gnu.org; s=debbugs-gnu-org; 
 h=In-Reply-To:From:References:MIME-Version:Date:To:Subject;
 bh=GDkHuxI/vv/ei8KWTLa3cwlfgiF2gL06A9KlSa1Qj8k=; 
 b=s0suD4T+UOir8pDlRYtIeI+VQ1USw8sQpWewQwrjqKK5LMbcH2K9MicJDUwgXNdptUwOMLTmaflvdEyy5X2+DTNV1pOmiQRVZSq4uj4nca84MyNc8C2P2/ZX9I4dV58u8fGmECdkBHE1Teo7aKiwz4N9mGfn/nrGEETKDUFbtWzqe+BJY5aPslUR04BRAJi6gFmyIYdl9Wz8C3eL9o60dVJrtTg8TJUL4iwFrE6qq2nkS07ZDlqO+CsUeFN1Z5PG/K/GvJdqDje6kztJj7srXnYoHNONZtJYBz4hGlpcCrvijumPEJ3oOUbDOs0/OYAVGJyU6AE0szHxz4ox439VoA==;
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tDDMU-0007KV-0b
 for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 20:49:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Taka Obsid <liaotx2@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Tue, 19 Nov 2024 01:49:01 +0000
Resent-Message-ID: <handler.74412.B74412.173198092328139@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 74412
X-GNU-PR-Package: emacs
Original-Received: via spool by 74412-submit@debbugs.gnu.org id=B74412.173198092328139
 (code B ref 74412); Tue, 19 Nov 2024 01:49:01 +0000
Original-Received: (at 74412) by debbugs.gnu.org; 19 Nov 2024 01:48:43 +0000
Original-Received: from localhost ([127.0.0.1]:39882 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tDDMA-0007Jm-GO
 for submit@debbugs.gnu.org; Mon, 18 Nov 2024 20:48:42 -0500
Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:60567)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liaotx2@gmail.com>) id 1tDDM7-0007Jd-IZ
 for 74412@debbugs.gnu.org; Mon, 18 Nov 2024 20:48:40 -0500
Original-Received: by mail-wm1-f47.google.com with SMTP id
 5b1f17b1804b1-4315df7b43fso3286625e9.0
 for <74412@debbugs.gnu.org>; Mon, 18 Nov 2024 17:48:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1731980859; x=1732585659; darn=debbugs.gnu.org;
 h=in-reply-to:from:references:cc:to:subject:user-agent:mime-version
 :date:message-id:from:to:cc:subject:date:message-id:reply-to;
 bh=GDkHuxI/vv/ei8KWTLa3cwlfgiF2gL06A9KlSa1Qj8k=;
 b=VjiGOruwzy0/XNoXVOHRDqgH3/zaPXvX2yVBGH9r4cMgT04Zdt85a3kuBbuAALo58C
 nk2aJoQuPTSeBu07wrp0L/YrZmG3SAK8mm6BW0uM2zuj8K0h59i+NIqQqHO4A5sA2+16
 1Wk8VfSV7N2VaAUYKHTfwFwa0inASPodclBcq4ESM2xsWJXuprRvhoy8AdNKhHNY6PNH
 XFrFCrliTzIrjTAMJpiWQcq74jxo4ksmNatpL46LhYwmiekwL2EI4UiWZev7k2EGrVV1
 TfdmGcgc7Cp8AgIkuttCAzEMaO0WQbs4vNqMz9tEl/p+fJXkVyO2+4KcY4t6uZAXapGJ
 Ud5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1731980859; x=1732585659;
 h=in-reply-to:from:references:cc:to:subject:user-agent:mime-version
 :date:message-id:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=GDkHuxI/vv/ei8KWTLa3cwlfgiF2gL06A9KlSa1Qj8k=;
 b=T4N9A7ZfmK+eW0nmSWcItKfpAlURfUZSI1UCQ0rlWP29+AkapV2WyCBbWBbL8K9qcl
 hvvCyJTyixAodbm4nrr+L9ZWlhihEj91fr3sBynSkfQPAlwZKOHXFmcjFlfctOE1TqTK
 ob618KDkMrJZR1E8IpGps14S+Bd9zdq3UJZJsIX6jjQufvcAUfN3FG7aNHFF/pvdezhS
 rq931JoJaD3/FOj3mmoDFIbNnN6zJAtg1R69Nd52kNvc6Y2H44p16it5RQp1eUvGqJTz
 LZFCUlIRftWpXkojCOCBdwnOEuJwbfpfUMXlRek81in7RvAOFEdtAQcvSmXuZRoeO1nA
 ZFLA==
X-Gm-Message-State: AOJu0YynVrtUsHay68AeIl+RsNpSBy/z/ejZrB3tyZhLxZFrOX8Bu2HY
 YKfi976y+WsRcU0g9F7Ts6vM6Q4qGAEhFNbAlLLuSU7YGr2+ycxR
X-Google-Smtp-Source: AGHT+IED6XQ2g6PtA978e84neW6WoccdoFsiCLGS2M+hkLKEIWeGxrMb9gSmRAOhRKvbjOqRPU7H3A==
X-Received: by 2002:a05:600c:46c3:b0:431:40ca:ce44 with SMTP id
 5b1f17b1804b1-432df7906e3mr131255465e9.30.1731980858575; 
 Mon, 18 Nov 2024 17:47:38 -0800 (PST)
Original-Received: from [198.18.0.1] ([185.217.110.129])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3823a0e8f26sm8073919f8f.31.2024.11.18.17.47.36
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 18 Nov 2024 17:47:37 -0800 (PST)
In-Reply-To: <86h684vi6l.fsf@gnu.org>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.bugs:295621
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/295621>

This is a multi-part message in MIME format.
--------------rcHVY0xVwfq0xLn9zyfNeXLj
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Yes, I have reported it in https://github.com/jdtsmith/outli/issues/17 
and the developer
recommended me to file this bug report. This is what he said:

 > This seems to be a new conflict with Emacs 31, and potentially a 
problem with |treesit-outline|.
 > Can you please file an Emacs bug report and link it here?

在 2024/11/18 20:29, Eli Zaretskii 写道:
>> Date: Mon, 18 Nov 2024 10:59:00 +0800
>> From: Taka Obsid<liaotx2@gmail.com>
>>
>> Hi, I'm using `java-ts-mode' andhttps://github.com/jdtsmith/outli.
>>
>> While I tried to `revert-buffer' in a java file, it reports
>> `outline-map-region: Wrong type argument: number-or-marker-p, nil'.
>>
>> The backtrace is:
>>
>> ```bt
>> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>> #f(compiled-function () #<bytecode -0x1964e0de811a96ab>)()
>> outline-map-region(#f(compiled-function () #<bytecode
>> -0x1964e0de811a96ab>) 1 31382)
>> outline--hidden-headings-paths()
>> outline-revert-buffer-restore-visibility()
>> #f(compiled-function (f) #<bytecode
>> 0x6badcbe8273644b>)(outline-revert-buffer-restore-visibility)
>> run-hook-wrapped(#f(compiled-function (f) #<bytecode 0x6badcbe8273644b>)
>> outline-revert-buffer-restore-visibility)
>> revert-buffer(t)
>> funcall-interactively(revert-buffer t)
>> call-interactively(revert-buffer record nil)
>> command-execute(revert-buffer record)
>> execute-extended-command(nil "revert-buffer" "rev")
>> funcall-interactively(execute-extended-command nil "revert-buffer" "rev")
>> call-interactively(execute-extended-command nil nil)
>> command-execute(execute-extended-command)
>> ```
>>
>> To repreduce it:
>>
>> 1. start Emacs with `java-ts-mode' and `outli' installed;
>>
>> 2. go to a java file;
>>
>> 3. `M-x outli-mode';
>>
>> 4. `M-x revert-buffer'.
>>
>> The `outline-search-function' is `#'treesit-outline-search' and while I
>> set it to `nil', I can successfully revert the buffer.
>>
>>
>> ```
>> emacs -q --eval "(progn
>> (add-to-list 'load-path \"/path/to/java-ts-mode/\")
>> (add-to-list 'load-path \"/path/to/outli/\")
>> (require 'java-ts-mode)
>> (require 'outli))"
>> ```
> Thanks, this seems to be a problem in the outli package?  Because the
> error is signaled by one of its functions (a hook it places on
> revert-buffer-function, I guess?).
>
> Did you report this to the developer of outli?  If not, I suggest to
> report it there first.
--------------rcHVY0xVwfq0xLn9zyfNeXLj
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Yes, I have reported it in <a class="moz-txt-link-freetext"
        href="https://github.com/jdtsmith/outli/issues/17">https://github.com/jdtsmith/outli/issues/17</a>
      and the developer<br>
      recommended me to file this bug report. This is what he said:</p>
    <p>&gt; This seems to be a new conflict with Emacs 31, and
      potentially a problem with <code class="notranslate">treesit-outline</code>.
      <br>
      &gt; Can you please file an Emacs bug report and link it here?</p>
    <p></p>
    <div class="moz-cite-prefix">在 2024/11/18 20:29, Eli Zaretskii 写道:<br>
    </div>
    <blockquote type="cite" cite="mid:86h684vi6l.fsf@gnu.org">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">Date: Mon, 18 Nov 2024 10:59:00 +0800
From: Taka Obsid <a class="moz-txt-link-rfc2396E" href="mailto:liaotx2@gmail.com">&lt;liaotx2@gmail.com&gt;</a>

Hi, I'm using `java-ts-mode' and <a class="moz-txt-link-freetext" href="https://github.com/jdtsmith/outli">https://github.com/jdtsmith/outli</a>.

While I tried to `revert-buffer' in a java file, it reports
`outline-map-region: Wrong type argument: number-or-marker-p, nil'.

The backtrace is:

```bt
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
#f(compiled-function () #&lt;bytecode -0x1964e0de811a96ab&gt;)()
outline-map-region(#f(compiled-function () #&lt;bytecode 
-0x1964e0de811a96ab&gt;) 1 31382)
outline--hidden-headings-paths()
outline-revert-buffer-restore-visibility()
#f(compiled-function (f) #&lt;bytecode 
0x6badcbe8273644b&gt;)(outline-revert-buffer-restore-visibility)
run-hook-wrapped(#f(compiled-function (f) #&lt;bytecode 0x6badcbe8273644b&gt;) 
outline-revert-buffer-restore-visibility)
revert-buffer(t)
funcall-interactively(revert-buffer t)
call-interactively(revert-buffer record nil)
command-execute(revert-buffer record)
execute-extended-command(nil "revert-buffer" "rev")
funcall-interactively(execute-extended-command nil "revert-buffer" "rev")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
```

To repreduce it:

1. start Emacs with `java-ts-mode' and `outli' installed;

2. go to a java file;

3. `M-x outli-mode';

4. `M-x revert-buffer'.

The `outline-search-function' is `#'treesit-outline-search' and while I
set it to `nil', I can successfully revert the buffer.


```
emacs -q --eval "(progn
(add-to-list 'load-path \"/path/to/java-ts-mode/\")
(add-to-list 'load-path \"/path/to/outli/\")
(require 'java-ts-mode)
(require 'outli))"
```
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Thanks, this seems to be a problem in the outli package?  Because the
error is signaled by one of its functions (a hook it places on
revert-buffer-function, I guess?).

Did you report this to the developer of outli?  If not, I suggest to
report it there first.
</pre>
    </blockquote>
  </body>
</html>

--------------rcHVY0xVwfq0xLn9zyfNeXLj--