unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [PATCH] allow function values for `enable-local-eval'
Date: 29 Jun 2002 02:55:23 +0200	[thread overview]
Message-ID: <5xit42rjic.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <87u1nnnqlp.fsf@floss.i-did-not-set--mail-host-address--so-shoot-me>

Karl Fogel <kfogel@floss> writes:

> Richard Stallman <rms@gnu.org> writes:
> > That is a general basis for a solution, but it has no specific
> > knowledge; it requires that to be provided by the user.  I'm not
> > necessarily rejecting it, but it would be more helpful to do something
> > that embody specific knowledge, and does the right thing (for some
> > cases) without requiring user customization.
> 
> Yeah, we could provide such functionality if we can think of it, but I
> think it's still necessary to offer the general solution.

I agree with Karl that allowing the user to fully customize this would
be very useful.  I'm working on a project where the files belonging to
one of the modules have a rather complicated -- but harmless -- eval:
which I would really like to be able to allow without confirmation
whenever I open one of those files (which I do fairly often).

And as Karl says, emacs cannot possibly treat this as "standard
knowledge".

For this, user customization is a good thing!

But maybe it would be better to have a more hook-like approach
such as having a special hook like
        enable-local-eval-functions
which are run until success (i.e. any of the functions may return 
true to allow a specific eval to be executed), and if all of them
returns false, the default method is used according to enable-local-eval
(i.e. ignore or ask user for confirmation).

Something like

        (if (or (run-hook-with-args-until-success
                 'enable-local-eval-functions val)
                (eq enable-local-eval t)
                (and enable-local-eval
                     (y-or-n-p ...)))
            (eval ...))

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  parent reply	other threads:[~2002-06-29  0:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E17NLww-0005Cn-00@floss>
2002-06-28 17:41 ` [PATCH] allow function values for `enable-local-eval' Richard Stallman
     [not found]   ` <87u1nnnqlp.fsf@floss.i-did-not-set--mail-host-address--so-shoot-me>
2002-06-29  0:55     ` Kim F. Storm [this message]
2002-06-29 22:22       ` Richard Stallman
2002-06-30 21:37         ` Kim F. Storm
2002-07-01 14:10           ` Richard Stallman
2002-07-01 21:26             ` Kim F. Storm
2002-07-02 19:46               ` Richard Stallman
2002-07-02 20:11                 ` Stefan Monnier
2002-07-02 21:49                   ` Kim F. Storm
2002-07-04  7:07                   ` Richard Stallman
2002-07-04 15:28                     ` Stefan Monnier
2002-07-04 19:38                       ` Kim F. Storm
2002-07-04 18:46                         ` Stefan Monnier
2002-07-04 21:58                           ` Kim F. Storm
2002-07-05  1:26                           ` Miles Bader
2002-07-05 13:39                             ` Kai Großjohann
2002-07-04 19:36                     ` Kim F. Storm
2002-07-05 22:05                       ` Richard Stallman
2002-07-02 21:20                 ` Kim F. Storm
2002-07-04  7:06                   ` Richard Stallman
2002-07-04 15:13                     ` Stefan Monnier
2002-07-05 10:48                       ` Richard Stallman
2002-07-03  1:28             ` Kevin Ryde
2002-06-29 22:22     ` Richard Stallman
     [not found]       ` <877kkhlmgw.fsf@floss.i-did-not-set--mail-host-address--so-shoot-me>
2002-07-01 14:10         ` 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

  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=5xit42rjic.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --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 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).