[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17848: #17848 add suffix search to -l even when directory part in ar
From: |
npostavs |
Subject: |
bug#17848: #17848 add suffix search to -l even when directory part in argument |
Date: |
Wed, 07 Sep 2016 20:06:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
tags 17848 - patch
quit
Eli Zaretskii <eliz@gnu.org> writes:
> The proposed patch indeed passes an absolute file name to 'load', but
> it passes the name of the first candidate file found by 'locate-file',
> and that could very well be different from what 'load' would have
> found, because 'load' has some additional features and logic that
> 'locate-file' doesn't.
Actually, thinking more about it, I wonder what's wrong with just doing
emacs -l '$PWD/foo'
or even
emacs -l $PWD/foo
So then it's just a question of whether it's worth saving a few
characters on the command line (to write ./foo instead of '$PWD/foo'),
to which I'm inclined to answer "no", especially since implementing it
turns out to be rather fiddly.
>
> One other thought: should we prefer an exact match, without any
> extensions, in this particular case? IOW, should "-l ./foo" prefer
> 'foo" even if "foo.el" or "foo.gz" etc. exist in the current
> directory? If we should indeed prefer an exact match, then we might
> need to tweak the order of the suffixes to support that.
- bug#16406: load prefers directories rather than searching load-path, (continued)
bug#17848: #17848 add suffix search to -l even when directory part in argument (WAS: Re: bug#16406: load prefers directories...), npostavs, 2016/09/04