From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: need obsolete arg in (read-from-minibuffer ...) Date: Fri, 18 Mar 2011 16:03:51 -0700 Message-ID: References: <4D83BF4A.1030707@mousecar.com> <57C62106C2FC4A8DABE33A73A9A35201@us.oracle.com> <4D83D8B9.7070608@mousecar.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1300489469 18921 80.91.229.12 (18 Mar 2011 23:04:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2011 23:04:29 +0000 (UTC) Cc: 'GNU Emacs List' To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 19 00:04:25 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0iiW-0006Hq-A2 for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Mar 2011 00:04:24 +0100 Original-Received: from localhost ([127.0.0.1]:40617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0iiV-00007n-Hx for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Mar 2011 19:04:23 -0400 Original-Received: from [140.186.70.92] (port=59336 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0ii3-0008WJ-LG for help-gnu-emacs@gnu.org; Fri, 18 Mar 2011 19:03:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0ii2-0001I4-Hg for help-gnu-emacs@gnu.org; Fri, 18 Mar 2011 19:03:55 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:39768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0ii2-0001Hy-7X for help-gnu-emacs@gnu.org; Fri, 18 Mar 2011 19:03:54 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p2IN3ptA016400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Mar 2011 23:03:53 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p2IN3pr5006173 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Mar 2011 23:03:51 GMT Original-Received: from abhmt009.oracle.com (abhmt009.oracle.com [141.146.116.18]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p2IN3oBV006243; Fri, 18 Mar 2011 18:03:51 -0500 Original-Received: from dradamslap1 (/10.159.39.7) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 Mar 2011 16:03:49 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4D83D8B9.7070608@mousecar.com> Thread-Index: AcvluY0mphMtBX8iSIKvYAI0CfJLHQAAsObg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4D83E4D7.014D,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80258 Archived-At: > > What do you mean by "work"? And what do you mean "without" > > the obsolete arg? > > If I change the 2nd arg from "def-val" to "nil", then def-val > isn't displayed in the minibuffer for editing by the user. > However, the docs say that this arg is obsolete. > I take this to mean that it should be left as "nil". Correct. By "obsolete" the docs mean that that the Emacs developers think you should leave it as nil (i.e., not use the INITIAL-CONTENTS argument), and use only the DEFAULT-VALUE argument. They think that the only useful use cases make no use of INITIAL-CONTENTS. But see the doc string wrt the HIST arg, where they allow for an exception. However, if you understand the difference between DEFAULT-VALUE and INITIAL-CONTENTS, and _you prefer_ the behavior of INITIAL-CONTENTS for some reason in some particular context, then use it. Personally, I do not consider INITIAL-CONTENTS obsolete, FWIW. Remember that you can pull the DEFAULT-VALUE into the minibuffer using `M-n'. So the difference typically comes down to which you find more convenient: having a value in the minibuffer initially (and having to get rid of it if you really want something else instead) or pulling a value into the minibuffer when you need it, using `M-n'. If the default/initial value is used most of the time, then you might find it more convenient to have the minibuffer prefilled with it. If it is not used most of the time then you might find it more convenient not to have to clear it out of the minibuffer and type another value. And this relative convenience might change, depending on the command and the context. Personally, I bind `M-k' to a command that clears out the minibuffer, and I prefill the minibuffer. I prefill it with the value of DEFAULT-VALUE if INITIAL-CONTENTS is empty (nil), which is typically the case. IOW, I have in effect an automatic `M-n'. I hit `M-k' when I don't want the value. Other people prefer to hit `M-n' when they do want the value. A lot can depend on how appropriate/useful the default values are for the commands you use. If the programmer provided only lousy default values, then you probably don't want the minibuffer prefilled with them. In Icicles, whether to prefill or not is a user choice (option). http://www.emacswiki.org/emacs/Icicles_-_Customization_and_General_Tips#toc11