[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with compilation-start resetting default-directory
From: |
Alex Bennée |
Subject: |
Re: Problem with compilation-start resetting default-directory |
Date: |
Tue, 19 Nov 2019 15:01:59 +0000 |
User-agent: |
mu4e 1.3.5; emacs 27.0.50 |
Alex Bennée <address@hidden> writes:
> Hi,
>
> For a while I've been trying to track down an annoying bug where the
> default-directory of my code/magit buffers was getting reset. Thanks to
> the power of add-variable-watcher I've finally managed to track the
> culprit down to compilation-start however I'm unsure what is going on.
>
> I've instrumented compilation-start to illustrate the problem:
>
> (defun compilation-start (command &optional mode name-function
> highlight-regexp)
<snip>
> (run-hook-with-args 'compilation-start-hook proc)
> (compilation--update-in-progress-mode-line)
> (push proc compilation-in-progress))
<snip>
Inevitably I solved my own problem shortly after posting. I had a hook
to hide the compilation window which did a delete-window which caused
the current active buffer to change.
Apologies for the noise.
--
Alex Bennée