From: Robert Weiner <rsw@gnu.org>
To: Alex Dunn <dunn.alex@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 13:54:49 -0400 [thread overview]
Message-ID: <CA+OMD9gPB6Jqf7ieD_mQRxdw7PsNwXefhu=mdJ2kq9QYb7bG9w@mail.gmail.com> (raw)
In-Reply-To: <CAOg0uMG36a+SVEOGiELCK-TQVcjvVw-cGkrS5ThZHU6+VhUTag@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]
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: 4510 bytes --]
next prev parent reply other threads:[~2016-08-01 17:54 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 [this message]
2016-08-01 18:15 ` Alex Dunn
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+OMD9gPB6Jqf7ieD_mQRxdw7PsNwXefhu=mdJ2kq9QYb7bG9w@mail.gmail.com' \
--to=rsw@gnu.org \
--cc=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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).