GNU bug report logs -
#12259
[Mathieu Boespflug] Add delete-trailing-whitespace to list of safe eval forms
Previous Next
Full log
Message #17 received at 12259 <at> debbugs.gnu.org (full text, mbox):
>> 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
This bug report was last modified 12 years and 272 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.