From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#37856: 27.0.50; 'next-error' advised with 'recenter' signals error when run from "*grep*" buffer Date: Tue, 22 Oct 2019 09:56:14 +0200 Message-ID: References: <83lftd28wt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="209806"; mail-complaints-to="usenet@blaine.gmane.org" Cc: stefan@marxist.se To: 37856@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 22 10:06:51 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMpBp-000sO4-DC for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2019 10:06:50 +0200 Original-Received: from localhost ([::1]:51336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMpBn-000583-Mh for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2019 04:06:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42565) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMp2N-0003vq-9v for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 03:57:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMp2M-0006BN-5X for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 03:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49374) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMp2M-0006BH-1i for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 03:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMp2L-0007Q8-Ty for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 03:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2019 07:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37856 X-GNU-PR-Package: emacs Original-Received: via spool by 37856-submit@debbugs.gnu.org id=B37856.157173098528478 (code B ref 37856); Tue, 22 Oct 2019 07:57:01 +0000 Original-Received: (at 37856) by debbugs.gnu.org; 22 Oct 2019 07:56:25 +0000 Original-Received: from localhost ([127.0.0.1]:58195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMp1k-0007PG-OL for submit@debbugs.gnu.org; Tue, 22 Oct 2019 03:56:24 -0400 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:51550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMp1i-0007Oy-GZ for 37856@debbugs.gnu.org; Tue, 22 Oct 2019 03:56:23 -0400 Original-Received: by mail-wm1-f47.google.com with SMTP id q70so8832849wme.1 for <37856@debbugs.gnu.org>; Tue, 22 Oct 2019 00:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=LbEiS1wLF8cDwWEuyFCNdz2IblrxeUyjuSr8YGgahAw=; b=GQ8cg4AvG1ALWXaQWZx6L/DEnlG7Kmft/wyCFPsAbd3zxzVMA5yYoKfq+pi36aZGAY flKD+CVP+aHWSLbBptUVeLANX4osM8ejP8O4Q404daf2CX2K+HXyHdp3vSQoQ6yo5mz9 bFLMx5smjGp2eUK9H5+mqEGz1oE8L6CfuQFZ69y0R3e44wSAFcVM4Zkjd/V/FMKcvv+w MeJ8ZW2AglYi/QiO+rXIPtrxJViI+NyvGAjLwhYTQHhT+lW33Y7Fl/jvquuaYcq1k3Qw GHn6QjrskWP+BGP8q26zwaT75Y4mg+lrtGzvIYAT4k6v7IP8RQZC24R0rah+OHllmiUO bNrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=LbEiS1wLF8cDwWEuyFCNdz2IblrxeUyjuSr8YGgahAw=; b=DjIKK52SInvRh+++lPONafOrnNzmA6qPOMhgD0Ed80qwOVLFLn7q6XN7XuszeGCApw ngntiABO8o2Y6n33aZtQsZjfoidkMX6Tkpq1+Td0LfQ1B4DgoUpzs1FmyKNQDI/2HEjm vjR6VUpe2zxzxmxcMZJYurQEn4LfnmqQ5hJ6kzQVDtYksvRh2lhwzuGsqg1YAq5iV7AM g6N2GMksyJc4CzTyOl4ajo/Qn85uxqWpuGcXj6gEyOtH0IZUXLdFdbQOMWyUoKJC8Oej Bq79yGOp8xWB/XZ5cqdXBbEKCPlqBIaoh07GFmHsopdMkCR2qyaN5I4h7/+1Z8E2KQ+/ 3JCA== X-Gm-Message-State: APjAAAUUeFTrXYERePnhQukzjGcyncWwCPHCnT+wvwWD8AY/0XQPBda8 hMo948KuriuQP6TywAoHgmcMMiDj X-Google-Smtp-Source: APXvYqwzbGQh/xkWd4jFDx5mMHv1m7VEhKrk7aHFG+GM+DObGn4/Wg5Ex7u8FK8DMSWFu5dUFkUpPQ== X-Received: by 2002:a1c:a556:: with SMTP id o83mr1842814wme.0.1571730976177; Tue, 22 Oct 2019 00:56:16 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id q3sm17541146wru.33.2019.10.22.00.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 00:56:15 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Stefan Kangas's message of "Tue, 22 Oct 2019 00:19:13 +0200") 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: 209.51.188.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:169970 Archived-At: >>>>> On Tue, 22 Oct 2019 00:19:13 +0200, Stefan Kangas = said: Stefan> Juanma Barranquero writes: >> > What am I missing? >>=20 >> What's wrong with >>=20 >> (add-hook 'next-error-hook 'recenter) Stefan> Oops, how silly of me. Yes, I'll just use that. Thanks. Stefan> I'm still a bit confounded by the above behaviour, but if every= one Stefan> else feels that everything is in order I'll just go ahead and c= lose Stefan> this. Sorry about the noise. The add-function docstring says: Add a piece of advice on the function stored at PLACE. FUNCTION describes the code to add. WHERE describes where to add it. WHERE can be explained by showing the resulting new function, as the result of combining FUNCTION and the previous value of PLACE, which we call OLDFUN here: `:before' (lambda (&rest r) (apply FUNCTION r) (apply OLDFUN r)) `:after' (lambda (&rest r) (prog1 (apply OLDFUN r) (apply FUNCTION r))) `:around' (lambda (&rest r) (apply FUNCTION OLDFUN r)) so I think I=CA=BCd agree with your expectations. Of course, you could use :around and call 'next-error' yourself in your function (untested). Robert