From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.emacs.bugs Subject: Re: HOW CAN I STOP THIS NOVICE MODE STUFF? Date: Wed, 02 Jan 2008 13:45:48 -0800 Organization: Private Message-ID: <477C060C.4010903@gmail.com> References: <476ED79F.1000306@gmail.com> <477141A3.7030808@gmail.com> <477BE6DE.3030207@gmail.com> <200801021951.m02Jpq43005487@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199310363 23533 80.91.229.12 (2 Jan 2008 21:46:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Jan 2008 21:46:03 +0000 (UTC) Cc: schwab@suse.de, bug-gnu-emacs@gnu.org, rms@gnu.org To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 02 22:46:22 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JABPn-0005BH-Tr for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Jan 2008 22:46:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JABPR-0006qc-NY for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Jan 2008 16:45:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JABPM-0006oH-0C for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2008 16:45:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JABPJ-0006lq-Es for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2008 16:45:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JABPJ-0006ln-A3 for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2008 16:45:49 -0500 Original-Received: from flpi101.sbcis.sbc.com ([207.115.20.70] helo=flpi101.prodigy.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JABPF-0007m2-8w; Wed, 02 Jan 2008 16:45:45 -0500 X-ORBL: [75.2.140.107] Original-Received: from [192.168.1.102] (adsl-75-2-140-107.dsl.pltn13.sbcglobal.net [75.2.140.107]) by flpi101.prodigy.net (8.13.8 out.dk.spool/8.13.8) with ESMTP id m02LjgtR008729; Wed, 2 Jan 2008 13:45:42 -0800 User-Agent: Thunderbird 2.0.0.6 (X11/20070801) In-Reply-To: <200801021951.m02Jpq43005487@oogie-boogie.ics.uci.edu> X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17284 Archived-At: 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?