* turn off safe-local-variable-values checking @ 2006-03-30 11:27 Shug Boabby 2006-03-31 17:28 ` Richard Stallman 2006-03-31 20:58 ` Stefan Monnier 0 siblings, 2 replies; 45+ messages in thread From: Shug Boabby @ 2006-03-30 11:27 UTC (permalink / raw) As i'm sure you all know: the security procedures for local variables were recently beefed up. Now, if a user ever wishes to store local variables in a file, they must manually accept each variable on opening (or store them in .emacs). This actually really bugs me, and I'd really rather live with the security risk... is there a way to turn this behaviour off by default for all files? I cannot find any documentation on the new feature and an Emacs Wiki search for the above mentioned variable gives me 1248 results. Apologies if you think this is to the wrong list, my understanding is that emacs.help is really only for officially released versions of emacs. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-03-30 11:27 turn off safe-local-variable-values checking Shug Boabby @ 2006-03-31 17:28 ` Richard Stallman 2006-03-31 20:58 ` Stefan Monnier 1 sibling, 0 replies; 45+ messages in thread From: Richard Stallman @ 2006-03-31 17:28 UTC (permalink / raw) Cc: emacs-devel This actually really bugs me, and I'd really rather live with the security risk... is there a way to turn this behaviour off by default for all files? I cannot find any documentation on the new feature and an Emacs Wiki search for the above mentioned variable gives me 1248 results. We don't have an option to do this, and I am not sure we should add one, but it should be pretty easy for you to edit the code to do what you want. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-03-30 11:27 turn off safe-local-variable-values checking Shug Boabby 2006-03-31 17:28 ` Richard Stallman @ 2006-03-31 20:58 ` Stefan Monnier 2006-04-03 0:12 ` Shug Boabby 2006-04-03 0:13 ` Shug Boabby 1 sibling, 2 replies; 45+ messages in thread From: Stefan Monnier @ 2006-03-31 20:58 UTC (permalink / raw) Cc: emacs-devel > As i'm sure you all know: the security procedures for local variables > were recently beefed up. Now, if a user ever wishes to store local > variables in a file, they must manually accept each variable on > opening (or store them in .emacs). Right, they should not only add those vars's values in the corresponding files, but also add them in their .emacs to safe-local-variable-values. I don't see why it should be such a big deal. Can you provide a scenario where it's really bothersome? Stefan ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-03-31 20:58 ` Stefan Monnier @ 2006-04-03 0:12 ` Shug Boabby 2006-04-03 0:49 ` Dan Nicolaescu 2006-04-03 2:25 ` turn off safe-local-variable-values checking Stefan Monnier 2006-04-03 0:13 ` Shug Boabby 1 sibling, 2 replies; 45+ messages in thread From: Shug Boabby @ 2006-04-03 0:12 UTC (permalink / raw) Cc: emacs-devel On 31/03/06, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > Can you provide a scenario where it's really bothersome? oh... try opening up each section file of your thesis (each file containing 3 or 4 AUCTeX variables), across several computers, and getting that bloody box pop up and ask 4X questions!! (where X are the number of files i have in desktop save) ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 0:12 ` Shug Boabby @ 2006-04-03 0:49 ` Dan Nicolaescu 2006-04-03 0:56 ` David Kastrup 2006-04-03 2:25 ` turn off safe-local-variable-values checking Stefan Monnier 1 sibling, 1 reply; 45+ messages in thread From: Dan Nicolaescu @ 2006-04-03 0:49 UTC (permalink / raw) Cc: emacs-devel "Shug Boabby" <shug.boabby@gmail.com> writes: > On 31/03/06, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > > Can you provide a scenario where it's really bothersome? > > oh... try opening up each section file of your thesis (each file > containing 3 or 4 AUCTeX variables), across several computers, and > getting that bloody box pop up and ask 4X questions!! (where X are the > number of files i have in desktop save) Try a newer versions of AUCTeX, the warning is disabled by default. I am not sure what version started doing that, I use the CVS. Yeah, it would be great if AUCTeX was integrated in emacs, so you won't need to install it separately... ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 0:49 ` Dan Nicolaescu @ 2006-04-03 0:56 ` David Kastrup 2006-04-03 1:16 ` Dan Nicolaescu 0 siblings, 1 reply; 45+ messages in thread From: David Kastrup @ 2006-04-03 0:56 UTC (permalink / raw) Cc: Shug Boabby, emacs-devel Dan Nicolaescu <dann@ics.uci.edu> writes: > "Shug Boabby" <shug.boabby@gmail.com> writes: > > > On 31/03/06, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > > > Can you provide a scenario where it's really bothersome? > > > > oh... try opening up each section file of your thesis (each file > > containing 3 or 4 AUCTeX variables), across several computers, and > > getting that bloody box pop up and ask 4X questions!! (where X are the > > number of files i have in desktop save) > > Try a newer versions of AUCTeX, the warning is disabled by > default. I am not sure what version started doing that, I use the > CVS. > > Yeah, it would be great if AUCTeX was integrated in emacs, so you > won't need to install it separately... It is still missing copyright assignments for that. If somebody would volunteer to invest more time than I currently manage for hunting people down and asking them, this would be appreciated. Don't hold your breath for this to finish, but it is something that deserves better progress than I have made so far. Also I am not sure that the release schedule of Emacs and AUCTeX are really compatible: not everybody using AUCTeX takes his Emacs fresh from CVS. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 0:56 ` David Kastrup @ 2006-04-03 1:16 ` Dan Nicolaescu 2006-04-03 1:34 ` David Kastrup 0 siblings, 1 reply; 45+ messages in thread From: Dan Nicolaescu @ 2006-04-03 1:16 UTC (permalink / raw) Cc: emacs-devel David Kastrup <dak@gnu.org> writes: > Dan Nicolaescu <dann@ics.uci.edu> writes: > > > "Shug Boabby" <shug.boabby@gmail.com> writes: > > > > > On 31/03/06, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > > > > Can you provide a scenario where it's really bothersome? > > > > > > oh... try opening up each section file of your thesis (each file > > > containing 3 or 4 AUCTeX variables), across several computers, and > > > getting that bloody box pop up and ask 4X questions!! (where X are the > > > number of files i have in desktop save) > > > > Try a newer versions of AUCTeX, the warning is disabled by > > default. I am not sure what version started doing that, I use the > > CVS. > > > > Yeah, it would be great if AUCTeX was integrated in emacs, so you > > won't need to install it separately... > > It is still missing copyright assignments for that. If somebody would > volunteer to invest more time than I currently manage for hunting > people down and asking them, this would be appreciated. Don't hold > your breath for this to finish, but it is something that deserves > better progress than I have made so far. Hopefully someone can help you with the copyrights, maybe posting a message about this would help. Can you say what the status is right now? Is the core OK ? (meaning the latex.el, tex*.el files) The style/* files are not that crucial, and they could be reimplemented if needed. > Also I am not sure that the release schedule of Emacs and AUCTeX are > really compatible: not everybody using AUCTeX takes his Emacs fresh > from CVS. True, but the main problem that I have seen is that a lot of emacs users not even aware that AUCTeX exists... WRT the release schedule, cc-mode and gnus seem to manage separate releases and being integrated... ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 1:16 ` Dan Nicolaescu @ 2006-04-03 1:34 ` David Kastrup 2006-04-04 17:38 ` AUCTex (was: turn off safe-local-variable-values checking) Dan Nicolaescu 0 siblings, 1 reply; 45+ messages in thread From: David Kastrup @ 2006-04-03 1:34 UTC (permalink / raw) Cc: emacs-devel Dan Nicolaescu <dann@ics.uci.edu> writes: > David Kastrup <dak@gnu.org> writes: > > > Dan Nicolaescu <dann@ics.uci.edu> writes: > > > > > Yeah, it would be great if AUCTeX was integrated in emacs, so you > > > won't need to install it separately... > > > > It is still missing copyright assignments for that. If somebody would > > volunteer to invest more time than I currently manage for hunting > > people down and asking them, this would be appreciated. Don't hold > > your breath for this to finish, but it is something that deserves > > better progress than I have made so far. > > Hopefully someone can help you with the copyrights, maybe posting a > message about this would help. > Can you say what the status is right now? The three most fundamental contributors (who have been maintainers at one time) have all agreed to a copyright assignment, but I've only secured two: the third does not appear to respond to Email. > Is the core OK ? (meaning the latex.el, tex*.el files) Definitely not. Even when the fundamental contributors will be secured, there will be dozens of other people who should be rounded up. Most of their contributions could be replaced, however, should the need arise. > The style/* files are not that crucial, and they could be > reimplemented if needed. Possibly. The newer style files have mostly been done by people with assignments: we don't accept new contributions without one. > > Also I am not sure that the release schedule of Emacs and AUCTeX > > are really compatible: not everybody using AUCTeX takes his > > Emacs fresh from CVS. > > True, but the main problem that I have seen is that a lot of emacs > users not even aware that AUCTeX exists... I think the coverage among readers of comp.text.tex is pretty good. We are also making it reasonably easy for system administrators to have AUCTeX active by default on their, while individual users can easily customize it off again for some or all TeX-related modes if they really want to. This also helps: most people accept the site defaults, and having an AUCTeX that can be turned off again (for the sake of Emacs' default modes) makes activation by default a reasonable site policy. > WRT the release schedule, cc-mode and gnus seem to manage separate > releases and being integrated... Somewhat. But it leads to people using old gnus. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 45+ messages in thread
* AUCTex (was: turn off safe-local-variable-values checking) 2006-04-03 1:34 ` David Kastrup @ 2006-04-04 17:38 ` Dan Nicolaescu 2006-04-04 21:12 ` AUCTex David Kastrup 0 siblings, 1 reply; 45+ messages in thread From: Dan Nicolaescu @ 2006-04-04 17:38 UTC (permalink / raw) Cc: emacs-devel David Kastrup <dak@gnu.org> writes: > Dan Nicolaescu <dann@ics.uci.edu> writes: > > > David Kastrup <dak@gnu.org> writes: > > > > > Dan Nicolaescu <dann@ics.uci.edu> writes: > > True, but the main problem that I have seen is that a lot of emacs > > users not even aware that AUCTeX exists... > > I think the coverage among readers of comp.text.tex is pretty good. That might be true, but readers of comp.text.tex are a small minority (and probably the most technically astute one) among TeX users. Well, sadly newsgroup readers are a small minority in general nowadays. So I think my original point still stands. > We are also making it reasonably easy for system administrators to > have AUCTeX active by default on their, while individual users can > easily customize it off again for some or all TeX-related modes if > they really want to. This also helps: most people accept the site > defaults, and having an AUCTeX that can be turned off again (for the > sake of Emacs' default modes) makes activation by default a reasonable > site policy. That is nice. Unfortunately of the 6 sites that I personally know about, none has AUCTeX installed :-( Anyway, the main question is: Do AUCTeX maintainers want to integrate it in Emacs anytime soon? (Or at all?) IMHO having AUCTeX integrated would be beneficial to both AUCTeX as it would reach a wider audience, and also to Emacs as it would help users better manage their tex documents. I am sure that if there's a strong desire to integrate AUCTeX, you will get some help. Thanks --dan ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: AUCTex 2006-04-04 17:38 ` AUCTex (was: turn off safe-local-variable-values checking) Dan Nicolaescu @ 2006-04-04 21:12 ` David Kastrup 2006-04-05 19:41 ` AUCTex Dan Nicolaescu 0 siblings, 1 reply; 45+ messages in thread From: David Kastrup @ 2006-04-04 21:12 UTC (permalink / raw) Cc: emacs-devel Dan Nicolaescu <dann@ics.uci.edu> writes: > Anyway, the main question is: Do AUCTeX maintainers want to > integrate it in Emacs anytime soon? (Or at all?) I answered that question already in the previous post, but you snipped the reply. AUCTeX is not going to be integrated into Emacs anytime soon due to outstanding copyright assignments, and the process of collecting them is progressing rather slowly. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: AUCTex 2006-04-04 21:12 ` AUCTex David Kastrup @ 2006-04-05 19:41 ` Dan Nicolaescu 2006-04-05 19:53 ` AUCTex David Kastrup 0 siblings, 1 reply; 45+ messages in thread From: Dan Nicolaescu @ 2006-04-05 19:41 UTC (permalink / raw) Cc: emacs-devel David Kastrup <dak@gnu.org> writes: > Dan Nicolaescu <dann@ics.uci.edu> writes: > > > Anyway, the main question is: Do AUCTeX maintainers want to > > integrate it in Emacs anytime soon? (Or at all?) > > I answered that question already in the previous post, but you snipped > the reply. AUCTeX is not going to be integrated into Emacs anytime > soon due to outstanding copyright assignments, and the process of > collecting them is progressing rather slowly. So what is the way forward for this? What can be done to improve the situation? Would distributing AUCTeX like leim was distributed in previous emacs versions help? (i.e. leim distributed separately, but it could be unpacked in the emacs source tree and compiled and installed together). Just an idea... ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: AUCTex 2006-04-05 19:41 ` AUCTex Dan Nicolaescu @ 2006-04-05 19:53 ` David Kastrup 0 siblings, 0 replies; 45+ messages in thread From: David Kastrup @ 2006-04-05 19:53 UTC (permalink / raw) Cc: emacs-devel Dan Nicolaescu <dann@ics.uci.edu> writes: > David Kastrup <dak@gnu.org> writes: > > > Dan Nicolaescu <dann@ics.uci.edu> writes: > > > > > Anyway, the main question is: Do AUCTeX maintainers want to > > > integrate it in Emacs anytime soon? (Or at all?) > > > > I answered that question already in the previous post, but you snipped > > the reply. AUCTeX is not going to be integrated into Emacs anytime > > soon due to outstanding copyright assignments, and the process of > > collecting them is progressing rather slowly. > > So what is the way forward for this? > What can be done to improve the situation? Basically collecting assignments. > Would distributing AUCTeX like leim was distributed in previous > emacs versions help? (i.e. leim distributed separately, but it could > be unpacked in the emacs source tree and compiled and installed > together). Just an idea... AUCTeX is a separate project and works with a variety of Emacsen. It is also released more often than every 5 years or so. I don't think that at the current point of time there is much room for improvement. It might be possible to create a tarball for dropping into an Emacs tree before compiling and autoload generation (which is somewhat similar to what we do to create an XEmacs package). But I don't see it change the situation much. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 0:12 ` Shug Boabby 2006-04-03 0:49 ` Dan Nicolaescu @ 2006-04-03 2:25 ` Stefan Monnier 2006-04-03 2:58 ` Johan Bockgård 2006-04-03 14:44 ` Andreas Schwab 1 sibling, 2 replies; 45+ messages in thread From: Stefan Monnier @ 2006-04-03 2:25 UTC (permalink / raw) Cc: emacs-devel >> Can you provide a scenario where it's really bothersome? > oh... try opening up each section file of your thesis (each file > containing 3 or 4 AUCTeX variables), across several computers, and > getting that bloody box pop up and ask 4X questions!! (where X are the > number of files i have in desktop save) How many different variable/value pairs are we talking about? The assumption is that you're going to add those to your safe-local-variable-values list in your .emacs so that the question won't be asked. Or if the variables are safe, they should simply be marked as such by the package's author. Stefan ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 2:25 ` turn off safe-local-variable-values checking Stefan Monnier @ 2006-04-03 2:58 ` Johan Bockgård 2006-04-03 13:51 ` Richard Stallman 2006-04-10 18:25 ` Richard Stallman 2006-04-03 14:44 ` Andreas Schwab 1 sibling, 2 replies; 45+ messages in thread From: Johan Bockgård @ 2006-04-03 2:58 UTC (permalink / raw) Stefan Monnier <monnier@iro.umontreal.ca> writes: > The assumption is that you're going to add those to your > safe-local-variable-values list in your .emacs so that the question > won't be asked. Or if the variables are safe, they should simply be > marked as such by the package's author. Emacs warns about some files that are included in Emacs itself, namely table.el allout.el ediff-diff.el ediff-init.el ediff-merg.el ediff-mult.el ediff-ptch.el ediff-util.el ediff-vers.el ediff-wind.el ediff.el -- Johan Bockgård ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 2:58 ` Johan Bockgård @ 2006-04-03 13:51 ` Richard Stallman 2006-04-10 18:25 ` Richard Stallman 1 sibling, 0 replies; 45+ messages in thread From: Richard Stallman @ 2006-04-03 13:51 UTC (permalink / raw) Cc: emacs-devel Emacs warns about some files that are included in Emacs itself, namely table.el allout.el ediff*.el This is useful--I presume these bindings are safe, so we should define predicates for the variables they bind. Would someone like to do that now, and ack? ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 2:58 ` Johan Bockgård 2006-04-03 13:51 ` Richard Stallman @ 2006-04-10 18:25 ` Richard Stallman 2006-04-12 18:13 ` Stuart D. Herring 2006-04-12 19:57 ` turn off safe-local-variable-values checking Stuart D. Herring 1 sibling, 2 replies; 45+ messages in thread From: Richard Stallman @ 2006-04-10 18:25 UTC (permalink / raw) Cc: emacs-devel [I sent this message a week ago but did not get a response.] Emacs warns about some files that are included in Emacs itself, namely table.el allout.el ediff*.el This is useful--I presume these bindings are safe, so we should define predicates for the variables they bind. Would someone like to do that now, and ack? ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-10 18:25 ` Richard Stallman @ 2006-04-12 18:13 ` Stuart D. Herring 2006-04-13 3:20 ` Richard Stallman 2006-04-12 19:57 ` turn off safe-local-variable-values checking Stuart D. Herring 1 sibling, 1 reply; 45+ messages in thread From: Stuart D. Herring @ 2006-04-12 18:13 UTC (permalink / raw) Cc: emacs-devel > Emacs warns about some files that are included in Emacs itself, namely > > table.el > allout.el > ediff*.el > > This is useful--I presume these bindings are safe, > so we should define predicates for the variables they bind. > > Would someone like to do that now, and ack? I'll do this. But a question, first: the docs for `enable-local-variables' says (since 1998) that `normal-mode' called interactively always obeys local variable specifications, when it in fact only acts as if `enable-local-variables' is t, which obeys only safe variables automatically. Should the doc be updated? Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-12 18:13 ` Stuart D. Herring @ 2006-04-13 3:20 ` Richard Stallman 2006-04-13 15:04 ` Stuart D. Herring 0 siblings, 1 reply; 45+ messages in thread From: Richard Stallman @ 2006-04-13 3:20 UTC (permalink / raw) Cc: emacs-devel I'll do this. But a question, first: the docs for `enable-local-variables' says (since 1998) that `normal-mode' called interactively always obeys local variable specifications, when it in fact only acts as if `enable-local-variables' is t, which obeys only safe variables automatically. Should the doc be updated? I think normal-mode, when called manually, should always obey all the file local variables. But what do others think? ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-13 3:20 ` Richard Stallman @ 2006-04-13 15:04 ` Stuart D. Herring 2006-04-16 2:09 ` M-x normal-mode and local variables Richard Stallman 0 siblings, 1 reply; 45+ messages in thread From: Stuart D. Herring @ 2006-04-13 15:04 UTC (permalink / raw) Cc: emacs-devel > I think normal-mode, when called manually, should always obey all the > file local variables. But what do others think? I've been opposed to automatic file locals in the past, so I may be biased. But my thoughts are that normal-mode should do exactly what find-file does automatically (so you can use it if you change the local variables, or add a #! line, etc., without security concerns), and then if we really want to have a "force everything", use C-u M-x normal-mode. (normal-mode does not currently use a prefix argument.) Another (minor) reason it's useful to call normal-mode without forcing all variables is that it sets fundamental-mode if the current buffer just inherited a mode (via default-major-mode being nil). Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. ^ permalink raw reply [flat|nested] 45+ messages in thread
* M-x normal-mode and local variables 2006-04-13 15:04 ` Stuart D. Herring @ 2006-04-16 2:09 ` Richard Stallman 2006-04-16 12:22 ` Stefan Monnier 0 siblings, 1 reply; 45+ messages in thread From: Richard Stallman @ 2006-04-16 2:09 UTC (permalink / raw) I'm interested in hearing more opinions about whether M-x normal-mode should query, or just install all local variables. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: M-x normal-mode and local variables 2006-04-16 2:09 ` M-x normal-mode and local variables Richard Stallman @ 2006-04-16 12:22 ` Stefan Monnier 2006-04-17 17:56 ` Richard Stallman 0 siblings, 1 reply; 45+ messages in thread From: Stefan Monnier @ 2006-04-16 12:22 UTC (permalink / raw) Cc: emacs-devel > I'm interested in hearing more opinions about whether M-x normal-mode > should query, or just install all local variables. I think using M-x normal-mode is sufficiently uncommon that we shouldn't try too hard to streamline it. So I vote to have it query. Especially since there's no guarantee that the user actually checked the local variables before calling M-x normal-mode, so blindly obeying the local variables could be dangerous in some scenarios. After all, if the query is annoying, the answer is not to make M-x normal-mode less interactive but to add the relevant var/val pairs to safe-local-variable-values. Stefan ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: M-x normal-mode and local variables 2006-04-16 12:22 ` Stefan Monnier @ 2006-04-17 17:56 ` Richard Stallman 0 siblings, 0 replies; 45+ messages in thread From: Richard Stallman @ 2006-04-17 17:56 UTC (permalink / raw) Cc: emacs-devel I think using M-x normal-mode is sufficiently uncommon that we shouldn't try too hard to streamline it. So I vote to have it query. Especially since there's no guarantee that the user actually checked the local variables before calling M-x normal-mode, so blindly obeying the local variables could be dangerous in some scenarios. That is a significant point. I would still like to hear what others have to say. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-10 18:25 ` Richard Stallman 2006-04-12 18:13 ` Stuart D. Herring @ 2006-04-12 19:57 ` Stuart D. Herring 2007-03-01 0:58 ` Stuart D. Herring 1 sibling, 1 reply; 45+ messages in thread From: Stuart D. Herring @ 2006-04-12 19:57 UTC (permalink / raw) Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 805 bytes --] > table.el > allout.el > ediff*.el > > This is useful--I presume these bindings are safe, > so we should define predicates for the variables they bind. > > Would someone like to do that now, and ack? Interesting: each of those three files required a different approach. I added predicates for time-stamp.el's local variables, putting reasonable limits on the integers. Allout just needed to autoload its already-present safe-local declaration. And ediff was using part of edebug which could really be used for evil, so I wrote a check for non-evil use and added that to the code for symbol properties. Patch attached, natch. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. [-- Attachment #2: local-variables.patch --] [-- Type: application/octet-stream, Size: 6711 bytes --] ? local-variables.patch Index: lisp/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.9390 diff -a -c -r1.9390 ChangeLog *** lisp/ChangeLog 12 Apr 2006 05:11:12 -0000 1.9390 --- lisp/ChangeLog 12 Apr 2006 19:55:17 -0000 *************** *** 1,3 **** --- 1,18 ---- + 2006-04-12 Davis Herring <herring@lanl.gov> + + * files.el: Add predicates for time-stamp.el's file-local + variables (here, since it's never automatically loaded). Remove + lingering `string-or-null' let-binding. + (hack-one-local-variable-eval-safep): Recognize + `edebug-form-spec' for `put', but only if it passes + `edebug-basic-spec'. Generalize `put' handling. + + * emacs-lisp/edebug.el (edebug-basic-spec): New function for + vetting file-local form specs. + + * allout.el (allout-layout): Autoload its `safe-local-variable' + property. + 2006-04-12 Stefan Monnier <monnier@iro.umontreal.ca> * progmodes/perl-mode.el (perl-indent-new-calculate): Index: lisp/allout.el =================================================================== RCS file: /sources/emacs/emacs/lisp/allout.el,v retrieving revision 1.70 diff -a -c -r1.70 allout.el *** lisp/allout.el 15 Mar 2006 03:14:15 -0000 1.70 --- lisp/allout.el 12 Apr 2006 19:55:18 -0000 *************** *** 666,671 **** --- 666,672 ---- `allout-layout' can additionally have the value `t', in which case the value of `allout-default-layout' is used.") (make-variable-buffer-local 'allout-layout) + ;;;###autoload (put 'allout-layout 'safe-local-variable t) ;;;_ : Topic header format Index: lisp/files.el =================================================================== RCS file: /sources/emacs/emacs/lisp/files.el,v retrieving revision 1.825 diff -a -c -r1.825 files.el *** lisp/files.el 11 Apr 2006 17:57:34 -0000 1.825 --- lisp/files.el 12 Apr 2006 19:55:18 -0000 *************** *** 2343,2371 **** ;; For variables defined in the C source code the declaration should go here: ;; FIXME: Some variables should be moved according to the rules above. ! (let ((string-or-null (lambda (a) (or (stringp a) (null a))))) ! (eval ! `(mapc (lambda (pair) ! (put (car pair) 'safe-local-variable (cdr pair))) ! '((byte-compile-dynamic . t) ! (byte-compile-dynamic-docstrings . t) ! (byte-compile-warnings . t) ! (c-basic-offset . integerp) ! (c-file-style . stringp) ! (c-indent-level . integerp) ! (comment-column . integerp) ! (compile-command . string-or-null-p) ! (fill-column . integerp) ! (fill-prefix . string-or-null-p) ! (indent-tabs-mode . t) ! (kept-new-versions . integerp) ! (left-margin . t) ! (no-byte-compile . t) ! (no-update-autoloads . t) ! (outline-regexp . string-or-null-p) ! (tab-width . integerp) ;; C source code ! (truncate-lines . t) ;; C source code ! (version-control . t))))) (put 'c-set-style 'safe-local-eval-function t) --- 2343,2380 ---- ;; For variables defined in the C source code the declaration should go here: ;; FIXME: Some variables should be moved according to the rules above. ! (eval ! `(mapc (lambda (pair) ! (put (car pair) 'safe-local-variable (cdr pair))) ! '((byte-compile-dynamic . t) ! (byte-compile-dynamic-docstrings . t) ! (byte-compile-warnings . t) ! (c-basic-offset . integerp) ! (c-file-style . stringp) ! (c-indent-level . integerp) ! (comment-column . integerp) ! (compile-command . string-or-null-p) ! (fill-column . integerp) ! (fill-prefix . string-or-null-p) ! (indent-tabs-mode . t) ! (kept-new-versions . integerp) ! (left-margin . t) ! (no-byte-compile . t) ! (no-update-autoloads . t) ! (outline-regexp . string-or-null-p) ! (tab-width . integerp) ;; C source code ! (time-stamp-inserts-lines . t) ! (time-stamp-line-limit . (lambda (val) (and (integerp val) ! (not (zerop val)) ! (<= (abs val) 1000)))) ! (time-stamp-count . (lambda (val) (and (integerp val) ! (<= val 100)))) ! (time-stamp-end . stringp) ! (time-stamp-format . stringp) ! (time-stamp-pattern . string-or-null-p) ! (time-stamp-start . stringp) ! (truncate-lines . t) ;; C source code ! (version-control . t)))) (put 'c-set-style 'safe-local-eval-function t) *************** *** 2689,2700 **** (and (eq (car exp) 'put) (hack-one-local-variable-quotep (nth 1 exp)) (hack-one-local-variable-quotep (nth 2 exp)) ! (memq (nth 1 (nth 2 exp)) ! '(lisp-indent-hook)) ! ;; Only allow safe values of lisp-indent-hook; ! ;; not functions. ! (or (numberp (nth 3 exp)) ! (equal (nth 3 exp) ''defun))) ;; Allow expressions that the user requested. (member exp safe-local-eval-forms) ;; Certain functions can be allowed with safe arguments --- 2698,2711 ---- (and (eq (car exp) 'put) (hack-one-local-variable-quotep (nth 1 exp)) (hack-one-local-variable-quotep (nth 2 exp)) ! (let ((prop (nth 1 (nth 2 exp))) (val (nth 3 exp))) ! (cond ((eq prop 'lisp-indent-hook) ! ;; Only allow safe values of lisp-indent-hook; ! ;; not functions. ! (or (numberp val) (equal val ''defun))) ! ((eq prop 'edebug-form-spec) ! ;; Only allow indirect form specs. ! (edebug-basic-spec val))))) ;; Allow expressions that the user requested. (member exp safe-local-eval-forms) ;; Certain functions can be allowed with safe arguments Index: lisp/emacs-lisp/edebug.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/edebug.el,v retrieving revision 3.88 diff -a -c -r3.88 edebug.el *** lisp/emacs-lisp/edebug.el 3 Mar 2006 11:55:43 -0000 3.88 --- lisp/emacs-lisp/edebug.el 12 Apr 2006 19:55:19 -0000 *************** *** 258,263 **** --- 258,277 ---- edebug-form-spec )) + ;;;###autoload + (defun edebug-basic-spec (spec) + "Return t if SPEC uses only extant spec symbols. + An extant spec symbol is a symbol that is not a function and has a + `edebug-form-spec' property." + (cond ((listp spec) + (catch 'basic + (while spec + (unless (edebug-basic-spec (car spec)) (throw 'basic nil)) + (setq spec (cdr spec))) + t)) + ((symbolp spec) + (unless (functionp spec) (get spec 'edebug-form-spec))))) + ;;; Utilities ;; Define edebug-gensym - from old cl.el [-- Attachment #3: Type: text/plain, Size: 142 bytes --] _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-12 19:57 ` turn off safe-local-variable-values checking Stuart D. Herring @ 2007-03-01 0:58 ` Stuart D. Herring 2007-03-01 17:12 ` Chong Yidong 0 siblings, 1 reply; 45+ messages in thread From: Stuart D. Herring @ 2007-03-01 0:58 UTC (permalink / raw) To: Richard Stallman; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1686 bytes --] [Original thread is at http://lists.gnu.org/archive/html/emacs-devel/2006-04/msg00521.html.] I wrote, a long time ago: >> table.el >> allout.el >> ediff*.el >> >> This is useful--I presume these bindings are safe, >> so we should define predicates for the variables they bind. >> >> Would someone like to do that now, and ack? > > Interesting: each of those three files required a different approach. I > added predicates for time-stamp.el's local variables, putting reasonable > limits on the integers. Allout just needed to autoload its > already-present safe-local declaration. And ediff was using part of > edebug which could really be used for evil, so I wrote a check for > non-evil use and added that to the code for symbol properties. > > Patch attached, natch. Oddly, most but not all of my patch was applied. The part that wasn't later became horribly out of date because of conflicting changes, but I've resolved the conflicts several times and kept it alive, and am resubmitting just the part that was missed as a diff against current sources. See the ChangeLog entry: * files.el: Add predicates for time-stamp.el's file-local variables (here, since it's never automatically loaded). Assuming that there's nothing wrong with adding the rest of what was added then, please install? Davis PS - Sadly, I was reminded of these changes by the recent thread http://lists.gnu.org/archive/html/emacs-devel/2007-02/msg01042.html: there was an insidious bug in the part of my patch that was applied! -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. [-- Attachment #2: local-variables-2.patch --] [-- Type: application/octet-stream, Size: 1105 bytes --] Index: files.el =================================================================== RCS file: /sources/emacs/emacs/lisp/files.el,v retrieving revision 1.885 diff -c -r1.885 files.el *** files.el 25 Feb 2007 09:24:11 -0000 1.885 --- files.el 1 Mar 2007 00:20:43 -0000 *************** *** 2449,2454 **** --- 2448,2464 ---- (left-margin . integerp) ;; C source code (no-update-autoloads . booleanp) (tab-width . integerp) ;; C source code + (time-stamp-inserts-lines . t) + (time-stamp-line-limit . (lambda (val) + (and (integerp val) + (not (zerop val)) + (<= (abs val) 1000)))) + (time-stamp-count . (lambda (val) (and (integerp val) + (<= val 100)))) + (time-stamp-end . stringp) + (time-stamp-format . stringp) + (time-stamp-pattern . string-or-null-p) + (time-stamp-start . stringp) (truncate-lines . booleanp))) ;; C source code (put 'c-set-style 'safe-local-eval-function t) [-- Attachment #3: Type: text/plain, Size: 142 bytes --] _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2007-03-01 0:58 ` Stuart D. Herring @ 2007-03-01 17:12 ` Chong Yidong 2007-03-01 20:12 ` Stuart D. Herring 0 siblings, 1 reply; 45+ messages in thread From: Chong Yidong @ 2007-03-01 17:12 UTC (permalink / raw) To: herring; +Cc: Richard Stallman, emacs-devel "Stuart D. Herring" <herring@lanl.gov> writes: > Oddly, most but not all of my patch was applied. The part that wasn't > later became horribly out of date because of conflicting changes, but I've > resolved the conflicts several times and kept it alive, and am > resubmitting just the part that was missed as a diff against current > sources. See the ChangeLog entry: > > * files.el: Add predicates for time-stamp.el's file-local > variables (here, since it's never automatically loaded). The safe-local-variable declarations were moved to time-stamp.el as autoload forms. See the comment in files.el. So this patch is no longer necessary. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2007-03-01 17:12 ` Chong Yidong @ 2007-03-01 20:12 ` Stuart D. Herring 0 siblings, 0 replies; 45+ messages in thread From: Stuart D. Herring @ 2007-03-01 20:12 UTC (permalink / raw) To: Chong Yidong; +Cc: Richard Stallman, emacs-devel >> Oddly, most but not all of my patch was applied. The part that wasn't >> later became horribly out of date because of conflicting changes, but >> I've >> resolved the conflicts several times and kept it alive, and am >> resubmitting just the part that was missed as a diff against current >> sources. See the ChangeLog entry: >> >> * files.el: Add predicates for time-stamp.el's file-local >> variables (here, since it's never automatically loaded). > > The safe-local-variable declarations were moved to time-stamp.el as > autoload forms. See the comment in files.el. > > So this patch is no longer necessary. Ah, thanks. As it happens, I didn't use quite the same predicates as RMS did when he added those, but I don't think anything worse than an interruptible forever-long regexp search can result from those variables, so I guess it's not of any great importance. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 2:25 ` turn off safe-local-variable-values checking Stefan Monnier 2006-04-03 2:58 ` Johan Bockgård @ 2006-04-03 14:44 ` Andreas Schwab 2006-04-03 23:57 ` Richard Stallman 1 sibling, 1 reply; 45+ messages in thread From: Andreas Schwab @ 2006-04-03 14:44 UTC (permalink / raw) Cc: Shug Boabby, emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: > Or if the variables are safe, they should simply be marked as such by the > package's author. I have the following settings in my .emacs: (put 'left-margin 'safe-local-variable t) (put 'byte-compile-dynamic 'safe-local-variable t) (put 'byte-compile-warnings 'safe-local-variable t) I think they should generally be safe for all values and marked as such. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 14:44 ` Andreas Schwab @ 2006-04-03 23:57 ` Richard Stallman 2006-04-04 18:59 ` Andreas Schwab 2006-04-04 19:37 ` Reiner Steib 0 siblings, 2 replies; 45+ messages in thread From: Richard Stallman @ 2006-04-03 23:57 UTC (permalink / raw) Cc: shug.boabby, monnier, emacs-devel (put 'left-margin 'safe-local-variable t) (put 'byte-compile-dynamic 'safe-local-variable t) (put 'byte-compile-warnings 'safe-local-variable t) Would you please set them up as safe? ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 23:57 ` Richard Stallman @ 2006-04-04 18:59 ` Andreas Schwab 2006-04-04 19:37 ` Reiner Steib 1 sibling, 0 replies; 45+ messages in thread From: Andreas Schwab @ 2006-04-04 18:59 UTC (permalink / raw) Cc: emacs-devel Richard Stallman <rms@gnu.org> writes: > (put 'left-margin 'safe-local-variable t) > (put 'byte-compile-dynamic 'safe-local-variable t) > (put 'byte-compile-warnings 'safe-local-variable t) > > Would you please set them up as safe? Done. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-03 23:57 ` Richard Stallman 2006-04-04 18:59 ` Andreas Schwab @ 2006-04-04 19:37 ` Reiner Steib 2006-04-04 20:46 ` Stefan Monnier 2006-04-05 1:51 ` turn off safe-local-variable-values checking Richard Stallman 1 sibling, 2 replies; 45+ messages in thread From: Reiner Steib @ 2006-04-04 19:37 UTC (permalink / raw) On Tue, Apr 04 2006, Richard Stallman wrote: > (put 'left-margin 'safe-local-variable t) > (put 'byte-compile-dynamic 'safe-local-variable t) > (put 'byte-compile-warnings 'safe-local-variable t) > > Would you please set them up as safe? --- files.el 4 Apr 2006 18:58:48 -0000 1.821 +++ files.el 4 Apr 2006 19:28:08 -0000 @@ -2333,12 +2333,14 @@ (eval `(mapc (lambda (pair) (put (car pair) 'safe-local-variable (cdr pair))) - '((byte-compile-dynamic . t) + '((abbrev-mode . t) + (byte-compile-dynamic . t) (byte-compile-dynamic-docstrings . t) (byte-compile-warnings . t) (c-basic-offset . integerp) (c-file-style . stringp) (c-indent-level . integerp) + (colon-double-space . t) (comment-column . integerp) (compile-command . ,string-or-null) (fill-column . integerp) @@ -2355,6 +2357,11 @@ (page-delimiter . ,string-or-null) (paragraph-start . ,string-or-null) (paragraph-separate . ,string-or-null) + ;; textmode/reftex-vars.el + (reftex-fref-is-default . t) + (reftex-guess-label-type . t) + (reftex-level-indent . integerp) + (reftex-vref-is-default . t) (sentence-end . ,string-or-null) (sentence-end-double-space . t) (tab-width . integerp) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-04 19:37 ` Reiner Steib @ 2006-04-04 20:46 ` Stefan Monnier 2006-04-05 8:19 ` Reiner Steib 2006-04-05 1:51 ` turn off safe-local-variable-values checking Richard Stallman 1 sibling, 1 reply; 45+ messages in thread From: Stefan Monnier @ 2006-04-04 20:46 UTC (permalink / raw) > + ;; textmode/reftex-vars.el > + (reftex-fref-is-default . t) > + (reftex-guess-label-type . t) > + (reftex-level-indent . integerp) > + (reftex-vref-is-default . t) I think these settings belong in reftex*.el rather than in files.el. Stefan ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-04 20:46 ` Stefan Monnier @ 2006-04-05 8:19 ` Reiner Steib 2006-04-05 13:01 ` Stefan Monnier 0 siblings, 1 reply; 45+ messages in thread From: Reiner Steib @ 2006-04-05 8:19 UTC (permalink / raw) On Tue, Apr 04 2006, Stefan Monnier wrote: >> + ;; textmode/reftex-vars.el >> + (reftex-fref-is-default . t) >> + (reftex-guess-label-type . t) >> + (reftex-level-indent . integerp) >> + (reftex-vref-is-default . t) > > I think these settings belong in reftex*.el rather than in files.el. The comment in `files.el' says it should be set there for variables defined by minor modes and `reftex-mode' is a minor mode: ;; For variables defined by minor modes, put the safety declarations ;; here, not in the file defining the minor mode (when Emacs visits a ;; file specifying that local variable, the minor mode file may not be ;; loaded yet). For variables defined by major modes, the safety ;; declarations can go into the major mode's file, since that will be ;; loaded before file variables are processed. CMIIW, please. And maybe clarify the comment if I was missing something. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-05 8:19 ` Reiner Steib @ 2006-04-05 13:01 ` Stefan Monnier 2006-04-05 15:51 ` Chong Yidong 2006-04-06 1:11 ` Richard Stallman 0 siblings, 2 replies; 45+ messages in thread From: Stefan Monnier @ 2006-04-05 13:01 UTC (permalink / raw) > ;; For variables defined by minor modes, put the safety declarations > ;; here, not in the file defining the minor mode (when Emacs visits a > ;; file specifying that local variable, the minor mode file may not be > ;; loaded yet). For variables defined by major modes, the safety > ;; declarations can go into the major mode's file, since that will be > ;; loaded before file variables are processed. Interesting. I'd have to disagree: put it/them in the minor mode's file, but with an ;;;###autoload cookie. I think it's important to put those safe-local-variable properties at the same spot as where the variable is declared. Stefan ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-05 13:01 ` Stefan Monnier @ 2006-04-05 15:51 ` Chong Yidong 2006-04-06 1:11 ` Richard Stallman 1 sibling, 0 replies; 45+ messages in thread From: Chong Yidong @ 2006-04-05 15:51 UTC (permalink / raw) Cc: emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: >> ;; For variables defined by minor modes, put the safety declarations >> ;; here, not in the file defining the minor mode (when Emacs visits a >> ;; file specifying that local variable, the minor mode file may not be >> ;; loaded yet). For variables defined by major modes, the safety >> ;; declarations can go into the major mode's file, since that will be >> ;; loaded before file variables are processed. > > Interesting. I'd have to disagree: put it/them in the minor mode's file, > but with an ;;;###autoload cookie. Yes, good idea. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-05 13:01 ` Stefan Monnier 2006-04-05 15:51 ` Chong Yidong @ 2006-04-06 1:11 ` Richard Stallman 2006-04-06 15:40 ` Additional safe-local-variables (was: turn off safe-local-variable-values checking) Reiner Steib 1 sibling, 1 reply; 45+ messages in thread From: Richard Stallman @ 2006-04-06 1:11 UTC (permalink / raw) Cc: emacs-devel > ;; For variables defined by minor modes, put the safety declarations > ;; here, not in the file defining the minor mode (when Emacs visits a > ;; file specifying that local variable, the minor mode file may not be > ;; loaded yet). For variables defined by major modes, the safety > ;; declarations can go into the major mode's file, since that will be > ;; loaded before file variables are processed. Interesting. I'd have to disagree: put it/them in the minor mode's file, but with an ;;;###autoload cookie. That seems like a good method to achieve the goal (which is that the property should always be there). Would you please edit the comment? I think it's important to put those safe-local-variable properties at the same spot as where the variable is declared. I agree, that will be better for maintenance, in case a change in the meaning of the variable calls for a change in the property. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Additional safe-local-variables (was: turn off safe-local-variable-values checking) 2006-04-06 1:11 ` Richard Stallman @ 2006-04-06 15:40 ` Reiner Steib 2006-04-06 17:51 ` Richard Stallman 0 siblings, 1 reply; 45+ messages in thread From: Reiner Steib @ 2006-04-06 15:40 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel On Thu, Apr 06 2006, Richard Stallman wrote: > Interesting. I'd have to disagree: put it/them in the minor mode's file, > but with an ;;;###autoload cookie. > > That seems like a good method to achieve the goal > (which is that the property should always be there). > Would you please edit the comment? > > I think it's important to put those safe-local-variable properties at the > same spot as where the variable is declared. > > I agree, that will be better for maintenance, in case a change in the meaning > of the variable calls for a change in the property. I've done that for the new variable I've suggested and for some other variable (I didn't have time to process all of the list), e.g.: ;;;###autoload(put 'paragraph-separate 'safe-local-variable 'stringp) `page-delimiter' and `paragraph-start' were marked with string-or-null whereas the custom type doesn't allow nil. I used stringp then. Feel free to adjust the autoloads or the defcustoms. Maybe it would make sense to introduce `string-or-null-p' to avoid using (lambda (a) (or (stringp a) (null a))) in the autoloads. BTW, wouldn't it be possible to integrate the safe-local-variable properties into defcustom? Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Additional safe-local-variables (was: turn off safe-local-variable-values checking) 2006-04-06 15:40 ` Additional safe-local-variables (was: turn off safe-local-variable-values checking) Reiner Steib @ 2006-04-06 17:51 ` Richard Stallman 2006-04-06 19:23 ` Additional safe-local-variables Reiner Steib 0 siblings, 1 reply; 45+ messages in thread From: Richard Stallman @ 2006-04-06 17:51 UTC (permalink / raw) Cc: monnier, emacs-devel Maybe it would make sense to introduce `string-or-null-p' to avoid using (lambda (a) (or (stringp a) (null a))) in the autoloads. Please do. BTW, wouldn't it be possible to integrate the safe-local-variable properties into defcustom? Yes, I think we should. We can have a keyword :safe whose value can be either t (all values permitted by the custom type are safe) or a predicate. When it is t, I think Emacs should really check that the local value fits the custom type. However, one inconvenience in using this is that safety specified in this way will only work once the defcustom is loaded. For minor modes, we will still need to do it differently (such as with a `put' call in an autoload cookie). ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Additional safe-local-variables 2006-04-06 17:51 ` Richard Stallman @ 2006-04-06 19:23 ` Reiner Steib 2006-04-07 2:19 ` Richard Stallman 0 siblings, 1 reply; 45+ messages in thread From: Reiner Steib @ 2006-04-06 19:23 UTC (permalink / raw) Cc: monnier, emacs-devel On Thu, Apr 06 2006, Richard Stallman wrote: > Maybe it would make sense to introduce `string-or-null-p' to avoid > using (lambda (a) (or (stringp a) (null a))) in the autoloads. > > Please do. I added it to `subr.el' in the "Misc. useful functions." part: (defun string-or-null-p (object) "Return t if OBJECT is a string or nil. Otherwise, return nil." (or (stringp object) (null object))) (Should it be `defun' or `defsubst'?) I also updated the comment about safe-local-variable declarations in `files.el'. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Additional safe-local-variables 2006-04-06 19:23 ` Additional safe-local-variables Reiner Steib @ 2006-04-07 2:19 ` Richard Stallman 2006-04-07 18:55 ` Reiner Steib 0 siblings, 1 reply; 45+ messages in thread From: Richard Stallman @ 2006-04-07 2:19 UTC (permalink / raw) Cc: monnier, emacs-devel I added it to `subr.el' in the "Misc. useful functions." part: (defun string-or-null-p (object) "Return t if OBJECT is a string or nil. Otherwise, return nil." (or (stringp object) (null object))) defun is best here, I think; we are not concerned about speed. Could you please add this to NEWS and the Lisp Manual? ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Additional safe-local-variables 2006-04-07 2:19 ` Richard Stallman @ 2006-04-07 18:55 ` Reiner Steib 2006-04-08 16:17 ` Richard Stallman 0 siblings, 1 reply; 45+ messages in thread From: Reiner Steib @ 2006-04-07 18:55 UTC (permalink / raw) Cc: monnier, emacs-devel On Fri, Apr 07 2006, Richard Stallman wrote: > I added it to `subr.el' in the "Misc. useful functions." part: > > (defun string-or-null-p (object) > "Return t if OBJECT is a string or nil. > Otherwise, return nil." > (or (stringp object) (null object))) > > defun is best here, I think; we are not concerned about speed. > > Could you please add this to NEWS and the Lisp Manual? I've added it under "General Lisp changes" in NEWS and in strings.texi (Predicates for Strings). I hope this makes sense. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Additional safe-local-variables 2006-04-07 18:55 ` Reiner Steib @ 2006-04-08 16:17 ` Richard Stallman 0 siblings, 0 replies; 45+ messages in thread From: Richard Stallman @ 2006-04-08 16:17 UTC (permalink / raw) Cc: monnier, emacs-devel I've added it under "General Lisp changes" in NEWS and in strings.texi (Predicates for Strings). I hope this makes sense. Yes, thanks. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-04 19:37 ` Reiner Steib 2006-04-04 20:46 ` Stefan Monnier @ 2006-04-05 1:51 ` Richard Stallman 2006-04-05 3:45 ` Miles Bader 1 sibling, 1 reply; 45+ messages in thread From: Richard Stallman @ 2006-04-05 1:51 UTC (permalink / raw) Cc: emacs-devel Does anyone else want to suggest some variables we should mark as safe? ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-05 1:51 ` turn off safe-local-variable-values checking Richard Stallman @ 2006-04-05 3:45 ` Miles Bader 2006-04-05 14:54 ` Richard Stallman 0 siblings, 1 reply; 45+ messages in thread From: Miles Bader @ 2006-04-05 3:45 UTC (permalink / raw) Cc: Reiner Steib, emacs-devel Richard Stallman <rms@gnu.org> writes: > Does anyone else want to suggest some variables we should mark as safe? paragraph-ignore-fill-prefix -miles -- Somebody has to do something, and it's just incredibly pathetic that it has to be us. -- Jerry Garcia ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-04-05 3:45 ` Miles Bader @ 2006-04-05 14:54 ` Richard Stallman 0 siblings, 0 replies; 45+ messages in thread From: Richard Stallman @ 2006-04-05 14:54 UTC (permalink / raw) Cc: Reiner.Steib, emacs-devel > Does anyone else want to suggest some variables we should mark as safe? paragraph-ignore-fill-prefix Please mark it. Someone made the point that it would be better to put these markings next to the definitions of the variables. Could you do it that way? ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: turn off safe-local-variable-values checking 2006-03-31 20:58 ` Stefan Monnier 2006-04-03 0:12 ` Shug Boabby @ 2006-04-03 0:13 ` Shug Boabby 1 sibling, 0 replies; 45+ messages in thread From: Shug Boabby @ 2006-04-03 0:13 UTC (permalink / raw) Cc: emacs-devel On 31/03/06, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > Right, they should not only add those vars's values in the corresponding > files, but also add them in their .emacs to safe-local-variable-values. > I don't see why it should be such a big deal. It actually really bothers me from an aesthetic point of view to have such specific details in my ~/.emacs. I pride myself on my ~/.emacs being hand-written and easy to edit... I don't like it when Emacs automatically adds values itself. I'd rather learn about how those variables effect my editing experience and add them myself after careful consideration. Tell me you don't agree? :-) If the opinion is that this behaviour is not to be disabled... may I suggest that the allowed local variables be stored in another (user definable) file in the same style as the ~/.abbrev_defs is not in the ~/.emacs? Or appended to .emacs.desktop... just keep it away from my previous ~/.emacs!!! ^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2007-03-01 20:12 UTC | newest] Thread overview: 45+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-03-30 11:27 turn off safe-local-variable-values checking Shug Boabby 2006-03-31 17:28 ` Richard Stallman 2006-03-31 20:58 ` Stefan Monnier 2006-04-03 0:12 ` Shug Boabby 2006-04-03 0:49 ` Dan Nicolaescu 2006-04-03 0:56 ` David Kastrup 2006-04-03 1:16 ` Dan Nicolaescu 2006-04-03 1:34 ` David Kastrup 2006-04-04 17:38 ` AUCTex (was: turn off safe-local-variable-values checking) Dan Nicolaescu 2006-04-04 21:12 ` AUCTex David Kastrup 2006-04-05 19:41 ` AUCTex Dan Nicolaescu 2006-04-05 19:53 ` AUCTex David Kastrup 2006-04-03 2:25 ` turn off safe-local-variable-values checking Stefan Monnier 2006-04-03 2:58 ` Johan Bockgård 2006-04-03 13:51 ` Richard Stallman 2006-04-10 18:25 ` Richard Stallman 2006-04-12 18:13 ` Stuart D. Herring 2006-04-13 3:20 ` Richard Stallman 2006-04-13 15:04 ` Stuart D. Herring 2006-04-16 2:09 ` M-x normal-mode and local variables Richard Stallman 2006-04-16 12:22 ` Stefan Monnier 2006-04-17 17:56 ` Richard Stallman 2006-04-12 19:57 ` turn off safe-local-variable-values checking Stuart D. Herring 2007-03-01 0:58 ` Stuart D. Herring 2007-03-01 17:12 ` Chong Yidong 2007-03-01 20:12 ` Stuart D. Herring 2006-04-03 14:44 ` Andreas Schwab 2006-04-03 23:57 ` Richard Stallman 2006-04-04 18:59 ` Andreas Schwab 2006-04-04 19:37 ` Reiner Steib 2006-04-04 20:46 ` Stefan Monnier 2006-04-05 8:19 ` Reiner Steib 2006-04-05 13:01 ` Stefan Monnier 2006-04-05 15:51 ` Chong Yidong 2006-04-06 1:11 ` Richard Stallman 2006-04-06 15:40 ` Additional safe-local-variables (was: turn off safe-local-variable-values checking) Reiner Steib 2006-04-06 17:51 ` Richard Stallman 2006-04-06 19:23 ` Additional safe-local-variables Reiner Steib 2006-04-07 2:19 ` Richard Stallman 2006-04-07 18:55 ` Reiner Steib 2006-04-08 16:17 ` Richard Stallman 2006-04-05 1:51 ` turn off safe-local-variable-values checking Richard Stallman 2006-04-05 3:45 ` Miles Bader 2006-04-05 14:54 ` Richard Stallman 2006-04-03 0:13 ` Shug Boabby
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.