From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 20968@debbugs.gnu.org
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 [thread overview]
Message-ID: <83615zyiuq.fsf@gnu.org> (raw)
In-Reply-To: <dc02c2ca-d069-4559-820d-fbd6dfaed9d3@default>
> Date: Sat, 4 Jul 2015 07:41:47 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> 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.
next prev parent reply other threads:[~2015-07-04 16:42 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<23829743-922e-4304-8ab3-b762b8193860@default>
[not found] ` <<74y4iytdjg.fsf@fencepost.gnu.org>
[not found] ` <<e68f1dc9-9e8f-4f54-af8f-a5bb23160576@default>
[not found] ` <<83pp49zb03.fsf@gnu.org>
2015-07-03 14:55 ` bug#20968: 25.0.50; Be able to specify the output directory for `byte-compile-file' Drew Adams
2015-07-04 8:40 ` Eli Zaretskii
2015-07-04 18:48 ` Stefan Monnier
[not found] ` <<d5d5b826-847c-41be-9392-25446b6e37fa@default>
[not found] ` <<83pp48xqm8.fsf@gnu.org>
2015-07-04 14:41 ` Drew Adams
2015-07-04 16:42 ` Eli Zaretskii [this message]
[not found] <<dc02c2ca-d069-4559-820d-fbd6dfaed9d3@default>
[not found] ` <<83615zyiuq.fsf@gnu.org>
2015-07-04 18:20 ` Drew Adams
2015-07-04 18:25 ` Eli Zaretskii
[not found] ` <<f766b63c-edb1-4f11-9f14-bfcd95d8adcd@default>
[not found] ` <<831tgnye3x.fsf@gnu.org>
2015-07-04 18:54 ` Drew Adams
2015-07-02 21:05 Drew Adams
2015-07-02 22:12 ` Glenn Morris
2015-07-02 23:51 ` Drew Adams
2015-07-03 12:22 ` Eli Zaretskii
2015-07-03 15:10 ` Stefan Monnier
2015-07-03 17:12 ` Glenn Morris
2015-07-03 17:27 ` Glenn Morris
2015-07-03 17:49 ` Eli Zaretskii
2015-07-03 22:48 ` Artur Malabarba
2015-07-04 8:24 ` Eli Zaretskii
2015-07-04 10:38 ` Alexis
2015-07-04 11:55 ` Eli Zaretskii
2015-07-04 11:10 ` Artur Malabarba
2015-07-04 11:56 ` Eli Zaretskii
2015-07-04 18:46 ` Stefan Monnier
2015-07-04 18:55 ` Eli Zaretskii
2015-07-04 19:26 ` Stefan Monnier
2015-07-04 19:31 ` Eli Zaretskii
2015-07-05 11:54 ` Dmitry Gutov
2015-07-05 14:35 ` Eli Zaretskii
2015-07-05 14:54 ` Dmitry Gutov
2015-07-05 15:18 ` Eli Zaretskii
2015-07-05 15:54 ` Artur Malabarba
2015-07-05 16:27 ` Stefan Monnier
2015-07-05 16:31 ` Eli Zaretskii
2015-07-05 18:09 ` Stefan Monnier
2015-07-05 19:30 ` Artur Malabarba
2015-07-05 18:11 ` Stefan Monnier
2015-07-05 19:18 ` Artur Malabarba
2015-07-05 19:44 ` Artur Malabarba
2015-07-05 21:56 ` Richard Stallman
2016-04-30 20:07 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83615zyiuq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=20968@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.