unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: abraham@dina.kvl.dk, emacs-devel@gnu.org
Subject: RE: Getting more info on a variable in Customize buffers
Date: Tue, 4 Jan 2005 11:50:32 -0800	[thread overview]
Message-ID: <FDELKNEBLPKKDCEBEJCBCEOECKAA.drew.adams@oracle.com> (raw)
In-Reply-To: <200501041827.j04IRjm16150@raven.dms.auburn.edu>

           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'.

  reply	other threads:[~2005-01-04 19:50 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-02  6:41 Getting more info on a variable in Customize buffers Drew Adams
2005-01-02 13:27 ` Luc Teirlinck
2005-01-02 19:48   ` Drew Adams
2005-01-02 20:44     ` Luc Teirlinck
2005-01-02 23:52       ` Drew Adams
2005-01-03 16:55         ` Robert J. Chassell
2005-01-03 17:13           ` Drew Adams
2005-01-03 17:20             ` Luc Teirlinck
2005-01-03 17:57               ` Drew Adams
2005-01-04  9:03                 ` Per Abrahamsen
2005-01-04  9:10         ` Per Abrahamsen
2005-01-04  9:26           ` Miles Bader
2005-01-04 10:16             ` Per Abrahamsen
2005-01-04 15:55           ` Luc Teirlinck
2005-01-04 18:12             ` Drew Adams
2005-01-04 18:27               ` Luc Teirlinck
2005-01-04 19:50                 ` Drew Adams [this message]
2005-01-05  8:33             ` Per Abrahamsen
2005-01-05 17:50               ` Robert J. Chassell
2005-01-02 20:25 ` Reiner Steib
2005-01-02 20:34   ` Andreas Schwab
2005-01-02 23:52   ` Drew Adams
2005-01-03  0:35     ` Stefan
2005-01-03  1:57       ` Drew Adams
2005-01-03 17:39         ` Stefan Monnier
2005-01-03 20:45           ` Drew Adams
2005-01-04  9:46             ` Per Abrahamsen
2005-01-04 18:12               ` Drew Adams
2005-01-05  3:31               ` Richard Stallman
2005-01-05 17:31                 ` Drew Adams
2005-01-05 20:48                   ` Lennart Borgman
2005-01-05 21:43                     ` Drew Adams
2005-01-05 21:54                       ` Lennart Borgman
2005-01-06  9:06                         ` Per Abrahamsen
2005-01-06 15:26                           ` Robert J. Chassell
2005-01-06 20:23                             ` Lennart Borgman
2005-01-06 19:05                           ` Drew Adams
2005-01-06 19:55                         ` Richard Stallman
2005-01-06 20:30                           ` Lennart Borgman
2005-01-24 22:29                           ` Lennart Borgman
2005-01-09  3:23                   ` Richard Stallman
2005-01-04  9:24           ` Per Abrahamsen
2005-01-04 14:13             ` Stefan
2005-01-04 19:54               ` Richard Stallman
2005-01-04 20:39                 ` Stefan Monnier
2005-01-05 20:07                   ` Richard Stallman
2005-01-05 20:25                     ` Stefan Monnier
2005-01-06 19:56                       ` Richard Stallman
2005-01-05  8:48               ` Per Abrahamsen
2005-01-03 17:47         ` Robert J. Chassell
2005-01-03 20:39           ` Stefan Monnier
2005-01-04  1:58             ` Robert J. Chassell
2005-01-03  7:51       ` David Kastrup
2005-01-04  0:54         ` Luc Teirlinck
2005-01-05  3:31           ` Richard Stallman
2005-01-05  4:43             ` Stefan Monnier
2005-01-06  3:46               ` Luc Teirlinck
2005-01-06 13:43                 ` Stefan Monnier
2005-01-07  2:49                   ` Richard Stallman
2005-01-06 19:56                 ` Richard Stallman
2005-01-07  4:17                   ` Luc Teirlinck
2005-01-07 23:04                     ` Richard Stallman
2005-01-04  3:38         ` Richard Stallman
2005-01-03 17:28       ` drkm
2005-01-03 18:16         ` Lennart Borgman
2005-01-03 18:56           ` drkm
2005-01-04  9:49         ` Per Abrahamsen
2005-01-04  9:32     ` Per Abrahamsen
2005-01-04 12:53       ` Lennart Borgman
2005-01-04 18:12       ` Drew Adams
2005-01-03  0:58 ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FDELKNEBLPKKDCEBEJCBCEOECKAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=abraham@dina.kvl.dk \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).