From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Manheimer Newsgroups: gmane.emacs.devel Subject: Re: show-buffer-local-variables Date: Sun, 2 Oct 2005 17:15:04 -0400 Message-ID: <2cd46e7f0510021415m49df6599h7291537115a0dc01@mail.gmail.com> References: Reply-To: Ken Manheimer NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1128288072 3257 80.91.229.2 (2 Oct 2005 21:21:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 Oct 2005 21:21:12 +0000 (UTC) Cc: Steve Yegge , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 02 23:21:05 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EMBGP-0005Ec-4C for ged-emacs-devel@m.gmane.org; Sun, 02 Oct 2005 23:20:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMBGO-00077S-I9 for ged-emacs-devel@m.gmane.org; Sun, 02 Oct 2005 17:20:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EMBFx-00070V-MD for emacs-devel@gnu.org; Sun, 02 Oct 2005 17:20:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EMBFs-0006xt-Ia for emacs-devel@gnu.org; Sun, 02 Oct 2005 17:20:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMBFs-0006wf-7W for emacs-devel@gnu.org; Sun, 02 Oct 2005 17:20:20 -0400 Original-Received: from [64.233.162.203] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EMBAn-0001TW-PB for emacs-devel@gnu.org; Sun, 02 Oct 2005 17:15:06 -0400 Original-Received: by zproxy.gmail.com with SMTP id k1so177030nzf for ; Sun, 02 Oct 2005 14:15:05 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IWK+XrZGCM2M6ARPtOpX20IOA53iUnr0f59HOYBxw2mJQBN2dFxZef/Ietxfw6hLoK5DsBbIQUhXwhYGuIb97lzYybpM3YEipS+tyOk7RXiKFv2A5aMWONkhZ2YEPAJr9lC7pVvngINfOHhYHTQ6pztlfj/EsKsDDv6HVkUpRv8= Original-Received: by 10.36.252.68 with SMTP id z68mr4027986nzh; Sun, 02 Oct 2005 14:15:04 -0700 (PDT) Original-Received: by 10.36.36.6 with HTTP; Sun, 2 Oct 2005 14:15:04 -0700 (PDT) Original-To: rms@gnu.org In-Reply-To: Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:43472 Archived-At: On 10/1/05, Richard M. Stallman wrote: > I noticed this entry in emacs/etc/TODO: > > ** Add a command to make a local variables list in the current buffer > and/or add a variable to the list. > > I recently wrote a function that does the former, if I understand the > entry correctly. > > No, it is a misunderstanding. A local variables list is text > at the end of the file. if i'm understanding correctly, then i include the functionality being sought in the new version of allout. (allout uses emacs local file variables to stash a symmetric-key hint and a symmetric-key verifier string in the file, when those features are enabled.) here are excerpts from relevant functions that describe the interface: (defun allout-adjust-file-variable (varname value) "Adjust the setting of an emacs file variable named VARNAME to VALUE. This activity is inhibited if either `enable-local-variables' `allout-enable-file-variable-adjustment' are nil. When enabled, an entry for the variable is created if not already present, or changed if established with a different value. The section for the file variables, itself, is created if not already present. When created, the section lines \(including the section line) exist as second-level topics in a top-level topic at the end of the file. enable-local-variables must be true for any of this to happen." [...]) (defun allout-file-vars-section-data () "Return data identifying the file-vars section, or nil if none. Returns list `(beginning-point prefix-string suffix-string)'." [...]) it would probably be trivial to revise alout-adjust-file-variable to do wrap a file variables section it creates in an outline topic only if the buffer is in outline mode. it would also be nice to offload this functionality from allout, and get scrutiny from others to see whether the functionality is sufficiently general. i suppose these functions would be best situated in files.el, to reside with hack-local-variables &c. ? ken ken.manheimer@gmail.com