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: Wed, 20 Nov 2024 22:06:52 +0800
Message-ID: <037e3f70-75cf-4ccc-b450-74b1cd0f6aad@gmail.com>
References: <9e9fcc46-e6ca-42e6-bb0e-6770ae65f150@gmail.com>
 <87h683jdsr.fsf@mail.linkov.net>
 <23466bfc-9ec0-498d-a39a-5e2d5749808a@gmail.com>
 <87o72a2x6p.fsf@mail.linkov.net>
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------pEJFq9SuONL20cmxLo7JlT2N"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="33326"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Mozilla Thunderbird
Cc: 74412@debbugs.gnu.org
To: Juri Linkov <juri@linkov.net>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 20 15:08:23 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 1tDlNX-0008V9-6n
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Nov 2024 15:08:23 +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 1tDlND-0006Sr-QV; Wed, 20 Nov 2024 09:08:03 -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 1tDlNC-0006SP-6w
 for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 09:08:02 -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 1tDlNB-0006X4-Ux
 for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 09:08:01 -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=E/Gx+csw1gH0D0wx7czfCX5USacUK5D2U5OCeygVsqU=; 
 b=aL917GvXVoZwYalAlUAm6/hzjYyI4cAWmJFGTQF0UsEBsT1fqO4mSFqg9KvgX8NnVp91vkHM7OaEKvp7q/f9Yif4yzuP9iZFCkLWlHTvGJjDmGS0v2j3iSgpOe9WNZ0+DeN2mjxoAv+uhlFxEiYEhfMv9ADuWGTqY+OVVVRkDkRLcMez8YUWGiYVhoDTZ9eqghPgU6jlqfVJg//AJKOuIwSaSfM9Ty0LDc7YGSjhO5Pa5czOAQGtze0R1nurWpQbHAOekit7qNi4Ina4UBEDJEKuTFuYwqEfFFfN5G0HB+wzDmR8aTbXv8ZIvU9ZSV9cw7qel5N9DTM1KWU/bP3mog==;
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tDlNB-0005zm-Nq
 for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 09:08:01 -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: Wed, 20 Nov 2024 14:08:01 +0000
Resent-Message-ID: <handler.74412.B74412.173211168023037@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.173211168023037
 (code B ref 74412); Wed, 20 Nov 2024 14:08:01 +0000
Original-Received: (at 74412) by debbugs.gnu.org; 20 Nov 2024 14:08:00 +0000
Original-Received: from localhost ([127.0.0.1]:45871 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tDlN9-0005zU-DK
 for submit@debbugs.gnu.org; Wed, 20 Nov 2024 09:07:59 -0500
Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:56375)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liaotx2@gmail.com>) id 1tDlN7-0005zK-40
 for 74412@debbugs.gnu.org; Wed, 20 Nov 2024 09:07:57 -0500
Original-Received: by mail-wr1-f43.google.com with SMTP id
 ffacd0b85a97d-38248b810ffso1481830f8f.0
 for <74412@debbugs.gnu.org>; Wed, 20 Nov 2024 06:07:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1732111616; x=1732716416; 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=E/Gx+csw1gH0D0wx7czfCX5USacUK5D2U5OCeygVsqU=;
 b=cy0f45upuL/QZzypsqqJBcstbUvUHP88JOikMVTlHKvRPuQiJ36ynNSvA2nx+3UqmJ
 RYO9Zdgyez6wEV2ElE+GJsA0FcwINctBeSbyK7ZaQq5vvnAwSzYd5nxXcDD6/UU5eAKG
 vWtFML7qeVS1GBHgO13Wu0cREcNL0md/ch9rwiKav8y17uha5GVH/aa3zy2wmz4cL9wD
 Dfhsx2sY0B4rAq0wtKtTyxZ9xq4DDWLrQJR0j+d1Xv6thf2GurteUW+KLJCS1rM/coig
 TyDCtj4FlxbtBEvvuVTr8X9HwcH5w7WlfbBC1PEBNKTzP98kFbkjzidsWN2PQrIkl86g
 4Rxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1732111616; x=1732716416;
 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=E/Gx+csw1gH0D0wx7czfCX5USacUK5D2U5OCeygVsqU=;
 b=Ycdf+AlWj1oBctvtwxTkhqk+ZTEK9VMpokjVfXOluTO3Lcfsz+Rjlt8RwAjy7hByTj
 OxQL/r836d/6pqvDr9KAa5PbYdlG9Bpu4LIjqF1dMAFzf/ljbCjaZ9k+2+E8W5KySFCM
 TKjp1OXvR689FopuBRgmONO2LbfL/mo5CWRalA0cUMkAwP+Yuvk1i3q2fviwRIHH0ltS
 vhphP0+LIoXW6NWA3r+aGlXTvG7fHkB/5jTsnQRNhgFqbeEzm4OciBF7MrsDLtLEpsmJ
 GXRuNJun71y2uruIGuj+HZ4+5vJmT2k7VPgV8tBqUpBJ436OYkBumt0H6Gs4e182QrSo
 n33A==
