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: Q on read-file-name and completion-ignored-extensions Date: Thu, 19 Jan 2006 17:50:05 -0800 Message-ID: References: <200601200047.k0K0lG025176@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137721835 5308 80.91.229.2 (20 Jan 2006 01:50:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2006 01:50:35 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 20 02:50:34 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EzlQ4-0002Vl-F7 for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2006 02:50:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzlSX-0000UJ-5k for ged-emacs-devel@m.gmane.org; Thu, 19 Jan 2006 20:53:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzlSK-0000TX-I3 for emacs-devel@gnu.org; Thu, 19 Jan 2006 20:52:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EzlSH-0000TB-Fx for emacs-devel@gnu.org; Thu, 19 Jan 2006 20:52:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzlSH-0000T8-D5 for emacs-devel@gnu.org; Thu, 19 Jan 2006 20:52:45 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EzlWO-0003Kv-0v for emacs-devel@gnu.org; Thu, 19 Jan 2006 20:57:00 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k0K1o80p012974 for ; Thu, 19 Jan 2006 19:50:08 -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 k0K1o7ft024772 for ; Thu, 19 Jan 2006 18:50:07 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k0K1o7jv024760 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 19 Jan 2006 18:50:07 -0700 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: <200601200047.k0K0lG025176@raven.dms.auburn.edu> 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:49289 Archived-At: What about the alternative docstring in the patch below? That one should describe the actual behavior or there _is_ a bug (on Windows). I can install if desired. To explain what _should_ happen and _does_ happen on GNU/Linux: I have four files starting with cin: cinv.tex, cinv.tex~, cinv.aux and cinv.dvi. All but one end in a string in completion-ignored-extensions. If I do `C-x C-f cin TAB', it completes to cinv.tex, ignoring the three other ones. But if I do `C-x C-f cin ?', I get a list of all four. This feature is meant to allow you to complete to what you _probably_ want with less typing. It is _not_ meant to prevent you from visiting files that end in one of these suffixes. ! Completion ignores file names ending in any string in this list. ! It does not ignore them if all possible completions end in one of ! these strings or when displaying a list of completions. ! It ignores directory names if they match any string in this list which ! ends in a slash. Thanks very much. This clears up a lot. I guess the reference to `file-name-all-completions' was mistaken, and "affects lists of possible completions" in the original doc string meant only (?) what you write above: _displaying_ a list of completions (in buffer *Completions*). What's more, the part about "if all possible completions end in one of these strings" is new to me, and it clears up my misunderstanding wrt why it was completing filenames that have the ignored extensions. There is apparently no bug on Windows - I was just missing this bit of info (if all possible completions have ignored extensions, then no ignoring is done). We should perhaps clarify this case: C-x C-f cinv. TAB This does _not_ display the list (of all four files), even though TAB would normally display the list of possible completions in that case (since the common part is already in the minibuffer). Instead, it completes to cinv.tex. This case should somehow be documented - I don't think it's implied by the rules expressed in your doc string. Is it perhaps true that the "displaying a list of completions" that shows ignored completions (even when there are non-ignored candidates) applies only to display by `?' and not to display by TAB? If so, that would make the explanation even simpler: just say that `?' is unaffected by this variable. Whatever the real rule is, we should make it clear. IMO, it wouldn't hurt to add short examples of the various cases to either the doc string or the manual: 1) if all possible completions have ignored extensions, they are not ignored, 2) otherwise, completions with ignored extensions are still displayed in *Completions*, so you can compare them with filenames that you can complete to, ... Thanks, Luc. I don't know if what you wrote was obvious from the beginning to others, but it was certainly not obvious to me.