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 11:34:17 +0800
Message-ID: <23466bfc-9ec0-498d-a39a-5e2d5749808a@gmail.com>
References: <9e9fcc46-e6ca-42e6-bb0e-6770ae65f150@gmail.com>
 <87h683jdsr.fsf@mail.linkov.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="4852"; 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 04:36:17 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 1tDbVn-00015q-MR
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Nov 2024 04:36:15 +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 1tDbVd-0001su-1w; Tue, 19 Nov 2024 22:36:05 -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 1tDbVa-0001sQ-V1
 for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 22:36: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 1tDbVa-0000Rl-M1
 for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 22:36: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=XlryavT/hLrPIVgaFpAxuKyU6guINFknsmEgQ+8uFBY=; 
 b=FqQMxxu0KfAecJIV49jjjUtbU4XePxkpItUH0ZnpT3uaEOI/1svsHf84AA1fcpCXwAjTW92/YoVxiXUglZAEcVz+acq7SRNEn//KcCdgeW4INDliForRYsIZyTaA/vQ9/q8/8erO6s84VHWTPlKA4xfxSgxJE98426CxilbZufngz4oA8s/TS5bkeAx6ea7oqVKoeRW9F8dMjKIMaD+1seBessKJ7X3p/oQBxxu7arMxBuGnIHOjz1nO1jch3l/STQu4LgaXWIcjH6ujS1EziXr/I055xEprMzCjYEDUfAk64B9V3l8SqtaWrW/1GwtvHs9M/iWFUeX0+Wz2kz2Azw==;
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tDbVZ-0001mA-OM
 for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 22:36: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 03:36:01 +0000
Resent-Message-ID: <handler.74412.B74412.17320737366783@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.17320737366783
 (code B ref 74412); Wed, 20 Nov 2024 03:36:01 +0000
Original-Received: (at 74412) by debbugs.gnu.org; 20 Nov 2024 03:35:36 +0000
Original-Received: from localhost ([127.0.0.1]:44753 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tDbV5-0001lB-He
 for submit@debbugs.gnu.org; Tue, 19 Nov 2024 22:35:36 -0500
Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:42129)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liaotx2@gmail.com>) id 1tDbV2-0001kv-IK
 for 74412@debbugs.gnu.org; Tue, 19 Nov 2024 22:35:29 -0500
Original-Received: by mail-wm1-f51.google.com with SMTP id
 5b1f17b1804b1-431616c23b5so2299155e9.0
 for <74412@debbugs.gnu.org>; Tue, 19 Nov 2024 19:35:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1732073663; x=1732678463; darn=debbugs.gnu.org;
 h=content-transfer-encoding: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=XlryavT/hLrPIVgaFpAxuKyU6guINFknsmEgQ+8uFBY=;
 b=Da0mpR+TTszwQYW8k9rOPPdWBA6WeG/mp2GYYULGA7+sBvumid3g+YsJ9IZqZE2Vrw
 VssnK8PWNZJAeTGLRwwPWvHYkWsxxXUUtpLE6A8Op0Q/3lnz5xO8yfQI+duxir6Knc8t
 XW+9aYh/ExVpsYyZAflzPbX6b3adwRSjgDP7YwI7W7blRIIh7QWAdiUV68NBuJpth98q
 EOZ03IF9wRZK9buddgHOktkj6U5oAqqcB63hTdSOESfWiOn9Ir68FgA0ippUeMAiRO7N
 CLt3AeNlVLl6JR2pgJqSeaMOJKn/LH+LYUNRsxZ/5Y6NyCgRiOA5yeZGDVp6nINOc0sm
 nrqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1732073663; x=1732678463;
 h=content-transfer-encoding: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=XlryavT/hLrPIVgaFpAxuKyU6guINFknsmEgQ+8uFBY=;
 b=i/r/9RLlw2J/GwHVwkgsCwhOvuyoDnQyZiNvjiuuk7n/uCe21m1Tx0feA7A+Zs0ME/
 Rq87YqYx5X9O5lqDnaZPHdWrKEF/nSLmpG1iH1tLSjvf+UwxD0d0J3GsYujTwphQxGMo
 wCthOkYfcGiofySIbHqqgVAXI1VGVCaYDO9jHiX/VnIon1MyvXNKTOIJuETwhTW+8or9
 +kVhxon40094pHhrxwOzUsilFSsL3ZOgwqZTFgNP8RmPkAVEdO2crYBjAfmXRuSHnK/n
 SDAIOfzpYOZvqF6/XLWptygh9bAePZv092xD9Eu3cHQ+86vT4d/N9SMaU38bgy6NJOGl
 cEQw==
X-Gm-Message-State: AOJu0Yy/ToJtoofjI6sQnlF3zm2ErMyLrax59wjoeyC/bAgLxseO+VWj
 LLVsxnUnRB1wr/61FsfG3XBoYxLAGK3767ijCEpouYZDzzbjXPHgRiV5x2RNFKU=
X-Google-Smtp-Source: AGHT+IEcLDLJeIM8aVNU5huoez9GH2Cq22EHauQhq2QqnxIu4kseL5Z4Tlrw92CqZK4UAYif0Vsdsw==
X-Received: by 2002:a05:600c:1390:b0:42c:b54c:a6d7 with SMTP id
 5b1f17b1804b1-432f57f3456mr47934425e9.14.1732073662578; 
 Tue, 19 Nov 2024 19:34:22 -0800 (PST)
Original-Received: from [198.18.0.1] ([185.217.110.129])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3825490c682sm860431f8f.31.2024.11.19.19.34.19
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 19 Nov 2024 19:34:21 -0800 (PST)
In-Reply-To: <87h683jdsr.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:295663
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/295663>

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\")
           (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. It 
seems this bug only appears in gui emacs. The `revert-buffer' works fine 
in tui.

在 2024/11/20 02:09, Juri Linkov 写道:
>> 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)
> I suspect this depends on your java file since I tried some java files
> existing in the emacs repo, and all they work fine.  Could you try
> to find a minimal java file to reproduce the problem?