From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Getting more info on a variable in Customize buffers Date: Tue, 4 Jan 2005 11:50:32 -0800 Message-ID: References: <200501041827.j04IRjm16150@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1104868346 23585 80.91.229.6 (4 Jan 2005 19:52:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jan 2005 19:52:26 +0000 (UTC) Cc: abraham@dina.kvl.dk, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 04 20:52:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cluj1-0002ZY-00 for ; Tue, 04 Jan 2005 20:52:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CluuE-00078v-Hy for ged-emacs-devel@m.gmane.org; Tue, 04 Jan 2005 15:03:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cluty-00077v-05 for emacs-devel@gnu.org; Tue, 04 Jan 2005 15:03:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Clutv-00075P-Be for emacs-devel@gnu.org; Tue, 04 Jan 2005 15:03:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Clutv-00075K-6n for emacs-devel@gnu.org; Tue, 04 Jan 2005 15:03:31 -0500 Original-Received: from [148.87.2.204] (helo=inet-mail4.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cluhe-00038D-2V for emacs-devel@gnu.org; Tue, 04 Jan 2005 14:50:50 -0500 Original-Received: from inet-mail4.oracle.com (localhost [127.0.0.1]) by inet-mail4.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j04Jodm9019746; Tue, 4 Jan 2005 11:50:40 -0800 (PST) Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.191.50]) by inet-mail4.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j04JoYet019700; Tue, 4 Jan 2005 11:50:35 -0800 (PST) Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j04JoYlZ031870; Tue, 4 Jan 2005 12:50:34 -0700 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-82-222.vpn.oracle.com [141.144.82.222]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j04JoXON031855 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 4 Jan 2005 12:50:33 -0700 Original-To: "Luc Teirlinck" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-reply-to: <200501041827.j04IRjm16150@raven.dms.auburn.edu> Importance: Normal 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: main.gmane.org gmane.emacs.devel:31837 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31837 That is apparently not what it does. If you set, say, auto-revert-interval, which is 5 by default, to 10 and save for future sessions, then set it to 20 for this session only, "show initial Lisp expression" will show 10, not 5. I think you mean "will show 10, not (if window-system 'x 2)". No, I was talking about auto-revert-interval, which is an actual option you can experiment with. The defcustom gives it value 5, which is a Lisp expression, an integer. Right. Sorry. But that example doesn't demonstrate the difference between uneval'd expression and eval'd value (because 5 evaluates to 5). (It does demonstrate that it is the last-saved value or expression that is displayed.) I just tried the example that Per gave: (defcustom foo (if window-system 'x 2) "doc" :type 'sexp) Using Customize, I did "show initial Lisp expression", to see (if window-system 'x 2). I changed that sexp to (if window-system 'y 5) and did "set for current session". I clicked "don't show as Lisp expression", then "show initial Lisp" and it showed (if window-system 'x 2). So, turning off, then on again, the "show initial Lisp" changed the displayed value back to what it was before the value was changed. The current value (via "don't show" again) always reflects the lates value, of course. I changed the Lisp expression again, but this time did "save for future sessions". Clicking "don't show" followed by "show initial" then showed the new Lisp expression, (if window-system 'y 5). Summary: "Show initial Lisp expression" shows the uneval'd Lisp expression (not value) that was last saved. It doesn't show the last Lisp expression used to set the variable (unless the value was saved). Perhaps there is some good in putting together the display of the last defining sexp used in Customize with the defining library source code. A single menu item, "Show Lisp definition" could display the last-defining code, whether it is in the user's custom file (.emacs) or the last-defining Lisp library. Opinions? I think that there should be a menu item that takes you to the last-defining Lisp-library definition, regardless of whether or not there is a later definition in your .emacs. The library source code is more informative than a simple sexp. However, there is a risk that the user will get confused, because in that case the source library code did not actually define the latest value. Are both needed? In any case: - A link to the library source code is needed, as in `C-h v'. - If the defining Lisp sexp in the custom file is also shown (or linked), then the same should be done for `C-h v'. - The current _value_ should also be displayable as a sexp, as in `C-h v'.