all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: Mathieu Boespflug <mboes@tweag.net>, 12259@debbugs.gnu.org
Subject: bug#12259: Add delete-trailing-whitespace to list of safe eval forms
Date: Thu, 23 Aug 2012 07:51:02 -0400	[thread overview]
Message-ID: <jwvy5l5u919.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <3v7gsq99o4.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 22 Aug 2012 12:24:43 -0400")

>> Actually, I wonder whether we want to accept/encourage those uses
>> instead of (add-hook 'before-save-hook 'delete-trailing-whitespace).
> OT: I wouldn't encourage that either. :)
> Blind application of such a hook has removed trailing whitespace that
> was supposed to be there in the Emacs sources a few times.

That's a different issue.  The question is not whether it's a good idea
for a user to use such a setting but:
- whether having such a setting in the file-(or directory-)local
  variables can be used as an attack vector.
- which hook to use.  And I believe before-save-hook is always the better
  choice here.

> (add-to-list 'safe-local-eval-forms ...)
> There's also the long-standing Todo item to create a "diff-list" custom
> type http://debbugs.gnu.org/7812, and use it for such things.

Indeed for safe-local-eval-forms a simple diff-list would be sufficient
since safe-local-eval-forms is really a set (implemented as a list) so
we don't need to worry about ordering/repetitions/...
Could someone provide a patch for that?


        Stefan





  reply	other threads:[~2012-08-23 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 18:35 Add delete-trailing-whitespace to list of safe eval forms Mathieu Boespflug
2012-08-22 13:18 ` bug#12259: [Mathieu Boespflug] " Stefan Monnier
2012-08-22 14:36   ` bug#12259: " Stefan Monnier
2012-08-22 16:24     ` Glenn Morris
2012-08-23 11:51       ` Stefan Monnier [this message]
2012-08-22 16:27     ` Mathieu Boespflug
2012-08-23 12:19       ` Stefan Monnier
2012-08-23 13:00         ` Mathieu Boespflug

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=jwvy5l5u919.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12259@debbugs.gnu.org \
    --cc=mboes@tweag.net \
    --cc=rgm@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.