X-Gm-Message-State: AOJu0Yzdw2AGia2xgO/Hx7Vwzrk6VxxZ9BFYw3JBpbX/hpbyfooHJOvs
 /We0puWlboU9euhbMygrHn0ErTvTUX6TZ3ydM0UYY7OEb/e4VSI5ROLiJmC3
X-Google-Smtp-Source: AGHT+IG5M7WMvkwYfS+6dRovqqUPAM8g5Zwq3cHrVOdle7qYomLBtIuj+0e78hjgwpGAvT1uhfPy+w==
X-Received: by 2002:a5d:47a6:0:b0:382:4e57:48e7 with SMTP id
 ffacd0b85a97d-38254ade9b9mr2419197f8f.10.1732111615982; 
 Wed, 20 Nov 2024 06:06:55 -0800 (PST)
Original-Received: from [198.18.0.1] ([185.217.110.129])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3825493e7d2sm2248519f8f.86.2024.11.20.06.06.54
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 20 Nov 2024 06:06:55 -0800 (PST)
In-Reply-To: <87o72a2x6p.fsf@mail.linkov.net>
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:295678
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/295678>

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

OK I just find the java-ts-mode and treesit.el is not from `straight'... 
So the start script now only load `outli'.


I tried clone `outli' into `~/src/outli', and it works fine, while the 
straight build version is not.


I diffed the `~/.emacs.d/straight/build/outli/outli.el' with 
`~/src/outli/outli.el' and found that they are same. But there is a

file `outli-autoloads.el' in `~/.emacs.d/straight/build/outli', which be 
generated by `straight'. This file contains:

```elisp

