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: delete-file default to buffer-file-name if non-nil Date: Sun, 16 May 2010 17:28:31 -0700 Message-ID: <09068505550E4734B4B3E6F5DCEB8A98@us.oracle.com> References: <56210.128.165.0.81.1273948225.squirrel@webmail.lanl.gov> <87vdan5stg.fsf@mail.jurta.org> 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 1274056220 13732 80.91.229.12 (17 May 2010 00:30:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 17 May 2010 00:30:20 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, deniz.a.m.dogan@gmail.com To: "'Juri Linkov'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 17 02:30:19 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@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 1ODoDq-0001RW-AH for ged-emacs-devel@m.gmane.org; Mon, 17 May 2010 02:30:18 +0200 Original-Received: from localhost ([127.0.0.1]:46361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODoDp-00059K-LP for ged-emacs-devel@m.gmane.org; Sun, 16 May 2010 20:30:17 -0400 Original-Received: from [140.186.70.92] (port=44079 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODoDj-000595-FJ for emacs-devel@gnu.org; Sun, 16 May 2010 20:30:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODoDi-0005IR-Bq for emacs-devel@gnu.org; Sun, 16 May 2010 20:30:11 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:34881) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODoDg-0005Hy-3O; Sun, 16 May 2010 20:30:08 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4H0U3Nd024065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 May 2010 00:30:04 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4GKDroa000685; Mon, 17 May 2010 00:30:02 GMT Original-Received: from abhmt016.oracle.com by acsmt354.oracle.com with ESMTP id 245156631274056098; Sun, 16 May 2010 17:28:18 -0700 Original-Received: from dradamslap1 (/10.175.216.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 16 May 2010 17:28:18 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87vdan5stg.fsf@mail.jurta.org> Thread-Index: Acr1UK14RiIRfeRZQe29qRlzP2RUaQABYKlQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090208.4BF08E0D.0090:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:124845 Archived-At: > > 1. Insert the default value in the minibuffer. This assumes that the > > greatest danger is hitting RET without seeing what the file to be > > deleted is. > > The argument INITIAL-CONTENTS is obsolete and should not be used. > It's possible to insert the default value to the minibuffer > with `M-n'. So it is. But I happen to disagree that it should be obsolete. ;-) A better approach is to let the user decide the behavior. I have this option (FWIW): ,---- | icicle-default-value is a variable defined in `icicles-opt.el'. | Its value is t | | Documentation: | How to treat the default value when reading minibuffer input. | | When the default value argument to functions such as | `completing-read', `read-file-name', `read-from-minibuffer', and | `read-string' is non-nil and the initial-input argument is nil or | "", the default value can be added to the prompt as a hint or | inserted into the minibuffer as the initial input. | | Adding it to the prompt is the default behavior and corresponds to the | behavior of vanilla Emacs. | | Inserting the default value in the minibuffer as the initial input has | the advantage of not requiring you to use `M-n' to retrieve it. It | has the disadvantage of making you use `M-p' (or do something else) to | get rid of the default value in the minibuffer if you do not want to | use or edit it. If you often want to use or edit the default value, | then set `icicle-default-value' to non-nil and non-t. If you rarely | do so, then set it to nil or t. | | If inserted in the minibuffer, the value of this option also | determines whether or not the inserted text is preselected and where | the cursor is left: at the beginning or end of the text. | | These are the possible option values: | | nil - Do not insert default value or add it to prompt. | t - Add default value to prompt. Do not insert it. | `insert-start' - Insert default value and leave cursor at start. | `insert-end' - Insert default value and leave cursor at end. | `preselect-start' - Insert and preselect default value; | leave cursor at beginning. | `preselect-end' - Insert and preselect default value; | leave cursor at end. | | My own preference is `insert-end'. | | Preselection can be useful in Delete Selection mode or PC Selection | mode. It makes it easy to replace the value by typing characters, or | delete it by hitting `C-d' or `DEL' (backspace). However, all of the | initial input is lost if you type or hit `C-d' or `DEL'. That is | inconvenient if you want to keep most of it and edit it only slightly. | | You can customize this variable. `----