all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* defadvicing next-error
@ 2015-03-31 12:18 Timur Aydin
  2015-03-31 15:09 ` Andy Moreton
  0 siblings, 1 reply; 3+ messages in thread
From: Timur Aydin @ 2015-03-31 12:18 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I had defadviced isearch-update a long time ago so that it also
recenters the screen and have never looked back. Best entry I made in my
.emacs.el :) Here is what I have for that:

(defadvice isearch-update (after recenter activate)
  (recenter))

Now I want to do the same thing with next-error:

(defadvice next-error (after recenter activate)
  (recenter))

But while this works most of the time, it doesn't work with the first
hit. And it doesn't work when a transition happens from one source file
to another. I get "recenter'ing a window that does not display
current-buffer".

So how do I get the recenter for every hit of next-error, just like
isearch-update?

Timur



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-31 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 12:18 defadvicing next-error Timur Aydin
2015-03-31 15:09 ` Andy Moreton
2015-03-31 16:34   ` Timur Aydin

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.