From: Timur Aydin <ta@taydin.org>
To: help-gnu-emacs@gnu.org
Subject: defadvicing next-error
Date: Tue, 31 Mar 2015 15:18:16 +0300 [thread overview]
Message-ID: <551A9088.6060004@taydin.org> (raw)
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
next reply other threads:[~2015-03-31 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 12:18 Timur Aydin [this message]
2015-03-31 15:09 ` defadvicing next-error Andy Moreton
2015-03-31 16:34 ` Timur Aydin
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=551A9088.6060004@taydin.org \
--to=ta@taydin.org \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).