all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bruce Korb <Bruce.Korb@gmail.com>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: schwab@suse.de, bug-gnu-emacs@gnu.org, rms@gnu.org
Subject: Re: HOW CAN I STOP THIS NOVICE MODE STUFF?
Date: Wed, 02 Jan 2008 13:45:48 -0800	[thread overview]
Message-ID: <477C060C.4010903@gmail.com> (raw)
In-Reply-To: <200801021951.m02Jpq43005487@oogie-boogie.ics.uci.edu>

Dan Nicolaescu wrote:
>   > /*
>   >  * Local Variables:
>   >  * .....
>   >  * user-approves-of-everything: bkorb
>   >  * End:
>   >  */
> 
> Can you please post the contents of the local variables section for the
> file that causes this?

It is not germane because I refer to any such variable,
but most especially to those that are unfixable and trigger
this ``Do you want to apply it?'' unsuppressable message.

Anyway, here you go:



(defun hack-local-variables-confirm (vars unsafe-vars risky-vars)
  (if noninteractive
      nil
    (let ((name (if buffer-file-name
		    (file-name-nondirectory buffer-file-name)
		  (concat "buffer " (buffer-name))))
	  (offer-save (and (eq enable-local-variables t) unsafe-vars))
	  prompt char)
      (save-window-excursion
	(let ((buf (get-buffer-create "*Local Variables*")))
	  (pop-to-buffer buf)
	  (set (make-local-variable 'cursor-type) nil)
	  (erase-buffer)
	  (if unsafe-vars
	      (insert "The local variables list in " name
		      "\ncontains values that may not be safe (*)"
		      (if risky-vars
			  ", and variables that are risky (**)."
			"."))
	    (if risky-vars
		(insert "The local variables list in " name
			"\ncontains variables that are risky (**).")
	      (insert "A local variables list is specified in " name ".")))
	  (insert "\n\nDo you want to apply it?  You can type
y  -- to apply the local variables list.
n  -- to ignore the local variables list.")
	  (if offer-save
	      (insert "
!  -- to apply the local variables list, and permanently mark these
      values (*) as safe (in the future, they will be set automatically.)\n\n")
	    (insert "\n\n"))

Things to note:

1.  There is no convenient way to just hush the thing up and tell it,
    "I do not mess with untrustworthy files.  Leave me alone."

2.  Sometimes, even "offer-save" is false, so the possibility of
    saying "don't bother me with this any more" is not allowed.

What do you mean by, "not allowed"?  I know my wants and needs better
than any silly program.  Really.  I do.  Perhaps I should replace this:

(defun hack-local-variables-confirm (_v _uv _rv) #t)

Yes?




  reply	other threads:[~2008-01-02 21:45 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
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 [this message]
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=477C060C.4010903@gmail.com \
    --to=bruce.korb@gmail.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=dann@ics.uci.edu \
    --cc=rms@gnu.org \
    --cc=schwab@suse.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.