From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: LINKOV.NET Message-ID: <87d0tw96l7.fsf@mail.linkov.net> References: <84223559-4256-4BC9-A603-4D6C11A8EF06@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535842839 11387 195.159.176.226 (1 Sep 2018 23:00:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Sep 2018 23:00:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32543@debbugs.gnu.org, tino.calancha@gmail.com To: Andrey Kolomoets Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 02 01:00:34 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwEsc-0002sF-4H for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Sep 2018 01:00:34 +0200 Original-Received: from localhost ([::1]:38713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwEui-0000Il-9q for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Sep 2018 19:02:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwEuU-0007OY-Lz for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 19:02:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwEjO-0002gZ-FQ for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 18:51:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37195) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwEjO-0002gS-AI for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 18:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fwEjO-00025b-2u for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 18:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Sep 2018 22:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32543 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32543-submit@debbugs.gnu.org id=B32543.15358422207983 (code B ref 32543); Sat, 01 Sep 2018 22:51:02 +0000 Original-Received: (at 32543) by debbugs.gnu.org; 1 Sep 2018 22:50:20 +0000 Original-Received: from localhost ([127.0.0.1]:42213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwEii-00024g-BI for submit@debbugs.gnu.org; Sat, 01 Sep 2018 18:50:20 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:53020 helo=pdx1-sub0-mail-a39.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwEig-00024Y-0a for 32543@debbugs.gnu.org; Sat, 01 Sep 2018 18:50:18 -0400 Original-Received: from pdx1-sub0-mail-a39.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a39.g.dreamhost.com (Postfix) with ESMTP id 086C67FA7F; Sat, 1 Sep 2018 15:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=iqpJUBOX1zL3jyCPiOn6iHgMJSg=; b= sHD+7vi/U4iF/IlbkBW6nHZVP8seCd/pwX8LuIhPmTNq+b5oEssaoRL5ifhcVcC2 EW1W6JlngSEaLNPp9EquSbgS5VouZY2Aa+M1K2ByPP8mrMaf5Xp9Blut83dA6b/p NgHEvVfudcpD4TSfXXy6cn8wpFyABYXFXWGdgtYJLtQ= Original-Received: from localhost.linkov.net (m91-129-101-104.cust.tele2.ee [91.129.101.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a39.g.dreamhost.com (Postfix) with ESMTPSA id 1384E7FA7C; Sat, 1 Sep 2018 15:50:14 -0700 (PDT) In-Reply-To: <84223559-4256-4BC9-A603-4D6C11A8EF06@gmail.com> (Andrey Kolomoets's message of "Mon, 27 Aug 2018 14:49:41 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149954 Archived-At: > 0. emacs -Q > 1. M-: (setq list-matching-lines-jump-to-current-line t) > 2. M-s o text > 3. C-x o > 4. g > > (wrong-type-argument number-or-marker-p nil) > occur-engine("text" (#) # 0 t underline shadow match t) > occur-1("text" nil (#) "*Occur*") > apply(occur-1 ("text" nil (#) "*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).