From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Further problem with recent changes to custom-magic-alist. Date: Thu, 24 Feb 2005 17:15:46 -0600 (CST) Message-ID: <200502242315.j1ONFkp18229@raven.dms.auburn.edu> References: <200502150055.j1F0tRZ05963@raven.dms.auburn.edu> <200502221541.j1MFftW21404@raven.dms.auburn.edu> <00a401c519f4$aa940870$0200a8c0@sedrcw11488> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1109287123 7154 80.91.229.2 (24 Feb 2005 23:18:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Feb 2005 23:18:43 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 25 00:18:42 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D4SFS-0007dr-H7 for ged-emacs-devel@m.gmane.org; Fri, 25 Feb 2005 00:18:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D4SX6-0001Ba-3q for ged-emacs-devel@m.gmane.org; Thu, 24 Feb 2005 18:36:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D4SWX-00012e-S2 for emacs-devel@gnu.org; Thu, 24 Feb 2005 18:36:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D4SWU-00010s-M9 for emacs-devel@gnu.org; Thu, 24 Feb 2005 18:35:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D4SWU-0000zX-H3 for emacs-devel@gnu.org; Thu, 24 Feb 2005 18:35:58 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D4SF4-0004Ft-VK; Thu, 24 Feb 2005 18:17:59 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j1ONHw9N008026; Thu, 24 Feb 2005 17:17:58 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j1ONFkp18229; Thu, 24 Feb 2005 17:15:46 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: lennart.borgman.073@student.lu.se In-reply-to: <00a401c519f4$aa940870$0200a8c0@sedrcw11488> (lennart.borgman.073@student.lu.se) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33780 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33780 Lennart Borgman wrote: Put a link to an Info page with information about where the saving is done in the customize buffer. I agree. Moreover, other people have asked for a link explaining `custom-file'. I enclose a patch which implements this and also makes the states of options more recognizable, by using messages starting with a capitalized keyword. After installing the patch in my own private Emacs, I found that it indeed made it a lot easier for me to quickly recognize states. It goes part of the way in the direction of a change suggested by Drew. I could install in CVS, if desired. Motivation for new link to Emacs manual node on `custom-file': I believe that more people use `custom-file' than Richard believes. There are two unrelated reasons to use it. The first is because trying to use the same file (.emacs) for different Emacs versions might not work because of incompatibilities. (That is why I _need_ to have several Custom files.) The second is because people do not like two huge blurbs to be written in their .emacs. Putting the fact that saving writes into `custom-file' in the State message does not work very well, because there is no place there to do it appropriately and because it is told after the fact. If people did not like Custom to write into their .emacs, it is already done. The patch below puts the info on top of the Custom buffer, where people can see it _before_ they save. It puts in a link to the node in the Emacs manual explaining `custom-file', as people have requested. It is much shorter than my previous similar proposal. It adds only one line, containing the new link. Motivation for message style change: I would prefer something like You've set and saved this %c. I believe that we should shorten the messages as much as possible and put one capitalized keyword in front, allowing people who already know the rest of the text by heart to quickly recognize the State. The State message would become: SAVED, but not set. If deemed _really_ necessary, there would be place for things like: SAVED, but not set. Code written into `custom-file'. Or, less accurately, if custom-file is set: SAVED, but not set. Code written in your init file. However, the patch below already puts much more helpful info on top of the Custom buffer. I see no reason to repeat it for every single saved option. The capitalized keywords I used are essentially the same as the internal Custom symbols, except that I replaced "MODIFIED" with "EDITED", which seemed clearer. I replaced "ROGUE" with "STRAY", because otherwise there might be confusion with `M-x customize-rogue', which is actually meant to produce a buffer containing all CHANGED (outside customize) options. The "ROGUE"-"STRAY" issue is not very relevant, because such options normally never occur in Custom buffers. They can only "stray" into them by very badly written code. No info present in the current messages was lost (except for the writing into .emacs, which went to the top of the buffer.) Space was saved by using a more compacted style, not by deleting info. For the "CHANGED" state, very essential info was added. ===File ~/cus-edit-latest-diff============================== *** cus-edit.el 22 Feb 2005 16:55:41 -0600 1.213 --- cus-edit.el 24 Feb 2005 13:59:31 -0600 *************** *** 1377,1392 **** (widget-insert (format ". %s show active fields; type RET or click mouse-1 on an active field to invoke its action. Editing an option value ! changes the text in the buffer; invoke the State button and ! choose the Set operation to set the option value. ! Invoke " (if custom-raised-buttons ! "`Raised' buttons" ! "Square brackets"))) (widget-create 'info-link :tag "Help" :help-echo "Read the online help." "(emacs)Easy Customization") ! (widget-insert " for more information.\n\n") (message "Creating customization buttons...") (widget-insert "Operate on everything in this buffer:\n ")) (widget-insert " ")) --- 1377,1399 ---- (widget-insert (format ". %s show active fields; type RET or click mouse-1 on an active field to invoke its action. Editing an option value ! changes only the text in the buffer. Invoke the State button to set or ! save the option value. Saving an option normally edits your init file. ! Invoke " ! (if custom-raised-buttons ! "`Raised' buttons" ! "Square brackets"))) ! (widget-create 'info-link ! :tag "Custom file" ! "(emacs)Saving Customizations") ! (widget-insert ! " for information on how to save in a different file. ! Invoke ") (widget-create 'info-link :tag "Help" :help-echo "Read the online help." "(emacs)Easy Customization") ! (widget-insert " for general information.\n\n") (message "Creating customization buttons...") (widget-insert "Operate on everything in this buffer:\n ")) (widget-insert " ")) *************** *** 1665,1695 **** (defconst custom-magic-alist '((nil "#" underline "\ ! uninitialized, you should not see this.") (unknown "?" italic "\ ! unknown, you should not see this.") (hidden "-" default "\ ! hidden, invoke \"Show\" in the previous line to show." "\ group now hidden, invoke \"Show\", above, to show contents.") (invalid "x" custom-invalid-face "\ ! the value displayed for this %c is invalid and cannot be set.") (modified "*" custom-modified-face "\ ! you have edited the value as text, but you have not set the %c." "\ you have edited something in this group, but not set anything yet.") (set "+" custom-set-face "\ ! you have set this %c, but not saved it for future sessions." "\ you have set something in this group, but not saved anything yet.") (changed ":" custom-changed-face "\ ! this %c has been changed outside the customize buffer." "\ something in this group has been changed outside customize.") (saved "!" custom-saved-face "\ ! You have set this %c and saved it through Customize in your init file." "\ something in this group has been set and saved.") (rogue "@" custom-rogue-face "\ ! this %c has not been changed with customize." "\ something in this group is not prepared for customization.") (standard " " nil "\ ! this %c is unchanged from its standard setting." "\ visible group members are all at standard settings.")) "Alist of customize option states. Each entry is of the form (STATE MAGIC FACE ITEM-DESC [ GROUP-DESC ]), where --- 1672,1702 ---- (defconst custom-magic-alist '((nil "#" underline "\ ! UNINITIALIZED, you should not see this.") (unknown "?" italic "\ ! UNKNOWN, you should not see this.") (hidden "-" default "\ ! HIDDEN, invoke \"Show\" in the previous line to show." "\ group now hidden, invoke \"Show\", above, to show contents.") (invalid "x" custom-invalid-face "\ ! INVALID, the displayed value cannot be set.") (modified "*" custom-modified-face "\ ! EDITED, but not set." "\ you have edited something in this group, but not set anything yet.") (set "+" custom-set-face "\ ! SET, but not saved." "\ you have set something in this group, but not saved anything yet.") (changed ":" custom-changed-face "\ ! CHANGED outside Customize; operating on it here may be unreliable." "\ something in this group has been changed outside customize.") (saved "!" custom-saved-face "\ ! SAVED and set." "\ something in this group has been set and saved.") (rogue "@" custom-rogue-face "\ ! STRAY, you should not see this." "\ something in this group is not prepared for customization.") (standard " " nil "\ ! STANDARD." "\ visible group members are all at standard settings.")) "Alist of customize option states. Each entry is of the form (STATE MAGIC FACE ITEM-DESC [ GROUP-DESC ]), where *************** *** 1709,1715 **** `set' This item has been set but not saved. `changed' ! The current value of this item has been changed temporarily. `saved' This item is marked for saving. `rogue' --- 1716,1722 ---- `set' This item has been set but not saved. `changed' ! The current value of this item has been changed outside Customize. `saved' This item is marked for saving. `rogue' ============================================================