GNU bug report logs -
#37856
27.0.50; 'next-error' advised with 'recenter' signals error when run from "*grep*" buffer
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Mon, 21 Oct 2019 18:40:02 UTC
Severity: normal
Found in version 27.0.50
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> On Tue, 22 Oct 2019 00:19:13 +0200, Stefan Kangas <stefan <at> marxist.se> said:
Stefan> Juanma Barranquero <lekktu <at> 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
This bug report was last modified 5 years and 215 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.