From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#55743: 28.1.50; No directory error in comp-run-async-workers Date: Wed, 01 Jun 2022 22:13:37 +0300 Organization: LINKOV.NET Message-ID: <86a6aw2o4e.fsf@mail.linkov.net> References: <86y1yhsxin.fsf@mail.linkov.net> <83wne1h66x.fsf@gnu.org> <86wne1trce.fsf@mail.linkov.net> <83leuhgljn.fsf@gnu.org> <861qw97x41.fsf@mail.linkov.net> <83h754hbwf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36843"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 55743@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 01 21:15:47 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 1nwToo-0009Pi-41 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 21:15:46 +0200 Original-Received: from localhost ([::1]:52712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwTom-00038a-7j for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 15:15:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwTo6-00036u-At for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwTo6-0000w7-1p for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwTo5-0003Kv-Pb for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 19:15:01 +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.165411086312757 (code B ref 55743); Wed, 01 Jun 2022 19:15:01 +0000 Original-Received: (at 55743) by debbugs.gnu.org; 1 Jun 2022 19:14:23 +0000 Original-Received: from localhost ([127.0.0.1]:51857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwTnT-0003Jh-IT for submit@debbugs.gnu.org; Wed, 01 Jun 2022 15:14:23 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:37699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwTnS-0003JU-ML for 55743@debbugs.gnu.org; Wed, 01 Jun 2022 15:14:22 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 11E06FF802; Wed, 1 Jun 2022 19:14:15 +0000 (UTC) In-Reply-To: <83h754hbwf.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 Jun 2022 14:16:16 +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:233506 Archived-At: >> >> 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. I don't understand who is the caller? The user? The user visits an non-existent directory, by e.g. `C-x C-f /bla/bla/bla', then emacs compilation kicks in using that directory, and signals the error. If this is the intended behavior, then I guess this bug report can be closed, since I fixed the non-existent directory case in *Completions*.