all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Schierl <schierlm-usenet@gmx.de>
To: bug-gnu-emacs@gnu.org
Subject: Re: HOW CAN I STOP THIS NOVICE MODE STUFF?
Date: Tue, 25 Dec 2007 23:32:41 +0100	[thread overview]
Message-ID: <fks0eb$oae$1@ger.gmane.org> (raw)
In-Reply-To: 477141A3.7030808@gmail.com

On Tue, 25 Dec 2007 09:45:07 -0800, Bruce Korb wrote:

> "anyone", I would hope :).  Perhaps I was mistaken.  I thought
> these incantations were constrained to setting buffer local
> variable values.  

Even if they were: there are some buffer-local variables (for syntax
highlighting for example) whose subexpressions are evaluated. And, there
are local hook variables which contain Lisp code as well. So, even if
enable-local-eval is disabled (as it is by default), you could use
"backdoors" to introduce your own Lisp code by setting the right local
variables.

Therefore, every local variable that is not marked as safe-local-variable
(by the packages that declares it) will cause an "annoying" warning (which
gives you an option to ignore it the next time). On the other hand, a
variable is marked as risky-local-variable, the option

!  -- to apply the local variables list, and permanently mark these
      values (*) as safe (in the future, they will be set automatically.)

will not show up, so you will be asked over and over.

So, to avoid these messages, the best way IMHO is to ask the package
maintainer to mark the variable you want to set in your local variables as
safe.

> If they can execute arbitrary emacs lisp code,
> then it sounds very Microsoft-like.  ``Let it be easy for
> content providers and painful to secure.''  If emacs has really
> become "that powerful" then there's nothing for it but to go
> back to old versions or back to vi.  I disliked vi in 1974,
> despite "ed" being the only competition.

You can disable the local variables stuff completely, if you think it is
too insecure.

> C.F. ``See "(info ...)" and "Ch-v v enable-local-variables'', I
> am afraid that does not address this issue.  Extracted from .emacs:
> 
>   (setq enable-local-variables    't)


a) you do not need to quote t, it will quote itself
b) t and :all is not the same
c) you do not need to quote :all either :)

You can add the variable and its value to safe-local-variable-values if you
do not want to allow all variables.

Michael
-- 
#!/usr/bin/perl -I' # tekscribble.pl - start in an xterm and scribble with mouse
$|=1;$g="\35";sub g{getc}sub p{print@_}system"stty -icanon";p"\233?38h";for(;;){
p"$g\33\32";$_=g;$x=g;$X=g;$y=g;$Y=g;last if/q/;$k=$y.chr((ord$Y)+64).$x.chr((
ord$X)+32);p"\33\14"if/c/;p$g.(/ì/?$l:$k).$k;$l=$k;}p"\33\3";system"stty icanon"





  parent reply	other threads:[~2007-12-25 22:32 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-23 21:48 HOW CAN I STOP THIS NOVICE MODE STUFF? Bruce Korb
2007-12-24 13:23 ` Lennart Borgman (gmail)
2007-12-24 13:54 ` Andreas Schwab
2007-12-25 17:45   ` Bruce Korb
2007-12-25 17:58     ` Lennart Borgman (gmail)
2007-12-25 22:32     ` Michael Schierl [this message]
2007-12-26  5:28     ` Richard Stallman
2008-01-02 19:32       ` Bruce Korb
2008-01-02 19:51         ` Dan Nicolaescu
2008-01-02 21:45           ` Bruce Korb
2008-01-02 21:57             ` Dan Nicolaescu
2008-01-03  0:12               ` Bruce Korb
2008-01-03  0:44                 ` Dan Nicolaescu
2008-01-03  6:55                   ` local variable for updating the time stamp on save (was: Re: HOW CAN I STOP THIS NOVICE MODE STUFF?) Dan Nicolaescu
2008-01-04  5:28                     ` Richard Stallman
2008-01-04 18:15                       ` Dan Nicolaescu
2008-01-10 14:02                       ` Dan Nicolaescu
2008-01-15 18:47                         ` local variable for updating the time stamp on save Bruce Korb
2008-01-16  8:31                           ` Richard Stallman
2008-01-17 15:32                             ` Bruce Korb
2008-01-17 20:08                               ` Dan Nicolaescu
2008-01-17 23:15                                 ` Reiner Steib
2008-01-18 18:21                               ` Richard Stallman
2008-01-19 17:35                               ` Bruce Korb
2008-01-19 18:32                                 ` Dan Nicolaescu
2008-01-20 21:35                                   ` Bruce Korb
2008-01-21  7:18                                     ` Dan Nicolaescu
2008-01-21 14:15                                       ` Bruce Korb
2008-01-21 20:30                                       ` Richard Stallman
2008-01-21 20:54                                         ` Bruce Korb
2008-01-22 22:30                                           ` Richard Stallman
2008-01-21 20:30                                       ` Richard Stallman
2008-01-22  1:00                                         ` Johan Bockgård
2008-01-21  9:08                                   ` Richard Stallman
2007-12-24 14:00 ` HOW CAN I STOP THIS NOVICE MODE STUFF? Bastien
2007-12-25  0:56   ` Michael Schierl

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='fks0eb$oae$1@ger.gmane.org' \
    --to=schierlm-usenet@gmx.de \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=schierlm@gmx.de \
    /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.