From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20968: 25.0.50; Be able to specify the output directory for `byte-compile-file' Date: Sat, 04 Jul 2015 19:42:53 +0300 Message-ID: <83615zyiuq.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1436028204 20034 80.91.229.3 (4 Jul 2015 16:43:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jul 2015 16:43:24 +0000 (UTC) Cc: 20968@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 04 18:43:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZBQX0-0006rh-4U for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 18:43:10 +0200 Original-Received: from localhost ([::1]:44858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBQWz-0008Ve-7S for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 12:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBQWv-0008Uf-Up for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 12:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBQWs-00010b-GL for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 12:43:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBQWs-00010X-CH for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 12:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZBQWs-0000ak-4A for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 12:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2015 16:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20968 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20968-submit@debbugs.gnu.org id=B20968.14360281742253 (code B ref 20968); Sat, 04 Jul 2015 16:43:02 +0000 Original-Received: (at 20968) by debbugs.gnu.org; 4 Jul 2015 16:42:54 +0000 Original-Received: from localhost ([127.0.0.1]:39878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBQWj-0000aH-BX for submit@debbugs.gnu.org; Sat, 04 Jul 2015 12:42:53 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:56724) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBQWg-0000a0-0j for 20968@debbugs.gnu.org; Sat, 04 Jul 2015 12:42:51 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NQZ007002CJSG00@a-mtaout20.012.net.il> for 20968@debbugs.gnu.org; Sat, 04 Jul 2015 19:42:43 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQZ007FD2F2KJ90@a-mtaout20.012.net.il>; Sat, 04 Jul 2015 19:42:43 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104700 Archived-At: > Date: Sat, 4 Jul 2015 07:41:47 -0700 (PDT) > From: Drew Adams > Cc: rgm@gnu.org, 20968@debbugs.gnu.org > > > > Why should the target dir be hardwired to the source dir? Testing > > > might be a reason for the enhancement: quickly remove the *.elc > > > dir from `load-path' to take byte-compilation complications out of > > > the equation. Having different compilation dirs for different > > > Emacs versions could be another argument for such flexibility. > > > > > > Is there a compelling reason, beyond "we've always done without > > > this", not to let users specify the output dir? > > > > One reason is to be able to use "M-x load-library RET", and have it > > DTRT. If the *.elc files are separate from *.el, then at best the > > problem of deciding which version to load becomes harder and the > > loading becomes slower, and at worst you'll have a subtle bug on > > your hands. E.g., what if more than one directory on load-path has > > a file that goes by the same name? And in what order do you search > > load-path for the companion .el file, given that you found .elc in > > in some directory? > > It can of course happen that someone is confused, doesn't know how > `load-library' works, and doesn't get the behavior that s?he > mistakenly expected. > > But AFAIK, the behavior is well-defined. It's well-defined only for the current behavior, where the *.el and the corresponding *.elc files live in the same directory. > Ordering multiple dirs in `load-path' is a way to control which > version of a library gets loaded (whether .el or .elc gets loaded, > and which .el or .elc gets loaded). Users will get to manage the resulting complexity. I bet the OP didn't even understand what kind of hole he is digging for himself. > So yes, this gives users more, not less control. There's a limit where more becomes less. > And with greater control comes more possibilities to shoot oneself > in the foot. Exactly. > So unless I'm missing something, I see no good argument against > the suggestion when it comes to `load-library'. You see it, you just disagree with it. > > Last, but not least: the current implementation of loading a Lisp > > file is a 2-level loop, where the outer one loops over the > > directories, and the inner one over the suffixes. > > Which means that if there is only one suffix in a given directory > then the inner one becomes a trivial case, no? ??? Are you saying we will no longer allow both *.el and *.elc, only one of them? > > So this suggestion, if implemented, will need C-level changes as well. > > I trust your estimation of that, but I don't understand why it > would be the case. See above.