GNU bug report logs - #32543
26.1; list-matching-lines-jump-to-current breaks revert-buffer in occur-mode

Previous Next

Package: emacs;

Reported by: Andrey Kolomoets <andreyk.mad <at> gmail.com>

Date: Mon, 27 Aug 2018 14:52:03 UTC

Severity: normal

Found in version 26.1

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Andrey Kolomoets <andreyk.mad <at> gmail.com>
Cc: 32543 <at> debbugs.gnu.org, tino.calancha <at> gmail.com
Subject: bug#32543: 26.1; list-matching-lines-jump-to-current breaks revert-buffer in occur-mode
Date: Sun, 02 Sep 2018 01:49:08 +0300
> 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))

We have two solutions here: on reverting reset the current line number to
the default numeric value of occur--orig-line (e.g. 0), or better to
remember occur--orig-line in occur-revert-arguments.  Maybe Tino has
better ideas (Cc'ed).




This bug report was last modified 6 years and 329 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.