From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steve Yegge Newsgroups: gmane.emacs.devel Subject: show-buffer-local-variables Date: Sat, 1 Oct 2005 06:02:07 -0700 Message-ID: Reply-To: Steve Yegge NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3593_21862961.1128171727754" X-Trace: sea.gmane.org 1128172324 3118 80.91.229.2 (1 Oct 2005 13:12:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 1 Oct 2005 13:12:04 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 01 15:12:03 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ELh95-0008DS-Oc for ged-emacs-devel@m.gmane.org; Sat, 01 Oct 2005 15:11:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ELh94-0000ex-Ox for ged-emacs-devel@m.gmane.org; Sat, 01 Oct 2005 09:11:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ELh0P-0004qg-3N for emacs-devel@gnu.org; Sat, 01 Oct 2005 09:02:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ELh0M-0004pu-1t for emacs-devel@gnu.org; Sat, 01 Oct 2005 09:02:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ELh0H-0004mI-Sk for emacs-devel@gnu.org; Sat, 01 Oct 2005 09:02:16 -0400 Original-Received: from [72.14.204.203] (helo=qproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ELh0D-0001pI-Nn for emacs-devel@gnu.org; Sat, 01 Oct 2005 09:02:10 -0400 Original-Received: by qproxy.gmail.com with SMTP id e12so97061qba for ; Sat, 01 Oct 2005 06:02:07 -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:mime-version:content-type; b=WF7sWuEoJCfpRHz2WjnujN5FpaAnLb/D7VMmKS+8TF18T1I9XYHURVaT0oU96huYEE7PdvygSby7HZlbJIBZ88SNMQB8UtY+q+TlB1Fm+J+kmO01dXh6/qazbfTD9N7Bln6eFW/VkZnCQr5CcKbibpMuAWUCQIV0x173Ju3pL8s= Original-Received: by 10.64.204.4 with SMTP id b4mr1332825qbg; Sat, 01 Oct 2005 06:02:07 -0700 (PDT) Original-Received: by 10.64.209.19 with HTTP; Sat, 1 Oct 2005 06:02:07 -0700 (PDT) Original-To: emacs-devel@gnu.org 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:43423 Archived-At: ------=_Part_3593_21862961.1128171727754 Content-Type: multipart/alternative; boundary="----=_Part_3594_29767903.1128171727754" ------=_Part_3594_29767903.1128171727754 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Emacs developers, 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. It shows an apropos-style listing of the current buffer's local variables. I've cleaned up the function and included it in the attached file, `show-buffer.el'. If you think it may be a useful addition to Emacs, I'd be happy to contribute it. I'm also open to suggestions for improving it. On a related topic, I think `apropos.el' ought to be rewritten with an eye towards reusability. I've got several other packages underway that provide apropos-like commands. It would be nice to reuse `apropos-print' to display the results, for a consistent user experience. But both `apropos' and `apropos-print' are rather monolithic, so I'm forced to copy and paste a lot of the code. I will gladly volunteer for refactoring `apropos.el', if you think it would be worthwhile. Cheers, Steve Yegge stevey@gmail.com ------=_Part_3594_29767903.1128171727754 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Emacs developers,

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.  It shows an apropos-style listing of the current
buffer's local variables.

I've cleaned up the function and included it in the attached file,
`show-buffer.el'.  If you think it may be a useful addition to
Emacs, I'd be happy to contribute it.  I'm also open to suggestions for improving it.

On a related topic, I think `apropos.el' ought to be rewritten
with an eye towards reusability.  I've got several other packages
underway that provide apropos-like commands.  It would be nice to
reuse `apropos-print' to display the results, for a consistent
user experience.  But both `apropos' and `apropos-print' are rather monolithic, so I'm forced to copy and paste a lot of the code.

