From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Steven Tamm Newsgroups: gmane.emacs.devel Subject: Re: add read-file-name-completion-ignore-case user variable ? Date: Sun, 4 Jul 2004 10:47:17 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <30A8417B-CDE2-11D8-A9B1-00039390AB82@mac.com> References: <87hdsoe89r.fsf@indigo.shootybangbang.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1088963298 30078 80.91.224.253 (4 Jul 2004 17:48:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Jul 2004 17:48:18 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Jul 04 19:48:12 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BhB64-0003rX-00 for ; Sun, 04 Jul 2004 19:48:12 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BhB63-0000cR-00 for ; Sun, 04 Jul 2004 19:48:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BhB7z-0000MT-AE for emacs-devel@quimby.gnus.org; Sun, 04 Jul 2004 13:50:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BhB7a-0000LB-PX for emacs-devel@gnu.org; Sun, 04 Jul 2004 13:49:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BhB7Z-0000Ky-3f for emacs-devel@gnu.org; Sun, 04 Jul 2004 13:49:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BhB7Z-0000Kv-0t for emacs-devel@gnu.org; Sun, 04 Jul 2004 13:49:45 -0400 Original-Received: from [17.250.248.47] (helo=smtpout.mac.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BhB5G-000277-OV; Sun, 04 Jul 2004 13:47:23 -0400 Original-Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (8.12.6/MantshX 2.0) with ESMTP id i64HlKVN015232; Sun, 4 Jul 2004 10:47:20 -0700 (PDT) Original-Received: from [10.0.1.201] (c-24-5-11-73.client.comcast.net [24.5.11.73]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id i64HlJhp027815; Sun, 4 Jul 2004 10:47:19 -0700 (PDT) In-Reply-To: <87hdsoe89r.fsf@indigo.shootybangbang.com> Original-To: John Paul Wallington X-Mailer: Apple Mail (2.618) 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: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25445 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25445 My only suggestion would be to use defined MAC_OS instead of defined MAC_OSX. But more generally, using a system type to imply the use of a particular filesystem is fine right now, but may not be a good solution in the future. For example, if you are using an NFS drive, it should be case-sensitive on the Mac. If you are one of the minority of Mac OS X (or darwin) users that use a UFS style filesystem, it should be also be case-sensitive. So what emacs should "really" do is pay attention to the filesystem type of the relevant directory. However, that seems hard. -Steven On Jul 3, 2004, at 8:55 PM, John Paul Wallington wrote: > I wrote: > >> Stef's change of 2004-03-17 to `read-file-name' to set >> completion-ignore-case for case-insensitive systems is hard for users >> to configure -- Viktor Haag pointed this out on the gnu.emacs.help >> newsgroup. >> >> How about having a `read-file-name-completion-ignore-case' user >> variable rather than hard-coding a value according to system type? >> We could still set its default value according to system type. > > Does anyone object to the following patch? > If not, I shall install it. > > > 2004-07-04 John Paul Wallington > > * fileio.c (read_file_name_completion_ignore_case): New variable. > (syms_of_fileio): Declare and initialise it. > (Fread_file_name): Bind `completion-ignore-case' to respect it. > > Index: fileio.c > =================================================================== > RCS file: /cvsroot/emacs/emacs/src/fileio.c,v > retrieving revision 1.505 > diff -u -r1.505 fileio.c > --- fileio.c 22 May 2004 22:17:17 -0000 1.505 > +++ fileio.c 4 Jul 2004 03:56:48 -0000 > @@ -206,6 +206,9 @@ > /* Current predicate used by read_file_name_internal. */ > Lisp_Object Vread_file_name_predicate; > > +/* Nonzero means completion ignores case when reading file name. */ > +int read_file_name_completion_ignore_case; > + > /* Nonzero means, when reading a filename in the minibuffer, > start out by inserting the default directory into the minibuffer. */ > int insert_default_directory; > @@ -6284,10 +6287,8 @@ > } > > count = SPECPDL_INDEX (); > -#if defined VMS || defined DOS_NT || defined MAC_OSX > - specbind (intern ("completion-ignore-case"), Qt); > -#endif > - > + specbind (intern ("completion-ignore-case"), > + read_file_name_completion_ignore_case ? Qt : Qnil); > specbind (intern ("minibuffer-completing-file-name"), Qt); > specbind (intern ("read-file-name-predicate"), > (NILP (predicate) ? Qfile_exists_p : predicate)); > @@ -6523,6 +6524,14 @@ > doc: /* Current predicate used by `read-file-name-internal'. > */); > Vread_file_name_predicate = Qnil; > > + DEFVAR_BOOL ("read-file-name-completion-ignore-case", > &read_file_name_completion_ignore_case, > + doc: /* *Non-nil means when reading a file name completion > ignores case. */); > +#if defined VMS || defined DOS_NT || defined MAC_OSX > + read_file_name_completion_ignore_case = 1; > +#else > + read_file_name_completion_ignore_case = 0; > +#endif > + > DEFVAR_BOOL ("insert-default-directory", &insert_default_directory, > doc: /* *Non-nil means when reading a filename start with > default dir in minibuffer. > If the initial minibuffer contents are non-empty, you can usually > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel