From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55743: 28.1.50; No directory error in comp-run-async-workers Date: Wed, 01 Jun 2022 14:16:16 +0300 Message-ID: <83h754hbwf.fsf@gnu.org> References: <86y1yhsxin.fsf@mail.linkov.net> <83wne1h66x.fsf@gnu.org> <86wne1trce.fsf@mail.linkov.net> <83leuhgljn.fsf@gnu.org> <861qw97x41.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18365"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55743@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 01 13:57:05 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwMyG-0004Zv-AJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 13:57:04 +0200 Original-Received: from localhost ([::1]:35286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwMyE-0005eh-SK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 07:57:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwMLX-0000kv-W9 for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 07:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwMLX-0000do-Au for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 07:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwMLX-00037r-2Y for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 07:17:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 11:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55743 X-GNU-PR-Package: emacs Original-Received: via spool by 55743-submit@debbugs.gnu.org id=B55743.165408218111936 (code B ref 55743); Wed, 01 Jun 2022 11:17:03 +0000 Original-Received: (at 55743) by debbugs.gnu.org; 1 Jun 2022 11:16:21 +0000 Original-Received: from localhost ([127.0.0.1]:49845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwMKq-00036Q-OD for submit@debbugs.gnu.org; Wed, 01 Jun 2022 07:16:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwMKn-00035y-76 for 55743@debbugs.gnu.org; Wed, 01 Jun 2022 07:16:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwMKh-0000TH-La; Wed, 01 Jun 2022 07:16:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dckoKU4gq63xk2P0Kid8PosIjuyAECrhAJsB9Gxcjcs=; b=WndXzXRDcSFF q2cUUrFvFjC8qXLUbXbE2EYAKsQcfmpLHLLKAMKX4QTlA4+foY74TtjCbSghuUVJOI8YrOZV+XIfw CnHv01axtCMsHY8CU3Tv6DPwW/ViOrESTDuzWUcHGA3wYQfME/0aH2oxdLMkT2gjrB3ekFfiTY9kp lZ2Ejzt+3l0OIYuAkXTi3rv+d5tUdhY6Kez1uH3E8b/Mxvk2v69o/dIOlKXk+y1UIVYxa/s43EqOr QjXEqktTguThC119aZmu2A5iySE/Pzs8y59zHbAADHDpIy2iQW26FTrd31opE1fwUsOSUyBbFFNon x1KnvTCfQCih4JnbP9efrg==; Original-Received: from [87.69.77.57] (port=3018 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwMKf-0001sQ-Rm; Wed, 01 Jun 2022 07:16:11 -0400 In-Reply-To: <861qw97x41.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 01 Jun 2022 09:13:14 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233483 Archived-At: > From: Juri Linkov > Cc: 55743@debbugs.gnu.org > Date: Wed, 01 Jun 2022 09:13:14 +0300 > > >> Shouldn't native compilation run in the directory where the emacs > >> source files are located instead of running in the default directory > >> of an arbitrary buffer that might be invalid? > > > > No, because native compilation could be invoked to compile a file that > > has nothing to do with the Emacs source tree, e.g., some file of the > > user or some 3rd-party package installed in some arbitrary place. > > Still, shouldn't it run compilation in the same directory > where that file is located? Isn't this better than running > compilation in a random dir from a random buffer? No, it isn't better, because the directory should be set by the caller. The compilation primitive cannot second-guess what the caller meant. For example, the file to be compiled could load other files, and load-path could mention the current directory in some relative form; or the directory of the file could not be chdir'ed into, but files in it could be accessed; or some VCS could be involved (so you need to be in the VCS repository), or something else. make-process uses the default-directory of the current buffer because making sure that directory is the correct one is left to the caller, and it makes it easy for the caller to ensure the compilation runs in the correct directory.