I will gladly volunteer for refactoring `apropos.el', if you think
it would be worthwhile.

Cheers,

Steve Yegge
stevey@gmail.com
------=_Part_3594_29767903.1128171727754-- ------=_Part_3593_21862961.1128171727754 Content-Type: application/octet-stream; name="show-buffer.el" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="show-buffer.el" Ozs7IHNob3ctYnVmZmVyLmVsIC0tLSBidWZmZXItbG9jYWwgdmFyaWFibGUgY29tbWFuZHMgYW5k IGZ1bmN0aW9ucwoKOzsgQ29weXJpZ2h0IChDKSAyMDA1IFN0ZXZlIFllZ2dlCgo7OyBBdXRob3I6 ICBTdGV2ZSBZZWdnZSAoc3RldmUueWVnZ2VAZ21haWwuY29tKQo7OyBLZXl3b3JkczogaGVscAoK OzsgVGhpcyBmaWxlIGlzIG5vdCBwYXJ0IG9mIEdOVSBFbWFjcy4KCjs7IFRoaXMgcHJvZ3JhbSBp cyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKOzsgbW9kaWZ5 IGl0IHVuZGVyIHRoZSB0Z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WYpKQogICAgICAgICAgICAgICAgICAgICAgICMnc3RyaW5n PCkpCiAgICAgICAgICAgKGxlbiAobGVuZ3RoIHZhcnMpKSkKICAgICAgKHByaW5jCiAgICAgICAo Zm9ybWF0ICIlZCBidWZmZXItbG9jYWwgdmFyaWFibGUlcyBmb3IgYnVmZmVyICVzOlxuXG4iCiAg ICAgICAgICAgICAgIGxlbgogICAgICAgICAgICAgICAoaWYgKGVxIDEgbGVuKSAiIiAicyIpCiAg ICAgICAgICAgICAgIChidWZmZXItbmFtZSBidWYpKSkKICAgICAgKGlmIChudWxsIHZhcnMpCiAg ICAgICAgICAocHJpbmMgIlxuKG5vbmUpIikKICAgICAgICAocHJvZ24KICAgICAgICAgIChkb2xp c3QgKHN5bWJvbCB2YXJzKQogICAgICAgICAgICAoc2hvdy1idWZmZXItcHJpbnQtdmFyLWRvYyBz eW1ib2wpKQogICAgICAgICAgKHNldHEgYnVmZmVyLXJlYWQtb25seSB0KQogICAgICAgICAgKGFw cm9wb3MtbW9kZSkpKSkpKQoKCihkZWZ1biBzaG93LWJ1ZmZlci1wcmludC12YXItZG9jIChzeW0p CiAgIlByaW50cyBhcHJvcG9zLXN0eWxlIGRvY3MgZm9yIFNZTSB0byBzdGFuZGFyZCBvdXRwdXQu CkluY2x1ZGVzIGEgMS1saW5lIHByZXZpZXcgb2YgdGhlIHZhcmlhYmxlJ3MgdmFsdWUuIgogIChs ZXQgKHAxIHAyIHZhbHVlIHRydW5jKQogICAgKHNob3ctYnVmZmVyLW1ha2UtYXByb3Bvcy1hcmdz IHN5bSkKCiAgICA7OyBhcHJvcG9zLXByaW50LWRvYyBkb2Vzbid0IGhhbmRsZSB0aGUgc3ltYm9s IChzaWdoKQogICAgKHByaW5jIHN5bSkKICAgIChzZXRxIHAxIChwb2ludC1hdC1ib2wpIHAyIChw b2ludCkpCiAgICAodGVycHJpKQogICAgKHB1dC10ZXh0LXByb3BlcnR5IHAxIHAyICdpdGVtIChj YXIgYXByb3Bvcy1pdGVt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KICAgICAgICAgICAgICAoc3Vic3RyaW5nIGRvYyAwIChzdHJpbmctbWF0Y2ggIlxuIiBkb2Mp KSkKICAgICAgICB1bmtub3duKQoKICAgICAgOzsgcGxpc3QgbmFtZXMKICAgICAgKGxvb3AgZm9y IHMgaW4gKHN5bWJvbC1wbGlzdCBzeW0pCiAgICAgICAgICAgIGJ5ICMnY2RkciA7OyBwcm9wIG5h bWVzIGFyZSBldmVyeSBvZGQgZWxlbWVudCBpbiBwbGlzdAogICAgICAgICAgICBjb2xsZWN0IHMg aW50byBwcm9wcwogICAgICAgICAgICBmaW5hbGx5IHJldHVybgogICAgICAgICAgICAoYW5kIHBy b3BzCiAgICAgICAgICAgICAgICAgKG5vdCAoYW5kIHNob3ctYnVmZmVyLWxvY2FsLXNraXAtYm9y aW5nLXBsaXN0cwogICAgICAgICAgICAgICAgICAgICAgICAgICAoZXEgMSAobGVuZ3RoIHByb3Bz KSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVxIChjYXIgcHJvcHMpICd2YXJpYWJsZS1k b2N1bWVudGF0aW9uKSkpCiAgICAgICAgICAgICAgICAgKG1hcGNvbmNhdCAjJ3N5bWJvbC1uYW1l IHByb3BzICIgIikpKQoKICAgICAgOzsgcmVtYWluaW5nIGRvYyB0eXBlcyBmb3IgVkFSLCBpZiBh bnkKICAgICAgKHdoZW4gKGdldCBzeW0gJ3dpZGdldC10eXBlKQogICAgICAgIChpZiAoc2V0cSBk b2MgKGRvY3VtZW50YXRpb24tcHJvcGVydHkKICAgICAgICAgICAgICAgICAgICAgICBzeW0gJ3dp ZGdldC1kb2N1bWVudGF0aW9uIHQpKQogICAgICAgICAgICAoc3Vic3RyaW5nIGRvYyAwIChzdHJp bmctbWF0Y2ggIlxuIiBkb2MpKQogICAgICAgICAgdW5rbm93bikpCgogICAgICAod2hlbiAoZmFj ZXAgc3ltKQogICAgICAgIChpZiAoc2V0cSBkb2MgKGRvY3VtZW50YXRpb24tcHJvcGVydHkKICAg ICAgICAgICAgICAgICAgICAgICBzeW0gJ2ZhY2UtZG9jdW1lbnRhdGlvbiB0KSkKICAgICAgICAg ICAgKHN1YnN0cmluZyBkb2MgMCAoc3RyaW5nLW1hdGNoICJcbiIgZG9jKSkKICAgICAgICAgIHVu a25vd24pKQoKICAgICAgKHdoZW4gKGdldCBzeW0gJ2N1c3RvbS1ncm91cCkKICAgICAgICAoaWYg KHNldHEgZG9jIChkb2N1bWVudGF0aW9uLXByb3BlcnR5CiAgICAgICAgICAgICAgICAgICAgICAg c3ltICdncm91cC1kb2N1bWVudGF0aW9uIHQpKQogICAgICAgICAgICAoc3Vic3RyaW5nIGRvYyAw IChzdHJpbmctbWF0Y2ggIlxuIiBkb2MpKQogICAgICAgICAgdW5rbm93bikpKSkpKQoKCihwcm92 aWRlICdzaG93LWJ1ZmZlcikKCjs7OyBzaG93LWJ1ZmZlci5lbCBlbmRzIGhlcmUK ------=_Part_3593_21862961.1128171727754 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ------=_Part_3593_21862961.1128171727754--