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: should read-file-name not respect text properties in its input string? Date: Sat, 21 Jun 2008 12:46:15 -0700 Message-ID: <004a01c8d3d7$77c815d0$0200a8c0@us.oracle.com> References: <001c01c8d325$4a595bc0$0200a8c0@us.oracle.com><003401c8d35b$9a50cb50$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1214077604 24404 80.91.229.12 (21 Jun 2008 19:46:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2008 19:46:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 21 21:47:28 2008 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.50) id 1KA93W-0003Ng-Ll for ged-emacs-devel@m.gmane.org; Sat, 21 Jun 2008 21:47:27 +0200 Original-Received: from localhost ([127.0.0.1]:57596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KA92h-0007Qw-IQ for ged-emacs-devel@m.gmane.org; Sat, 21 Jun 2008 15:46:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KA92c-0007Of-5f for emacs-devel@gnu.org; Sat, 21 Jun 2008 15:46:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KA92a-0007Lv-95 for emacs-devel@gnu.org; Sat, 21 Jun 2008 15:46:29 -0400 Original-Received: from [199.232.76.173] (port=41628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KA92a-0007Lc-2Q for emacs-devel@gnu.org; Sat, 21 Jun 2008 15:46:28 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]:38376) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KA92Z-00044E-J9 for emacs-devel@gnu.org; Sat, 21 Jun 2008 15:46:27 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m5LJkOuF017653; Sat, 21 Jun 2008 14:46:25 -0500 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m5LJG6gK007592; Sat, 21 Jun 2008 13:46:24 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3697393751214077571; Sat, 21 Jun 2008 12:46:11 -0700 Original-Received: from dradamslap1 (/24.5.171.3) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 Jun 2008 12:46:11 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcjTy0dpYXYzhPK1SxO1YHdHZpkN1wABwUFA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:99624 Archived-At: > > I already said I don't have any particular example in mind. > > The logic and reasons are essentially the same as for > > `completing-read', however - see the > > referenced 2007 thread. > > Could you sumarize it or give an URL for it? Irrelevant, as I said, because `read-file-name' will automatically work if the job is finished for `completing-read'. > The main problem I have to understand how this could be used > is that if the user types the text, it won't get the properties > from the completion candidates since the completion was never > involved. There are different ways to choose a candidate, and different ways to provide input to `completing-read'. You can choose with the mouse. You can yank propertized text in the minibuffer. And TAB completion too can put the propertized candidate in the minibuffer. > So do you want the properties from the completion candidates > or from the minibuffer text? Whatever is in the minibuffer when the user ends completion (RET). If the user chooses one of the candidates (however it is chosen), then it should be used, together with its properties. If the user instead enters something else (non-candidate with lax completion), whatever s?he enters should be used, together with its properties. > If from the minibuffer text (the only reliable > choice), what kind of properties would these be, who would put > them there? If the input text comes from choosing a candidate (e.g. mouse-2, TAB completion), then whatever properties the candidate has. If the input comes from the user yanking propertized text, then whatever properties that yanked text has. Even if the user uses facemenu in the minibuffer to change the face of text s?he inputs, and then types text with that face, then whatever properties that text has. However the input text happens to become propertized, it should retain its properties when it is returned from `completing-read' (and so from `read-file-name' also).