GNU bug report logs - #55743
28.1.50; No directory error in comp-run-async-workers

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 31 May 2022 17:58:02 UTC

Severity: normal

Found in version 28.1.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 55743 <at> debbugs.gnu.org
Subject: bug#55743: 28.1.50; No directory error in comp-run-async-workers
Date: Wed, 01 Jun 2022 22:49:19 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 55743 <at> debbugs.gnu.org
> Date: Wed, 01 Jun 2022 22:13:37 +0300
> 
> >> 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.

Please tell how this case is different from the one below:

  emacs -Q
  M-: (setq default-directory "/non-existent/foo/bar") RET
  M-! ls RET

You get the same error about "setting current directory".  Do yopu
think it's a bug in M-! ?

> 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*.

Thanks, I think this can indeed be closed.




This bug report was last modified 3 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.