all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: 37856@debbugs.gnu.org
Cc: stefan@marxist.se
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	[thread overview]
Message-ID: <m2k18xusbl.fsf@gmail.com> (raw)
In-Reply-To: <CADwFkm=YBvWE+a1JL8OvjQ=XRMCqUj3Dsspp_WRyLwCuSYY_Xw@mail.gmail.com> (Stefan Kangas's message of "Tue, 22 Oct 2019 00:19:13 +0200")

>>>>> On Tue, 22 Oct 2019 00:19:13 +0200, Stefan Kangas <stefan@marxist.se> said:

    Stefan> Juanma Barranquero <lekktu@gmail.com> writes:
    >> > What am I missing?
    >> 
    >> What's wrong with
    >> 
    >> (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 everyone
    Stefan> else feels that everything is in order I'll just go ahead and close
    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ʼd agree with your expectations. Of course, you could use
:around and call 'next-error' yourself in your function (untested).

Robert





  reply	other threads:[~2019-10-22  7:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 18:38 bug#37856: 27.0.50; 'next-error' advised with 'recenter' signals error when run from "*grep*" buffer Stefan Kangas
2019-10-21 19:30 ` Eli Zaretskii
2019-10-21 20:11   ` Stefan Kangas
2019-10-21 21:37     ` Juanma Barranquero
2019-10-21 22:19       ` Stefan Kangas
2019-10-22  7:56         ` Robert Pluim [this message]
2019-10-22  2:28     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k18xusbl.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=37856@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.