Subject: Re: bug#74412: 31.0.50; Treesit-outline conflict with outli in Emacs 31

From: Juri Linkov <[email-masked]>
Date: Wed, 20 Nov 2024 20:23:46 +0200

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

Ok, I looked more at the package outli, and now can reproduce the issue,
I get the same backtrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  #f(compiled-function () #<bytecode -0x19404f988c6a0bab>)()
  outline-map-region(#f(compiled-function () #<bytecode -0x19404f988c6a0bab>) 1 75)
  outline--hidden-headings-paths()
  outline-revert-buffer-restore-visibility()
  #f(compiled-function (f) #<bytecode 0x1cc541c8fdc4ae5e>)(outline-revert-buffer-restore-visibility)
  revert-buffer(t t)
  revert-buffer-quick(nil)
  funcall-interactively(revert-buffer-quick nil)
  command-execute(revert-buffer-quick)

This error comes after I removed the line

  outline-search-function nil

from `outli-mode'.  Please note that this line was added
quite recently in this commit:

https://github.com/jdtsmith/outli/commit/1366c230421aa834a9f4c986e31e63aa54e1c70b

So I'm 100% sure that you are using an old straight version from
(add-to-list 'load-path \"~/.emacs.d/straight/build/outli\")

Please upgrade the outli straight package to resolve the problem.