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: Entering filenames with spaces Date: Fri, 12 Aug 2005 08:15:19 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123860085 4118 80.91.229.2 (12 Aug 2005 15:21:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2005 15:21:25 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 12 17:21:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E3bL1-0005Le-Cg for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2005 17:20:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3bOE-0001Cs-Oj for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2005 11:24:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E3bKa-00089L-1D for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:20:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E3bKP-00083A-UG for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:20:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3bKM-0007zv-9Z for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:20:10 -0400 Original-Received: from [148.87.122.30] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1E3bUL-0004ng-9b for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:30:29 -0400 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id j7CFFLqP003393 for ; Fri, 12 Aug 2005 09:15:21 -0600 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j7CFFKKj008053 for ; Fri, 12 Aug 2005 09:15:20 -0600 Original-Received: from dradamslap (dhcp-amer-whq-csvpn-gw3-141-144-82-37.vpn.oracle.com [141.144.82.37]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id j7CFFJii008045 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 12 Aug 2005 09:15:20 -0600 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: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 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:41954 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41954 David> IIRC, people seemed to agree and some said that they wouldn't David> use minibuffer- complete-word anyways - especially for David> filenames it seems to be clear that minibuffer-complete-word David> makes no sense. Inputting a space in a file name, however, is David> a pretty common thing to do nowadays. I hope a setting will be left to allow either option. I almost never have to hit C-q to enter a space in a filename, but regularly use the spacebar to complete filenames. Of course those not used to working mostly at shell prompts, and therefore more used to useing spaces in filenames will obviously have different habits.... I agree: This should be an option. On the other hand, David has a good point. Completion should, other things being equal, be done by keys that are not normally printable or self-insertable. Using TAB for completion is good, because TAB in Emacs is generally not just self-insert - it's bound to a command to indent properly. But SPACE is present in filenames, and it could also be present in other minibuffer input strings (completing-read etc. could be called by any function, to complete any string). The arguments that I see for making this optional (that is, not getting rid of space completion altogether) are 1) habit and 2) SPACE is a very convenient key to hit. #2 is important, IMO. For those who want to use something besides SPC for word completion, a good candidate is a left-hand key that is normally a prefix key, and that doesn't have much use in the minibuffer - a key such as C-SPC or C-z (C-x could still be useful in the minibuffer in C-x C-x, and perhaps C-c should still be reserved for users). FWIW - In my own library (http://www.emacswiki.org/cgi-bin/wiki/icicles.el), I do this: - Provide an option for the key sequence to use for word completion. - Use SPC as the default value of that option (same behavior as usual). - Bind C-SPC to a trivial command that does the same thing as `C-q SPC'. This gives you the convenience of using the spacebar for word completion, a more convenient way to insert a space (`C-SPC' is almost as convenient as `SPC'), and lets you change things easily if you like.