From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex =?utf-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.devel Subject: Re: Problem with compilation-start resetting default-directory Date: Tue, 19 Nov 2019 15:01:59 +0000 Message-ID: <87v9rfgba0.fsf@linaro.org> References: <87y2wcez3u.fsf@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="110930"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.3.5; emacs 27.0.50 To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 19 16:03:02 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iX51x-000SfI-Mu for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 16:03:01 +0100 Original-Received: from localhost ([::1]:46408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX51w-0003K5-FV for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 10:03:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48734) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX516-0003Hz-9a for emacs-devel@gnu.org; Tue, 19 Nov 2019 10:02:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX514-0002cu-2t for emacs-devel@gnu.org; Tue, 19 Nov 2019 10:02:07 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:37263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iX512-0002aw-Bv for emacs-devel@gnu.org; Tue, 19 Nov 2019 10:02:04 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id b17so4045110wmj.2 for ; Tue, 19 Nov 2019 07:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:subject:in-reply-to:date:message-id :mime-version:content-transfer-encoding; bh=zzV/tEXqDrsUJJqS9+QrbkxyTgzhTnEjPP1TWRyUvno=; b=ApGGegkPAI6Fl88qqq4ooScKeRklVFbY9apwgWi6yGTasiZLl6gG07mnOUu7B+9nK7 xpcOnCPpVeX5i0OZlriHEXDUFGHUzEsuLr58mlqlKp5q0ZN1ZRkzrxUy++qEFTCOOCZy fsfoALNFgMUMCyWIPov0FB5K3kCCeRJnvV++849oIelhG5Vp6uUIxYQRURC8+dB2c0rQ dRDcvE2epqx/3hM1lsQbRWiomrhVzN34scfJ4U2aOYu6HyPHBK10ptZW3yFRHthFyJsz x9fXUzEqqjWoZLpcC7XUEgpyxX+Hg5bka2ML12bxQ/2sz7FOYFSZ/sTL3EZU5sYq3ZLu OL7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=zzV/tEXqDrsUJJqS9+QrbkxyTgzhTnEjPP1TWRyUvno=; b=BgY56+2O1XbQ7bSR+6HmrqDSvQNNDa8z/AagNZDyYc0T3Jsd7MAv7pvG/4Ers4kdrc T97AyKs0M6oYtmA2wQ+0diJ714v7PZAI9NlT8U6OIzoT1oQ1JFNp80nDBgniTEqHARiQ NCJMlPRdZvnej2EpctYqanAil2l/E9q2btm6pRiRkyXcgJ+IuqEoqyuRoFIf0eud/RoL 5eLBYq8QJRvxWMBAX0Re7xJfakV6XB4v3pgRWYFrPGa/Wug35jLyMN9LRlHOnbif19mO tOYrSqyyYq8VT68u3prS2bsaE4l2cOGBeLmXakAUl/+TiGN3dtRomGlBX57i9Wpk6LGB yMTA== X-Gm-Message-State: APjAAAVeVlNfm3CTz37N1lFlk4UODJ0ZGqnSC5nEM4SImbwXJMXCx3Gq RUH0TDDZ99NRW4WXmUqtEpypGQVy45k= X-Google-Smtp-Source: APXvYqw25FWturW6zHezGqhQWVIf8aAVVADSobJDqpDBsp8lnXWLL5tNn0lokU49wM1t0HJe+5Cwwg== X-Received: by 2002:a1c:a791:: with SMTP id q139mr6011718wme.155.1574175721457; Tue, 19 Nov 2019 07:02:01 -0800 (PST) Original-Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p1sm3291687wmc.38.2019.11.19.07.01.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2019 07:02:00 -0800 (PST) Original-Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 27A5F1FF87 for ; Tue, 19 Nov 2019 15:01:59 +0000 (GMT) In-reply-to: <87y2wcez3u.fsf@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242432 Archived-At: Alex Benn=C3=A9e 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) > (run-hook-with-args 'compilation-start-hook proc) > (compilation--update-in-progress-mode-line) > (push proc compilation-in-progress)) 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=C3=A9e