From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Defaults for set-variable Date: Mon, 31 Oct 2005 14:15:22 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1130797059 1429 80.91.229.2 (31 Oct 2005 22:17:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Oct 2005 22:17:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 31 23:17:33 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EWhwT-0001B1-1i for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2005 23:15:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWhwS-0006uo-DY for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2005 17:15:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EWhw9-0006rM-Cj for emacs-devel@gnu.org; Mon, 31 Oct 2005 17:15:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EWhw6-0006on-Rg for emacs-devel@gnu.org; Mon, 31 Oct 2005 17:15:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWhw6-0006oh-Fq for emacs-devel@gnu.org; Mon, 31 Oct 2005 17:15:26 -0500 Original-Received: from [141.146.126.230] (helo=agminet03.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EWhw6-0005Ep-Ay for emacs-devel@gnu.org; Mon, 31 Oct 2005 17:15:26 -0500 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet03.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j9VMFOIc003306 for ; Mon, 31 Oct 2005 16:15:24 -0600 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j9VMFNhO020016 for ; Mon, 31 Oct 2005 15:15:24 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id j9VMFNv2020009 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Mon, 31 Oct 2005 15:15:23 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE 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:45200 Archived-At: > It's convenient to have a command to do this, as a shortcut > for M-: `(setq ...)' - with `C-u' local option and no eval > of value. Any chance of having a separate command, which > works for any variable? Er, "M-: (setq '" is _shorter_ than M-x set-variable RET 1. Counting keystrokes (but who's counting?), the two are about the same, actually: M-: (setq SPC 'foo M-TAB SPC value) RET = 12 + foo + value vs M-x set-va RET foo TAB RET value RET = 11 + foo + value 2. variable-name completion is available via M-TAB `M-TAB' simply completes any Lisp symbol - it does not offer only variables as completion candidates. The idea is to have completion against variable names (only), just as `set-variable' currently offers completion against user-option names. 3. For grabbing the name from the buffer, use `C-M-SPC M-w' ... `C-y' a) That grabs any word, not just a variable name. b) If point is in the middle of a name, it grabs only the rest of the name under point; it does not grab the whole name. You need to start with `C-M-b'. 4. Making the value local is a separate operation, if you use `M-:'. Using `(setq foo...)' + `M-TAB' completion + your name-grabbing + a separate operation for making the value local...takes longer and is more error-prone. Which do you find more convenient for setting user options - setq or set-variable? That is, you can use `M-: (setq foo '...)' today for user options. Do you, or do you use `M-x set-variable foo ...'? In any case, there are of course ways to do without such a convenience. The question is whether or not it is a convenience worth adding to Emacs.