all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: defadvicing next-error
Date: Tue, 31 Mar 2015 16:09:29 +0100	[thread overview]
Message-ID: <vz1bnj96w5y.fsf@gmail.com> (raw)
In-Reply-To: 551A9088.6060004@taydin.org

On Tue 31 Mar 2015, Timur Aydin wrote:

> 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?

There is no need for advice: see variable next-error-recenter.

    AndyM




  reply	other threads:[~2015-03-31 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 12:18 defadvicing next-error Timur Aydin
2015-03-31 15:09 ` Andy Moreton [this message]
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

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

  git send-email \
    --in-reply-to=vz1bnj96w5y.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --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.
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.