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: read-from-minibuffer with default value string Date: Mon, 6 Dec 2010 07:49:49 -0800 Message-ID: References: <87zksk0xkk.fsf@guruji.demimonde> <87vd370zav.fsf@guruji.demimonde> 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 1291650673 7768 80.91.229.12 (6 Dec 2010 15:51:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Dec 2010 15:51:13 +0000 (UTC) To: "'Tyler Smith'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 06 16:51:07 2010 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 1PPdLG-000599-A6 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Dec 2010 16:51:06 +0100 Original-Received: from localhost ([127.0.0.1]:41081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPdLF-00046K-Ku for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Dec 2010 10:51:05 -0500 Original-Received: from [140.186.70.92] (port=48052 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPdKk-0003yc-Il for help-gnu-emacs@gnu.org; Mon, 06 Dec 2010 10:50:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPdKi-0003hM-Vi for help-gnu-emacs@gnu.org; Mon, 06 Dec 2010 10:50:34 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:47249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPdKi-0003gv-Qg for help-gnu-emacs@gnu.org; Mon, 06 Dec 2010 10:50:32 -0500 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 oB6FoOTg029718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Dec 2010 15:50:26 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oB6FXPgx016568; Mon, 6 Dec 2010 15:50:24 GMT Original-Received: from abhmt021.oracle.com by acsmt353.oracle.com with ESMTP id 829742761291650599; Mon, 06 Dec 2010 07:49:59 -0800 Original-Received: from dradamslap1 (/10.159.221.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Dec 2010 07:49:58 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87vd370zav.fsf@guruji.demimonde> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 Thread-Index: AcuVT6VkNdprDMUaToq8axo/5G/ijQADBbFQ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:75516 Archived-At: > Yes, I had been trying to puzzle over that page. You quote > the passages that suggest INITIAL-CONTENTS is still ok, but > it also includes the line: > > Use of a cons cell as the value for INITIAL arguments is deprecated > in user code. > > I'm not sure if this might be a documentation bug, but it sure left me > with mixed messages. No, it's not a typo. That's something else again. It pertains to this earlier paragraph: INITIAL can also be a cons cell of the form `(STRING . POSITION)'. This means to insert STRING in the minibuffer but put point at POSITION within the string's text. (So both HIST and INITIAL can be cons cells.) Admittedly the statement you quote can be confusing, especially because: 1. It is separated by a large paragraph from the statement that INITIAL can be a cons. 2. It speaks about "user code". That's easy to miss - and easy to wonder about. What it is presumably saying is that Emacs Dev does not consider this deprecated for its own (Emacs-developer) use in (officially distributed) Emacs code, but it considers it deprecated for coding by users. Silly? You might want to file a doc bug to try to get this part clarified: `M-x report-emacs-bug'. > Sure, my only concerns in sorting this out are 1) to learn to use > correct, idiomatic elisp and 2) to avoid constructs that are likely to > change/disappear in future emacs versions. I think your > suggestions will allow me to avoid the issue entirely, which is good. Yes, that's the right approach, IMO. I do the same thing, for the same reason, in spite of my view that this should _not_ be considered deprecated/obsolete.