all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Dunn <dunn.alex@gmail.com>
To: Robert Weiner <rswgnu@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: why is site-lisp placed before the default load path?
Date: Mon, 1 Aug 2016 11:15:49 -0700	[thread overview]
Message-ID: <CAOg0uMGxovf4JbQpG29-CpfpxEhQin9hiVryxpZX-Pe-YcQ+Sw@mail.gmail.com> (raw)
In-Reply-To: <CA+OMD9gPB6Jqf7ieD_mQRxdw7PsNwXefhu=mdJ2kq9QYb7bG9w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]

OK.  I'm still not convinced this is good default behavior, but I'll defer
to y'all.  Realgud solved the issue in their case by adding .nosearch files
in the subdirectories, which I didn't realize was an available tool.

On Mon, Aug 1, 2016 at 10:54 AM, Robert Weiner <rsw@gnu.org> wrote:

>
> On Mon, Aug 1, 2016 at 1:19 PM, Alex Dunn <dunn.alex@gmail.com> wrote:
>
>> But there are plenty of other ways to do that.   This makes it a little
>> too easy to override important core libraries, IMO.
>>
>
> ​It should be easy for a site or a user to override default behavior in
> Emacs.  Sometimes this means having modifications loaded prior to
> particular local initialization files running and changing load-path.
> ​
>
>
>>
>> realgud is just an example.  It uses names like js.el and info.el because
>> they are supposed to be loaded via `load-relative`, rather than required
>> directly, but subdirs.el placing them at the front of the load path is
>> what's causing trouble.
>>
>
> ​Given all the existing tools that look for Elisp files by filename,
> find-library being just one, it is not a good assumption that the filename
> will always be uniquely identified by adding a directory name.
>
>   Rocky could add 'realgud-' to the beginning of every elisp file in the
>> application,
>>
>
> ​That would be much better and safer and more generally useful.
> ​
>
>
>> but `load-relative` and the directory structure makes that unnecessary.
>>
>> You might argue that every elisp file in an application should be named
>> to avoid conflicts with core libraries, but the only reason I see for that
>> requirement is the current ordering of the load path.
>>
>
> ​There are others.
> ​
>
>
>>
>> And beyond the inconvenience caused by programs using `load-relative`, or
>> programs just accidentally using the same name as a core library, it seems
>> possible that a malicious developer could tuck their own `url.el` into an
>> otherwise innocuous package and cause some mayhem.
>>
>
> ​Yes, Emacs is a pretty open environment that relies on a lot of trust
> among users and developers.  The community helps keep bad actors from
> acting badly.  Emacs has existed for decades without a major issue like you
> describe and there are very likely good reasons for that.
>
> ​Bob
> ​
> ​
>
>

[-- Attachment #2: Type: text/html, Size: 5214 bytes --]

  reply	other threads:[~2016-08-01 18:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 16:24 why is site-lisp placed before the default load path? Alex Dunn
2016-08-01 16:39 ` Eli Zaretskii
2016-08-01 17:19   ` Alex Dunn
2016-08-01 17:54     ` Robert Weiner
2016-08-01 18:15       ` Alex Dunn [this message]
2016-08-02 17:35         ` James Cloos
2016-08-02 18:35           ` Robert Weiner
2016-08-02 20:07             ` James Cloos
2016-08-02 20:47               ` Robert Weiner
2016-08-02  0:25       ` Clément Pit--Claudel
2016-08-02 14:58       ` Stefan Monnier

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=CAOg0uMGxovf4JbQpG29-CpfpxEhQin9hiVryxpZX-Pe-YcQ+Sw@mail.gmail.com \
    --to=dunn.alex@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rswgnu@gmail.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.