(autoload 'outli-mode "outli" "\ Simple outline mode interaction based 
on comment-headings. This is a minor mode. If called interactively, 
toggle the `Outli mode' mode. If the prefix argument is positive, enable 
the mode, and if it is zero or negative, disable the mode. If called 
from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is 
nil, omitted, or is a positive number. Disable the mode if ARG is a 
negative number. To check whether the minor mode is enabled in the 
current buffer, evaluate the variable `outli-mode'. The mode's hook is 
called both when the mode is enabled and when it is disabled. 
\\{outli-mode-map} (fn &optional ARG)" t) (register-definition-prefixes 
"outli" '("outli-"))

```

I commented the line `(register-definition-prefixes "outli" 
'("outli-"))', and load `~/.emacs.d/straight/build/outli/outli.el',

and the `revert-buffer' works.

在 2024/11/20 15:15, Juri Linkov 写道:
>> I'm using `straight' so I start the emacs as
>>
>> ```sh
>>
>> /Applications/Emacs.app/Contents/MacOS/Emacs -q --eval "(progn
>>            (add-to-list 'load-path
>> \"~/.emacs.d/straight/build/java-ts-mode\")
> Where do you get straight's version of java-ts-mode?
>
> Does it differ from lisp/progmodes/java-ts-mode.el
> provided by Emacs core?
>
> Do you use treesit.el from `straight' too?
>
>>            (add-to-list 'load-path \"~/.emacs.d/straight/build/outli\")
>>            (require 'java-ts-mode)
>>            (require 'outli))"
>>
>> ```
>>
>> The file I tried is
>>
>> ```java
>>
>> public class Test {
>>      public static void main(String[] args) {
>>
>>      }
>> }
>>
>> ```
>>
>> You might need to enable the outli-mode in the java file manually.
> I tried this with lisp/progmodes/java-ts-mode.el,
> and can't reproduce the bug.
>
>> It seems this bug only appears in gui emacs. The `revert-buffer' works
>> fine in tui.
> Very strange, there should be no difference between gui and tui.
--------------pEJFq9SuONL20cmxLo7JlT2N
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>OK I just find the java-ts-mode and treesit.el is not from
      `straight'... So the start script now only load `outli'.</p>
    <p><br>
    </p>
    <p>I tried clone `outli' into `~/src/outli', and it works fine,
      while the straight build version is not.</p>
    <p><br>
    </p>
    <p>I diffed the `<span style="white-space: pre-wrap">~/.emacs.d/straight/build/outli/outli.el' with `~/src/outli/outli.el' and found that they are same. But there is a</span></p>
    <p><span style="white-space: pre-wrap">file `outli-autoloads.el' in </span>`<span
      style="white-space: pre-wrap">~/.emacs.d/straight/build/outli', which be generated by `straight'. This file contains:</span></p>
    <p><span style="white-space: pre-wrap">```elisp</span></p>
    <p><span style="white-space: pre-wrap">(autoload 'outli-mode "outli" "\
Simple outline mode interaction based on comment-headings.

This is a minor mode.  If called interactively, toggle the `Outli mode'
mode.  If the prefix argument is positive, enable the mode, and if it is
zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is `toggle'.  Enable the
mode if ARG is nil, omitted, or is a positive number.  Disable the mode
if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer,
evaluate the variable `outli-mode'.

The mode's hook is called both when the mode is enabled and when it is
disabled.

\\{outli-mode-map}

(fn &amp;optional ARG)" t)
(register-definition-prefixes "outli" '("outli-"))
</span></p>
    <p><span style="white-space: pre-wrap">```
</span></p>
    <p><span style="white-space: pre-wrap">I commented the line `(register-definition-prefixes "outli" '("outli-"))', and load </span>`<span
      style="white-space: pre-wrap">~/.emacs.d/straight/build/outli/outli.el',</span></p>
    <p><span style="white-space: pre-wrap">and the `revert-buffer' works.
</span></p>
    <div class="moz-cite-prefix">在 2024/11/20 15:15, Juri Linkov 写道:<br>
    </div>
    <blockquote type="cite" cite="mid:87o72a2x6p.fsf@mail.linkov.net">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">I'm using `straight' so I start the emacs as

```sh

/Applications/Emacs.app/Contents/MacOS/Emacs -q --eval "(progn
          (add-to-list 'load-path
\"~/.emacs.d/straight/build/java-ts-mode\")
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Where do you get straight's version of java-ts-mode?

Does it differ from lisp/progmodes/java-ts-mode.el
provided by Emacs core?

Do you use treesit.el from `straight' too?

</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">          (add-to-list 'load-path \"~/.emacs.d/straight/build/outli\")
          (require 'java-ts-mode)
          (require 'outli))"

```

The file I tried is

```java

public class Test {
    public static void main(String[] args) {

    }
}

```

You might need to enable the outli-mode in the java file manually.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
I tried this with lisp/progmodes/java-ts-mode.el,
and can't reproduce the bug.

</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">It seems this bug only appears in gui emacs. The `revert-buffer' works
fine in tui.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Very strange, there should be no difference between gui and tui.
</pre>
    </blockquote>
  </body>
</html>

--------------pEJFq9SuONL20cmxLo7JlT2N--