all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Recognizing obsolete external package versions
Date: Mon, 13 Aug 2007 03:31:50 -0400	[thread overview]
Message-ID: <4gsl6nhoux.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <E1IK4rL-0006Xp-2l@fencepost.gnu.org> (Richard Stallman's message of "Sun, 12 Aug 2007 00:15:23 -0400")

Richard Stallman wrote:

> That code seems basically right except that I would rather it avoid
> calling eval. It should give the name of a variable, and the values
> that are bad.

I don't see the problem with eval, given that we write the code that
gets evalled, and this feature would not be for external use. If you
are worried about malicious code in the filed being loaded, well, it's
already been loaded at this point, so if it wanted to do anything
nasty it could have done so directly without needing to go through
this mechanism. No different to any other external package.

> I think it would be better to check at the beginning of loading the
> file rather than at the end. That is possible by searching for
> "(defvar VARIABLE", evaluating the sexp that comes next, and looking
> at its value.

Oof. This seems like overkill, as has been said.

> That would require detecting the file by its name rather than by
> a feature it provides.

eval-after-load can work with file names as well; so the mechanism I
proposed can already work with either features or filenames. But it is
_after_ load, of course.

  parent reply	other threads:[~2007-08-13  7:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 20:22 Recognizing obsolete external package versions Richard Stallman
2007-08-10 21:15 ` Glenn Morris
2007-08-10 21:25   ` Lennart Borgman (gmail)
2007-08-10 22:18     ` Glenn Morris
2007-08-11  0:24       ` Glenn Morris
2007-08-12  4:15   ` Richard Stallman
2007-08-12  4:50     ` Stefan Monnier
2007-08-13  0:51       ` Richard Stallman
2007-08-13  1:54         ` Stefan Monnier
2007-08-14  0:28           ` Richard Stallman
2007-08-14  7:52             ` Glenn Morris
2007-08-13  7:31     ` Glenn Morris [this message]
2007-08-14  0:28       ` Richard Stallman
2007-08-13  9:56     ` Kim F. Storm
2007-08-14  0:28       ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2007-08-08  4:54 Richard Stallman

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=4gsl6nhoux.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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.