From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Defaults for set-variable Date: Fri, 04 Nov 2005 14:07:14 +0200 Organization: JURTA Message-ID: <87acgkzrcl.fsf@jurta.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131107091 7305 80.91.229.2 (4 Nov 2005 12:24:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2005 12:24:51 +0000 (UTC) Cc: emacs-devel@gnu.org, drew.adams@oracle.com, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 04 13:24:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EY0bP-0006G9-Ne for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2005 13:23:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EY0bP-0006PK-4q for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2005 07:23:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EY0a3-0005Xe-O0 for emacs-devel@gnu.org; Fri, 04 Nov 2005 07:22:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EY0a2-0005Wl-Kv for emacs-devel@gnu.org; Fri, 04 Nov 2005 07:22:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EY0a2-0005WM-AM for emacs-devel@gnu.org; Fri, 04 Nov 2005 07:22:02 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EY0a0-0001O6-QU; Fri, 04 Nov 2005 07:22:01 -0500 Original-Received: from mail.neti.ee (80-235-32-157-dsl.mus.estpak.ee [80.235.32.157]) by Relayhost1.neti.ee (Postfix) with ESMTP id F200A1AAC; Fri, 4 Nov 2005 14:22:10 +0200 (EET) Original-To: snogglethorpe@gmail.com In-Reply-To: (Miles Bader's message of "Fri, 4 Nov 2005 10:46:30 +0900") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:45392 Archived-At: > From my personal experience, I claim that the frequency with which one > sets variables by hand which _aren't_ "user variables" is very low -- > and as an Emacs hacker, I probably do so more often than an average > user. Thus, given that the proposed function offers at best, a rather > minor increase in convenience, and will be used very rarely, it simply > isn't worth the code/namespace bloat; existing more general functions > as M-: are "convenient enough", and used much more often. When I need to set a variable value, first I use `M-x set-variable RET' (for its completion and default values), then if for some reason the documentation string misses the star, I have to type C-g, and either to type the variable name after `M-: setq ...' (this is too error-prone), or to type `C-h v variable' (with completion) and to copy its name from the *Help* buffer to the `M-: setq ...' minibuffer. This is very inconvenient. > Morever, if there's a particular non-user variable you find yourself > often setting, that's more likely to be an argument for making that > variable a user-variable than an argument for making setting > non-user-variables easier. The current state of affairs in regard to this is quite confusing. Neither the Emacs manual nor the Emacs Lisp manual define the term "user variable", but at the same `user-variable-p' is the function that is used by `set-variable' to restrict the set of variables available for this function. OTOH, the Emacs manual defines the term "user option" as a variable that the user can customize with the Customization interface. So there are only two layers: variables (defined by `defvar') and user options (defined by `defcustom'). An additional layer of variables marked with a funny * in the documentation string seems unnecessary. With this clear distinction between variables and user options it makes sense to have two commands: 1. `set-variable' as a convenient replacement of M-: (setq variable ...) that can set any variable. 2. `set-user-option' as a fast but limited replacement of Customize for setting user options in the minibuffer. -- Juri Linkov http://www.jurta.org/emacs/