Subject: 26.1; list-matching-lines-jump-to-current breaks revert-buffer in occur-mode
From: Andrey Kolomoets <[email-masked]>
To: [email-masked]
Date: Mon, 27 Aug 2018 14:49:41 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

0. emacs -Q
1. M-: (setq list-matching-lines-jump-to-current-line t) <RET>
2. M-s o text <RET>
3. C-x o
4. g

(wrong-type-argument number-or-marker-p nil)
  occur-engine("text" (#<buffer *scratch*>) #<buffer *Occur*> 0 t underline shadow match t)
  occur-1("text" nil (#<buffer *scratch*>) "*Occur*")
  apply(occur-1 ("text" nil (#<buffer *scratch*>) "*Occur*"))
  occur-revert-function(t nil)
  revert-buffer(t)
  funcall-interactively(revert-buffer t)
  call-interactively(revert-buffer nil nil)
  command-execute(revert-buffer)

I think it's because occur--orig-line not initialized in occur-revert-function and it fails on

(when (and list-matching-lines-jump-to-current-line
 (null orig-line-shown-p)
 (> curr-line orig-line))

In GNU Emacs 26.1 and still in 27.0.50