From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nathan Moreau Newsgroups: gmane.emacs.bugs Subject: bug#27362: Bug #27362: Date: Thu, 26 Oct 2017 23:38:05 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1140e638d3108d055c79fc45" X-Trace: blaine.gmane.org 1509055459 6940 195.159.176.226 (26 Oct 2017 22:04:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2017 22:04:19 +0000 (UTC) To: 27362@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 27 00:04:11 2017 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 1e7qFz-0000rE-Le for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Oct 2017 00:04:07 +0200 Original-Received: from localhost ([::1]:54829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7qG7-0008KW-4R for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 18:04:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7qFz-0008KB-As for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 18:04:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7qFw-0002Ly-78 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 18:04:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55185) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7qFw-0002Lq-3X for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 18:04:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7qFu-0000Ka-2H for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 18:04:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nathan Moreau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Oct 2017 22:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27362 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: 27362@debbugs.gnu.org, bug-gnu-emacs@gnu.org Original-Received: via spool by 27362-submit@debbugs.gnu.org id=B27362.15090554061226 (code B ref 27362); Thu, 26 Oct 2017 22:04:02 +0000 Original-Received: (at 27362) by debbugs.gnu.org; 26 Oct 2017 22:03:26 +0000 Original-Received: from localhost ([127.0.0.1]:35633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7qFK-0000Jh-6h for submit@debbugs.gnu.org; Thu, 26 Oct 2017 18:03:26 -0400 Original-Received: from mail-io0-f178.google.com ([209.85.223.178]:52295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7pqt-00088H-U7 for 27362@debbugs.gnu.org; Thu, 26 Oct 2017 17:38:12 -0400 Original-Received: by mail-io0-f178.google.com with SMTP id f20so8523842ioj.9 for <27362@debbugs.gnu.org>; Thu, 26 Oct 2017 14:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=u0OJqO+BHz5holsODPjL1ndEH4QH3r3/bcakJJHp0iU=; b=ic20xqFcSsr5qeLITA0h2t3fAsiml2SQZF8aOQp5cEqD16O0xXgR/CjzcwV3ls/4X/ NuaEaqMOJnRejkagmvUZQvz7HMj5Qe9Iy6LJr5m/idoKauKUi4M0YzlbvQ6p7WRJS4Vb BFFqkJRmID6g/rhZaA9NnjTmKrX7EHeRDBUcISn3tb2i6TneX4n6nbl5/AgZqjtB0faZ UcTrAo0akDCv30DkXwGUpXho/vdAz+fnGf41FyuGrfUxRMQLhNZkdPFsFlTq/RScDkeP oR56gqjzgxV8u2i64bBIKPj2Pczep/Y72to6m9CK189u6HahjdTUHJ5k+0Co3q9uTVyz Xyag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=u0OJqO+BHz5holsODPjL1ndEH4QH3r3/bcakJJHp0iU=; b=MC/llEoXV709CQs/nlg156tBHjUxyAvIoCZnt17IGJ1NbLdulmt+Uu+i9kiL4iESs+ 2gRxV2vESn5nKZdafocx0AWD1SC7aVYHyxbrPrD3ZkGZY7VTtGEXGcvg0iYeP5QFmgXh gB8s3UE6fjwo/VlKkjBGjuewZNJnR5eeaup7j9Jq9bHzRuDFki9jNR87uB9vLLI0Wsph nnXvFOBj2EeAFfzMEjVZXUFhVGfFHZLraPwg8IhZNxV5Ju0Og74AIEXvBFk8dLKoTWSg fFJRSOxVnN7lMaIHrP+Zi6oCSX6cE4eZcMdOh45nGpdwCiiKfvsv6VIsHDQQMX5nAGJc Fnvg== X-Gm-Message-State: AMCzsaXo763jMhIKmvZdalB0d0EIVSdLEut12Izg8mCsyXi6CNgKrBYN TeBCD4iKm+/DKY20JoPlgKLWTrupnQ4cXlsiazg= X-Google-Smtp-Source: ABhQp+TTEi5Ek3D8UCDMRSqL5MF7fJ6gGBV+bgxFKu1qrUJVv8vMuTFaob4zTnnNxdRTj4vII+/h4JKWBB9Yly5XRN8= X-Received: by 10.107.162.7 with SMTP id l7mr30839126ioe.135.1509053886040; Thu, 26 Oct 2017 14:38:06 -0700 (PDT) Original-Received: by 10.2.146.195 with HTTP; Thu, 26 Oct 2017 14:38:05 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: X9B9rK80FLa1G9pg3O1aD6a5SC0 X-Mailman-Approved-At: Thu, 26 Oct 2017 18:03:24 -0400 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:139039 Archived-At: --001a1140e638d3108d055c79fc45 Content-Type: text/plain; charset="UTF-8" Ping! I wrote this tiny patch a few months back; I hope someone can take a look and include it. Nathan On 18 August 2017 at 18:55, Jonathan Kotta wrote: > Yes, that works for me. My workaround was to save the current-buffer > after occur-mode-goto-occurrence, and then set-buffer outside the > with-current-buffer, but apparently that was overkill. > > On Thu, Aug 17, 2017 at 4:36 AM, Nathan Moreau > wrote: > >> Here is a patch that fixes the reported problem. >> >> A minimal reproduction test: >> >> (ert-deftest totoro () >> (set-buffer "*scratch*") >> (insert "setq") >> (setq next-error-recenter '(4)) >> (occur "setq") >> (next-error)) >> >> It seems that occur-mode-goto-occurrence should be called after >> restoring the original buffer. >> >> Nathan >> > > > > -- > Thanks, > > Jonathan Kotta > > Hofstadter's Law: > It always takes longer than you expect, even > when you take into account Hofstadter's Law. > --001a1140e638d3108d055c79fc45 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ping!

I wrote this tiny patch a few months back; I = hope someone can take a look and
include it.

Nathan

On 18 August 2017 at= 18:55, Jonathan Kotta <jpkotta@gmail.com> wrote:
Yes, that works for me.=C2=A0 My w= orkaround was to save the current-buffer after occur-mode-goto-occurrence, = and then set-buffer outside the with-current-buffer, but apparently that wa= s overkill.

On Thu, Aug 17, 2017 at 4:36 AM, Nathan Moreau <nathan.moreau@m4x.org> wrote:
Here=C2=A0 is a patch that fixes the reported problem.

A minimal reproduction test:

(ert-deftest totoro ()
=C2=A0 (set-buffer "*scratch*")
=C2=A0 (insert "setq")
=C2=A0 (setq next-error-recenter '(4))
=C2=A0 (occur "setq")
=C2=A0 (next-error))

It seems that occur-mode-goto-occurrence should be called after
restoring the original buffer.

Nathan



--
Thanks,

Jonathan Kotta

Hofstadter's Law:=C2=A0 =C2=A0 It always takes longer than you expect, even
=C2=A0 =C2= =A0 when you take into account Hofstadter's Law.

--001a1140e638d3108d055c79fc45--