From unknown Fri Jun 20 07:17:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11718 <11718@debbugs.gnu.org> To: bug#11718 <11718@debbugs.gnu.org> Subject: Status: 24.1.50; `all-completions' returns results with wrong case Reply-To: bug#11718 <11718@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:17:25 +0000 retitle 11718 24.1.50; `all-completions' returns results with wrong case reassign 11718 emacs submitter 11718 michael_heerdegen@web.de severity 11718 normal tag 11718 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 15 14:59:29 2012 Received: (at submit) by debbugs.gnu.org; 15 Jun 2012 18:59:29 +0000 Received: from localhost ([127.0.0.1]:44297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sfbk0-0003Tu-Ik for submit@debbugs.gnu.org; Fri, 15 Jun 2012 14:59:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40956) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sfbjy-0003Tm-Qk for submit@debbugs.gnu.org; Fri, 15 Jun 2012 14:59:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sfbh3-0003DK-1D for submit@debbugs.gnu.org; Fri, 15 Jun 2012 14:56:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RCVD_IN_XBL autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:40571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sfbh2-0003DD-UI for submit@debbugs.gnu.org; Fri, 15 Jun 2012 14:56:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sfbh1-000456-98 for bug-gnu-emacs@gnu.org; Fri, 15 Jun 2012 14:56:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sfbgz-0003Bf-AL for bug-gnu-emacs@gnu.org; Fri, 15 Jun 2012 14:56:22 -0400 Received: from mout.web.de ([212.227.15.4]:53088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sfbgz-0003Ap-16 for bug-gnu-emacs@gnu.org; Fri, 15 Jun 2012 14:56:21 -0400 Received: from snow.dragon ([89.204.153.74]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0Lhev7-1SARoB0X8z-00mSqM for ; Fri, 15 Jun 2012 20:56:18 +0200 Date: Fri, 15 Jun 2012 20:58:29 +0200 Message-Id: <87vciss8q2.fsf@web.de> From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 24.1.50; `all-completions' returns results with wrong case X-Provags-ID: V02:K0:1wHx8luOJEYev4sbB5eplgX1R77QwXW2PRtiXnLdczB EjbkxBmJHx04r+Poarm0wbnvk++1HFoj3u+1P5k23xw2+ABYuD i4kktzvgsjOu3/S7AEHhFhjkFNLZzHSaMV6+ReZJvJ7hwXUqjQ cSL8+87510sal+a3DKwjQXEwyVWRXMIGIeK3JLw8191hskQdc3 PMN8LZ0LE0lRIP7VtvO53dxJ4f0r56JmnXZnUfYMgM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: michael_heerdegen@web.de List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Hello, I use emacs-snapshot on Debian Linux ("GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2)\n of 2012-06-14 on zelenka, modified by Debian"). I have a directory "~/Trash". If I eval (let ((completion-ignore-case t)) (all-completions "~/tra" 'read-file-name-internal 'file-exists-p nil)) in emacs -Q, I get (#("trash/" 0 3 (face completions-common-part))) Note the wrong lower case of the result. In Emacs 23, however, I get ("Trash/") that is, the right case. Not sure if this is really a bug, but, at least, this change in behavior is documented nowhere, and it causes a completion bug in Icicles. Thanks, Michael. In GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of 2012-06-14 on zelenka, modified by Debian (emacs-snapshot package, version 2:20120614-1) Windowing system distributor `The X.Org Foundation', version 11.0.11201902 Configured using: `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 00:41:58 2012 Received: (at 11718) by debbugs.gnu.org; 23 Jun 2012 04:41:58 +0000 Received: from localhost ([127.0.0.1]:53444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiIAY-0005hN-1A for submit@debbugs.gnu.org; Sat, 23 Jun 2012 00:41:58 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:41286) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiIAV-0005hG-RN for 11718@debbugs.gnu.org; Sat, 23 Jun 2012 00:41:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09MCrYj/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDYhABboJjSaDHgOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191968502" Received: from 76-10-182-35.dsl.teksavvy.com (HELO ceviche.home) ([76.10.182.35]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2012 00:38:13 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 10553660C9; Sat, 23 Jun 2012 00:38:13 -0400 (EDT) From: Stefan Monnier To: michael_heerdegen@web.de Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case Message-ID: References: <87vciss8q2.fsf@web.de> Date: Sat, 23 Jun 2012 00:38:12 -0400 In-Reply-To: <87vciss8q2.fsf@web.de> (Michael Heerdegen's message of "Fri, 15 Jun 2012 20:58:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11718 Cc: 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > I have a directory "~/Trash". If I eval > (let ((completion-ignore-case t)) > (all-completions "~/tra" 'read-file-name-internal > 'file-exists-p nil)) > in emacs -Q, I get > (#("trash/" 0 3 (face completions-common-part))) > Note the wrong lower case of the result. While not strictly wrong, it is indeed an undesirable result. I'll try and see how to fix it. > Not sure if this is really a bug, but, at least, this change in > behavior is documented nowhere, and it causes a completion bug in > Icicles. Sounds like it hits a real Icicles bug: there are rather few guarantees about the actual case of the returned string when completion-ignore-case is set. So while we do want to fix the problem, code should not assume anything about the particular case of the return string (which is only considered to be a "cosmetic" issue). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 10:22:21 2012 Received: (at 11718) by debbugs.gnu.org; 23 Jun 2012 14:22:21 +0000 Received: from localhost ([127.0.0.1]:54087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiRED-0004g5-Ef for submit@debbugs.gnu.org; Sat, 23 Jun 2012 10:22:21 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:19594) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiREB-0004fy-P9 for 11718@debbugs.gnu.org; Sat, 23 Jun 2012 10:22:20 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5NEIXRm012619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 Jun 2012 14:18:34 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5NEIWrc027664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jun 2012 14:18:33 GMT Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5NEIWJW021909; Sat, 23 Jun 2012 09:18:32 -0500 Received: from dradamslap1 (/10.159.222.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Jun 2012 07:18:32 -0700 From: "Drew Adams" To: "'Stefan Monnier'" , References: <87vciss8q2.fsf@web.de> Subject: RE: bug#11718: 24.1.50; `all-completions' returns results with wrong case Date: Sat, 23 Jun 2012 07:18:00 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1Q+gkzd/2j41OsT4e30u42B6GeRwATUqZw In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11718 Cc: 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > > I have a directory "~/Trash". If I eval > > (let ((completion-ignore-case t)) > > (all-completions "~/tra" 'read-file-name-internal > > 'file-exists-p nil)) > > in emacs -Q, I get > > (#("trash/" 0 3 (face completions-common-part))) > > Note the wrong lower case of the result. > > While not strictly wrong, See below. > it is indeed an undesirable result. > I'll try and see how to fix it. > > > Not sure if this is really a bug, but, at least, this change in > > behavior is documented nowhere, and it causes a completion bug in > > Icicles. > > Sounds like it hits a real Icicles bug: there are rather few > guarantees about the actual case of the returned string when > completion-ignore-case is set. So while we do want to fix the > problem, code should not assume anything about the particular > case of the return string (which is only considered to be a > "cosmetic" issue). I don't know what the Icicles connection is. But is it not the case that `completing-read' should return an actual completion candidate (or a string copy, but with the same case at least)? If a candidate is "Trash" and that candidate is chosen then it should not return "trash" or "TRASH" or "trAsh", no? Likewise, for `read-file-name': If the actual file-name candidate is "Trash" then it should not return "trash", no? I would think this would be true regardless of the value of `completion-ignore-case'. That variable should control only completion _matching_, acting as a filter. It should not affect/alter the completion candidate that is returned. To perform case-insensitive matching it would be permissible as a matching implementation to uppercase or lowercase everything and then compare. But such an implementation should not provide an excuse to _return_ such a massaged candidate. The original candidate (or a string copy) should be returned. `completion-ignore-case' should not affect the result in any way. That's the only proper interpretation of "no guarantees wrt the result": it should have no effect on the result. It should affect only whether one of the candidates proposed matches your input. Returning one of the actual completion candidates (or a `string=' copy), and not returning its uncle or "halloween" or its mirror image or ... is not a "cosmetic" issue. So it seems to me, and I see nothing in either the doc or in past Emacs behavior to contradict that. Ignoring case during completion, just like a PREDICATE arg, has only to do with matching. Or so it should. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 11:52:26 2012 Received: (at 11718) by debbugs.gnu.org; 23 Jun 2012 15:52:26 +0000 Received: from localhost ([127.0.0.1]:54129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiSdO-0006et-15 for submit@debbugs.gnu.org; Sat, 23 Jun 2012 11:52:26 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:34409) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiSdM-0006en-T7 for 11718@debbugs.gnu.org; Sat, 23 Jun 2012 11:52:25 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxLSN/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191982902" Received: from 69-196-180-141.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.141]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2012 11:48:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id D168B58DC2; Sat, 23 Jun 2012 11:48:38 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case Message-ID: References: <87vciss8q2.fsf@web.de> Date: Sat, 23 Jun 2012 11:48:38 -0400 In-Reply-To: (Drew Adams's message of "Sat, 23 Jun 2012 07:18:00 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11718 Cc: michael_heerdegen@web.de, 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > But is it not the case that `completing-read' should return an actual > completion candidate (or a string copy, but with the same case at > least)? Usually, yes, but when quoting is involved, this is not so clear. If the user typed C-x C-f $TMP/to TAB she liked "$TMP" so Emacs should not replace it with "/var/private-tmp-f71dbe52628a3f83a77ab494817525c6/Total" but with "$TMP/Total". IOW some of the result should come from the user's input and some of it from the completion table. It's already difficult for Emacs to figure out that "tal" is what was added, so currently it doesn't try to see that "/to" was changed into "/To" and that this change is not a form of quoting and should hence be reflected in the user's input. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 15:53:29 2012 Received: (at 11718) by debbugs.gnu.org; 23 Jun 2012 19:53:29 +0000 Received: from localhost ([127.0.0.1]:54301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiWOf-0005AF-5X for submit@debbugs.gnu.org; Sat, 23 Jun 2012 15:53:29 -0400 Received: from mout.web.de ([212.227.17.12]:60149) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiWOc-0005A7-8i for 11718@debbugs.gnu.org; Sat, 23 Jun 2012 15:53:26 -0400 Received: from snow.dragon ([82.113.121.141]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MPHC8-1Smu3Z3kQa-004p2o; Sat, 23 Jun 2012 21:49:36 +0200 From: Michael Heerdegen To: "Drew Adams" Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case In-Reply-To: (Drew Adams's message of "Sat, 23 Jun 2012 07:18:00 -0700") References: <87vciss8q2.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) Date: Sat, 23 Jun 2012 21:51:42 +0200 Message-ID: <87395l6c35.fsf@web.de> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:AthvMghp8gOm54MM52Vjqrac7G7+fmvWb3r7qva520y xl4QvWCpNzufHdfV43Tr1ryiYxeLFfG6W4tFmCxoNJiXBqNEor JfZ3TnCSBtnn8rP/A+xOjfQmbXrBqqZPtmwJGpEbXu/N/WOw2S G9/R98/V8Wac62kiLBcyMcjqHWEmRDzrBDrT+9ruRtUHY0TTyp gwj+HtlHhcgPD/BZxu07FuiK+pO6Jh/YjnoFMgxUu0= X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 11718 Cc: 11718@debbugs.gnu.org, 'Stefan Monnier' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.1 (-) "Drew Adams" writes: > I don't know what the Icicles connection is. If you type C-x C-f ~ / t r a TAB, this is what we currently do: all-completions("~/tra" read-file-name-internal file-exists-p nil) * icicle-all-completions("~/tra" read-file-name-internal file-exists-p nil) icicle-unsorted-file-name-prefix-candidates("~/tra") icicle-file-name-prefix-candidates("~/tra") icicle-prefix-complete-1() icicle-prefix-complete() where `icicle-unsorted-file-name-prefix-candidates' looks like this: --8<---------------cut here---------------start------------->8--- (defun icicle-unsorted-file-name-prefix-candidates (input) "Unsorted list of prefix completions for the current file-name INPUT. When `icicle-expand-input-to-common-match' = 3 or 4, which implies prefix auto-expansion, this also sets `icicle-common-match-string' to the expanded common match of the input over all candidates." (condition-case nil (let* ((pred (if (< emacs-major-version 23) default-directory minibuffer-completion-predicate)) (candidates (if (icicle-not-basic-prefix-completion-p) (icicle-completion-all-completions input minibuffer-completion-table pred (length input) (and (fboundp 'completion--field-metadata) ;Emacs24 (completion--field-metadata (field-beginning)))) (icicle-all-completions input minibuffer-completion-table pred icicle-ignore-space-prefix-flag))) (icicle-extra-candidates (icicle-remove-if-not ..4..)) (icicle-proxy-candidates ..5..) (filtered-candidates ..16..)) (when (and (memq icicle-expand-input-to-common-match '(3 4)) (consp filtered-candidates)) ..15..) (unless filtered-candidates (setq icicle-common-match-string nil)) filtered-candidates) (quit (top-level)))) --8<---------------cut here---------------end--------------->8--- Thus, the minibuffer input is completed to ~/trash, although only ~/Trash exists. Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 17:06:21 2012 Received: (at 11718) by debbugs.gnu.org; 23 Jun 2012 21:06:21 +0000 Received: from localhost ([127.0.0.1]:54373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiXXA-0006mB-Ou for submit@debbugs.gnu.org; Sat, 23 Jun 2012 17:06:21 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:37819) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiXX8-0006m0-Gl for 11718@debbugs.gnu.org; Sat, 23 Jun 2012 17:06:19 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5NL2Uvd019489 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 Jun 2012 21:02:30 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5NL2TPD011893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jun 2012 21:02:29 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5NL2Tso008877; Sat, 23 Jun 2012 16:02:29 -0500 Received: from dradamslap1 (/10.159.222.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Jun 2012 14:02:28 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <87vciss8q2.fsf@web.de> Subject: RE: bug#11718: 24.1.50; `all-completions' returns results with wrong case Date: Sat, 23 Jun 2012 14:01:56 -0700 Message-ID: <616F17401403488B8C5153C00AD86CBF@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1RV6oDwd0DTghCQE2CZf+O+OHT1wAKCwaw In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11718 Cc: michael_heerdegen@web.de, 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > > But is it not the case that `completing-read' should return > > an actual completion candidate (or a string copy, but with > > the same case at least)? > > Usually, yes, but when quoting is involved, this is not so clear. > If the user typed C-x C-f $TMP/to TAB she liked "$TMP" so Emacs should > not replace it with > "/var/private-tmp-f71dbe52628a3f83a77ab494817525c6/Total" > but with "$TMP/Total". FWIW, the former is what Emacs did before you (someone) changed it, no? E.g. Emacs 22 (or 21 or 20 or ... 18), emacs -Q: (let ((completion-ignore-case t)) (read-file-name "prompt: " nil "foobar")) prompt: $HOME/dre TAB changes the input to /drews-lisp-20/ Whereas Emacs 24 changes it to $HOME/drews-lisp-20/ with $HOME dimmed. But I agree that the handling of env vars can seem to muddy the waters. In any case, the completion candidates themselves are relative file names, and their case reflects the actual file names. And that is so regardless of the platform and regardless of `completion-ignore-case'. IIUC, the candidates themselves do not include any of the $TMP stuff, whether expanded or not. In the case above there is only one matching candidate, "drews-lisp-20" (which is a subdir of the root directory). If that directory were named "DrewsLisp" instead then it should presumably be expanded by Emacs 22 to /DrewsLisp/ and by Emacs 24 to $HOME/DrewsLisp/. Even on a case-insensitive file system such as MS Windows, the resulting file names should be, and have always been, the actual file names. If the file or dir is named TotoFoo then TotoFoo is what we should show and return to the user, even when s?he types `tot TAB'. The laxity wrt case is for the user, and only for matching. It lets the user type `tot' or `Tot' or `TOT' etc. to match `TotoFoo'. It is not the completion code and its return value that we want to be lax with, but the user. It's about user convenience. The returned file name should still be correct, case included. > IOW some of the result should come from the > user's input and some of it from the completion table. > > It's already difficult for Emacs to figure out that "tal" is what was > added, so currently it doesn't try to see that "/to" was changed into > "/To" and that this change is not a form of quoting and > should hence be reflected in the user's input. I cannot speak to the difficulty of a fix or how it is currently evaluated. But it seems to me that Emacs _should_ not change the case of the candidates themselves (whether file names or anything else). The candidates supplied to `completing-read' or computed by a function should be taken as is and returned as chosen. Perhaps with additional boundary text, but not with any case changes. To me, the mission of `completion-ignore-case' is limited to selection of possible matches - it should do nothing except filter. It should have no effect on the returned choice. IOW, I agree that `completion-ignore-case' should "guarantee nothing" about the case of the result. But the requirement is even stronger than that, IMO: `c-i-c' has _nothing to do_ with the form of the result, including its case. Whether the result is uppercase, lowercase, or mixed case should not be affected by the value of `c-i-c'. It should be decided by the completion function (e.g. `read-file-name-internal') or the set of completions provided (e.g. obarray, alist). Do we disagree about this "should"? I cannot speak to the difficulty of implementation. I am not arguing that it is easy to DTRT. But it is not clear whether you agree about what TRT is. Do you think `c-i-g' should have any bearing at all on the case of the result? If so, then we disagree. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 24 00:42:14 2012 Received: (at 11718) by debbugs.gnu.org; 24 Jun 2012 04:42:14 +0000 Received: from localhost ([127.0.0.1]:54602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SieeL-0000je-HJ for submit@debbugs.gnu.org; Sun, 24 Jun 2012 00:42:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53736) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SieeI-0000jV-QW for 11718@debbugs.gnu.org; Sun, 24 Jun 2012 00:42:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+L+Q/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kE4gJBboJixuFKQOjM4FYgwWBOg X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="192003404" Received: from 206-248-191-144.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.191.144]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2012 00:38:22 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 862A9AE1E4; Sun, 24 Jun 2012 00:38:21 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case Message-ID: References: <87vciss8q2.fsf@web.de> <616F17401403488B8C5153C00AD86CBF@us.oracle.com> Date: Sun, 24 Jun 2012 00:38:21 -0400 In-Reply-To: <616F17401403488B8C5153C00AD86CBF@us.oracle.com> (Drew Adams's message of "Sat, 23 Jun 2012 14:01:56 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11718 Cc: michael_heerdegen@web.de, 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Drew, I have no idea what you're hoping to get. I already agreed before you even sent a single message in this thread. It's not like I'm rejecting a patch or something. Stefan >>>>> "Drew" == Drew Adams writes: >> > But is it not the case that `completing-read' should return >> > an actual completion candidate (or a string copy, but with >> > the same case at least)? >> >> Usually, yes, but when quoting is involved, this is not so clear. >> If the user typed C-x C-f $TMP/to TAB she liked "$TMP" so Emacs should >> not replace it with >> "/var/private-tmp-f71dbe52628a3f83a77ab494817525c6/Total" >> but with "$TMP/Total". > FWIW, the former is what Emacs did before you (someone) changed it, no? E.g. > Emacs 22 (or 21 or 20 or ... 18), emacs -Q: > (let ((completion-ignore-case t)) > (read-file-name "prompt: " nil "foobar")) > prompt: $HOME/dre TAB > changes the input to /drews-lisp-20/ > Whereas Emacs 24 changes it to $HOME/drews-lisp-20/ > with $HOME dimmed. > But I agree that the handling of env vars can seem to muddy the waters. In any > case, the completion candidates themselves are relative file names, and their > case reflects the actual file names. And that is so regardless of the platform > and regardless of `completion-ignore-case'. > IIUC, the candidates themselves do not include any of the $TMP stuff, whether > expanded or not. In the case above there is only one matching candidate, > "drews-lisp-20" (which is a subdir of the root directory). If that directory > were named "DrewsLisp" instead then it should presumably be expanded by Emacs 22 > to /DrewsLisp/ and by Emacs 24 to $HOME/DrewsLisp/. > Even on a case-insensitive file system such as MS Windows, the resulting file > names should be, and have always been, the actual file names. If the file or > dir is named TotoFoo then TotoFoo is what we should show and return to the user, > even when s?he types `tot TAB'. > The laxity wrt case is for the user, and only for matching. It lets the user > type `tot' or `Tot' or `TOT' etc. to match `TotoFoo'. It is not the completion > code and its return value that we want to be lax with, but the user. It's about > user convenience. The returned file name should still be correct, case > included. >> IOW some of the result should come from the >> user's input and some of it from the completion table. >> >> It's already difficult for Emacs to figure out that "tal" is what was >> added, so currently it doesn't try to see that "/to" was changed into >> "/To" and that this change is not a form of quoting and >> should hence be reflected in the user's input. > I cannot speak to the difficulty of a fix or how it is currently evaluated. > But it seems to me that Emacs _should_ not change the case of the candidates > themselves (whether file names or anything else). The candidates supplied to > `completing-read' or computed by a function should be taken as is and returned > as chosen. Perhaps with additional boundary text, but not with any case > changes. > To me, the mission of `completion-ignore-case' is limited to selection of > possible matches - it should do nothing except filter. It should have no effect > on the returned choice. > IOW, I agree that `completion-ignore-case' should "guarantee nothing" about the > case of the result. But the requirement is even stronger than that, IMO: > `c-i-c' has _nothing to do_ with the form of the result, including its case. > Whether the result is uppercase, lowercase, or mixed case should not be affected > by the value of `c-i-c'. It should be decided by the completion function (e.g. > `read-file-name-internal') or the set of completions provided (e.g. obarray, > alist). > Do we disagree about this "should"? I cannot speak to the difficulty of > implementation. I am not arguing that it is easy to DTRT. But it is not clear > whether you agree about what TRT is. Do you think `c-i-g' should have any > bearing at all on the case of the result? If so, then we disagree. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 24 10:37:33 2012 Received: (at 11718) by debbugs.gnu.org; 24 Jun 2012 14:37:34 +0000 Received: from localhost ([127.0.0.1]:55180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SinwT-0007C4-C3 for submit@debbugs.gnu.org; Sun, 24 Jun 2012 10:37:33 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:37788) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SinwR-0007Bx-6Q for 11718@debbugs.gnu.org; Sun, 24 Jun 2012 10:37:32 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5OEXdNA003042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 24 Jun 2012 14:33:40 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5OEXcb5019879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Jun 2012 14:33:39 GMT Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5OEXcqf018850; Sun, 24 Jun 2012 09:33:38 -0500 Received: from dradamslap1 (/10.159.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 24 Jun 2012 07:33:38 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <87vciss8q2.fsf@web.de> <616F17401403488B8C5153C00AD86CBF@us.oracle.com> Subject: RE: bug#11718: 24.1.50; `all-completions' returns results with wrong case Date: Sun, 24 Jun 2012 07:33:03 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac1RwzChPjemX3zFRYyfOnU1BTi5mgAUeAEQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11718 Cc: michael_heerdegen@web.de, 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > Drew, I have no idea what you're hoping to get. I already > agreed before you even sent a single message in this thread. > It's not like I'm rejecting a patch or something. Sorry, it was not clear to me that you agreed. Glad you do. FWIW, this is what sounded equivocal (unclear) to me: > While not strictly wrong, it is indeed an undesirable result. ^^^^^^^^^^^^^^^^^^ > I'll try and see how to fix it. > So while we do want to fix the problem, code should not > not assume anything about the particular case of the return ^^^^^^^^^^^^^^^^^^^ > string (which is only considered to be a "cosmetic" issue). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I did hear you say clearly that you want to fix the problem. But I also (apparently mis-) heard you saying that code should not expect the case of the return string to correspond to the completions provided by the COLLECTION arg. It sounded like your position might be that all bets are off wrt the result. Sorry for any noise. Glad you agree. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 24 12:42:24 2012 Received: (at 11718) by debbugs.gnu.org; 24 Jun 2012 16:42:24 +0000 Received: from localhost ([127.0.0.1]:55327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiptH-0001bQ-LV for submit@debbugs.gnu.org; Sun, 24 Jun 2012 12:42:23 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:12481) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiptE-0001bH-A0 for 11718@debbugs.gnu.org; Sun, 24 Jun 2012 12:42:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu0/O+L+Q/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="192014911" Received: from 206-248-191-144.dsl.teksavvy.com (HELO pastel.home) ([206.248.191.144]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2012 12:38:29 -0400 Received: by pastel.home (Postfix, from userid 20848) id A0C4152030; Sun, 24 Jun 2012 12:38:28 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case Message-ID: References: <87vciss8q2.fsf@web.de> <616F17401403488B8C5153C00AD86CBF@us.oracle.com> Date: Sun, 24 Jun 2012 12:38:28 -0400 In-Reply-To: (Drew Adams's message of "Sun, 24 Jun 2012 07:33:03 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11718 Cc: michael_heerdegen@web.de, 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > I did hear you say clearly that you want to fix the problem. Yes. > But I also (apparently mis-) heard you saying that code should not expect the > case of the return string to correspond to the completions provided by the > COLLECTION arg. It sounded like your position might be that all bets are off > wrt the result. The problem here is that you misunderstand what is the COLLECTION argument in the case at hand. It is *not* a table that completes filenames as they exist in the file-system. If you want that, then use completion-file-name-table. `read-file-name-internal' is a completion table that does other things to handle substitute-in-file-name rewrite (i.e. typically env-var expansion, $$-quoting, // and ~/ truncation); part of that makes it that you should not put too much faith in the case of the returned string. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 24 16:25:05 2012 Received: (at 11718) by debbugs.gnu.org; 24 Jun 2012 20:25:05 +0000 Received: from localhost ([127.0.0.1]:55486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SitMn-0008AX-2L for submit@debbugs.gnu.org; Sun, 24 Jun 2012 16:25:05 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:22414) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SitMk-0008AQ-R1 for 11718@debbugs.gnu.org; Sun, 24 Jun 2012 16:25:03 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5OKL8TC013874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 24 Jun 2012 20:21:09 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5OKL6JH000974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Jun 2012 20:21:07 GMT Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5OKL6V4007615; Sun, 24 Jun 2012 15:21:06 -0500 Received: from dradamslap1 (/10.159.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 24 Jun 2012 13:21:06 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <87vciss8q2.fsf@web.de> <616F17401403488B8C5153C00AD86CBF@us.oracle.com> Subject: RE: bug#11718: 24.1.50; `all-completions' returns results with wrong case Date: Sun, 24 Jun 2012 13:20:31 -0700 Message-ID: <38E9C991E50C40F3AA6B1306119CC96B@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac1SJ8oCuHPmLVK8RdSG5QIf7xJtGgAHMlrQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11718 Cc: michael_heerdegen@web.de, 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > The problem here is that you misunderstand what is the COLLECTION > argument in the case at hand. It is *not* a table that completes > filenames as they exist in the file-system. If you want > that, then use completion-file-name-table. The case at hand is the one Michael presented. All that is done in that code is to pass `minibuffer-completion-table' and `minibuffer-completion-predicate' to `all-completions'. The former happens to be `read-file-name-internal' in this case, but the code does not impose that (it comes from `read-file-name', which the code uses). > `read-file-name-internal' is a completion table that does > other things to handle substitute-in-file-name rewrite (i.e. > typically env-var expansion, $$-quoting, // and ~/ truncation); A priori I do not have a problem with any of that. Au contraire, I think. > part of that makes it that you should not put too much faith > in the case of the returned string. That's the part that I'm not sure follows. Logically. But I repeat that I cannot speak to the implementation, and I do not claim that it is easy to get it right. I am only saying that file-name completion - even with env-var expansion etc. - _should_ not change the case of file names for the return value. It is a bug if it it does, though not a major bug. (Again, "should" does not imply that it is easy to fix.) I'm not sure we disagree. And I hope you can fix this eventually, even if it is not a high priority. And I understand from your posts that this might not be easy, file names being mixed up with env-var substitution et tout le reste. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 24 21:42:06 2012 Received: (at 11718) by debbugs.gnu.org; 25 Jun 2012 01:42:06 +0000 Received: from localhost ([127.0.0.1]:55756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiyJa-0000xL-EA for submit@debbugs.gnu.org; Sun, 24 Jun 2012 21:42:06 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:55862) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiyJX-0000xD-8B for 11718@debbugs.gnu.org; Sun, 24 Jun 2012 21:42:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu0/O+L+Q/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="192028279" Received: from 206-248-191-144.dsl.teksavvy.com (HELO pastel.home) ([206.248.191.144]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2012 21:38:09 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2B5BB58BAA; Sun, 24 Jun 2012 21:38:09 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case Message-ID: References: <87vciss8q2.fsf@web.de> <616F17401403488B8C5153C00AD86CBF@us.oracle.com> <38E9C991E50C40F3AA6B1306119CC96B@us.oracle.com> Date: Sun, 24 Jun 2012 21:38:09 -0400 In-Reply-To: <38E9C991E50C40F3AA6B1306119CC96B@us.oracle.com> (Drew Adams's message of "Sun, 24 Jun 2012 13:20:31 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11718 Cc: michael_heerdegen@web.de, 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > it is easy to get it right. I am only saying that file-name > completion - even with env-var expansion etc. - _should_ not change > the case of file names for the return value. It is a bug if it it > does, though not a major bug. And what I'm saying is that a completion table which handles quoting such as read-file-name-internal returns file names which are partly taken from the completion input and partly from the file-system. So, what you perceive as "changing the case" is no change at all, it's just that the string you expect to come from the file-system actually comes from the user's input. > (Again, "should" does not imply that it is easy to fix.) And again, "should" only in the sense that it's better, not that it's needed for correctness. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 25 22:19:48 2012 Received: (at 11718) by debbugs.gnu.org; 26 Jun 2012 02:19:48 +0000 Received: from localhost ([127.0.0.1]:57966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SjLNc-000468-AG for submit@debbugs.gnu.org; Mon, 25 Jun 2012 22:19:48 -0400 Received: from mout.web.de ([212.227.15.3]:51026) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SjLNa-000460-G1 for 11718@debbugs.gnu.org; Mon, 25 Jun 2012 22:19:47 -0400 Received: from snow.dragon ([89.204.138.131]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0Lx77p-1Rlsz0253x-0173di; Tue, 26 Jun 2012 04:15:45 +0200 From: Michael Heerdegen To: Stefan Monnier Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case References: <87vciss8q2.fsf@web.de> <616F17401403488B8C5153C00AD86CBF@us.oracle.com> <38E9C991E50C40F3AA6B1306119CC96B@us.oracle.com> Date: Tue, 26 Jun 2012 04:17:54 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 24 Jun 2012 21:38:09 -0400") Message-ID: <878vfa7r59.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:ihcH65gEjupL/8YJDK9mlN3Kz7st5RhwO5dE0HTKLNC t7e1mMNSm9ZJ91lx0e/JBMg9MFRtTuHxw6E4zDraHazO4WPhuM /2m6mva5d3vHXapLgZM2otV9enL25SEJKXoT4+WVpgC0pHB7+S 8T6jvKI/esk8n+Rk+PwJHJ9Vq8GGJ3VVWtuIZ4G0NO3nXLLHwU N3LenU4zL1o1aPybW1fg9rI71GTUZXa21+4KAoZIHQ= X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 11718 Cc: 11718@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.1 (-) Hello Stefan, > And what I'm saying is that a completion table which handles quoting > such as read-file-name-internal returns file names which are partly > taken from the completion input and partly from the file-system. I'm still learning how that completion table stuff is working. I think, since Icicles doesn't respect quoting all the time anyway, we should suffice with this completion table: (completion-table-in-turn #'completion--embedded-envvar-table #'completion-file-name-table) ; not: completion--file-name-table which would circumvent the problem. But I have another question: (all-completions "/usr/share/emacs/24.1.50/lisp/$HO" #'completion--embedded-envvar-table) returns ("HOME"). What I would expect is ("$HOME"). Is this a bug? If not, is there a way to get ("$HOME")? Thank you for your patience, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 26 09:10:05 2012 Received: (at 11718) by debbugs.gnu.org; 26 Jun 2012 13:10:05 +0000 Received: from localhost ([127.0.0.1]:58357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SjVWv-0003RT-3F for submit@debbugs.gnu.org; Tue, 26 Jun 2012 09:10:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23634) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SjVWs-0003RM-Us for 11718@debbugs.gnu.org; Tue, 26 Jun 2012 09:10:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09sr+Nd/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="192116716" Received: from 108-175-227-93.dsl.teksavvy.com (HELO pastel.home) ([108.175.227.93]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Jun 2012 09:06:01 -0400 Received: by pastel.home (Postfix, from userid 20848) id DBA2F592BB; Tue, 26 Jun 2012 09:06:00 -0400 (EDT) From: Stefan Monnier To: Michael Heerdegen Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case Message-ID: References: <87vciss8q2.fsf@web.de> <616F17401403488B8C5153C00AD86CBF@us.oracle.com> <38E9C991E50C40F3AA6B1306119CC96B@us.oracle.com> <878vfa7r59.fsf@web.de> Date: Tue, 26 Jun 2012 09:06:00 -0400 In-Reply-To: <878vfa7r59.fsf@web.de> (Michael Heerdegen's message of "Tue, 26 Jun 2012 04:17:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11718 Cc: 11718@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > (all-completions "/usr/share/emacs/24.1.50/lisp/$HO" > #'completion--embedded-envvar-table) > returns ("HOME"). What I would expect is ("$HOME"). Is this a bug? No, it's a choice in completion--embedded-envvar-table. > If not, is there a way to get ("$HOME")? Sure. Take completion--embedded-envvar-table and change it to add the $ in front of its output and to subtract 1 from the `boundaries' it returns. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 08 19:17:47 2016 Received: (at 11718) by debbugs.gnu.org; 8 Jul 2016 23:17:47 +0000 Received: from localhost ([127.0.0.1]:42976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLf1n-0003ij-5a for submit@debbugs.gnu.org; Fri, 08 Jul 2016 19:17:47 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:34852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLf1l-0003iS-Se; Fri, 08 Jul 2016 19:17:46 -0400 Received: by mail-it0-f43.google.com with SMTP id u186so20897869ita.0; Fri, 08 Jul 2016 16:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:message-id:mime-version; bh=c+pwUGh/z1Fy1/CUx7KUPj2I0RqeZC4xd62vQl6PohY=; b=Dbgj7a6F9+2qIRbajGj7wa09us1mbsNAD5u/MOR38FXbKPJFk062I6fFClOnCgC9kN 6Hxeunzv7aJ3N/l7WZlDfDVnLVGXycuDxvrexAfnYMuS2jpJOrrYFt3PBx61dqV5kmBZ 3yhTw+SrnqXuVgWbP9uCCpD5tENEM587SwBjD+9GiPjMXx3Ud8CQjZvvXNzo7aEk20CS aSyXef33wNDGFXNK/Xnq2Ec7dFGn4Ymva0UVk9ODT6PVn/0DYMjjG/6f+qdziN8PxeHB djgCGBCRq3Llrjezc1cB32oViisTcGOL7A75aCKv5xeuC7rSED4kKbkqlZ5EHI2tDc5I DQWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :message-id:mime-version; bh=c+pwUGh/z1Fy1/CUx7KUPj2I0RqeZC4xd62vQl6PohY=; b=DaxnN4G76UUuV+bl3ODuycD6+S0HP245oKAcJe7tfzIlRPsBVAvQX3UF3JpBuUFweb pMlbp1jnqYVOzaeRdbPlGthOiMvurdvVktx8D9aOU1tHUY8Vb0URpEQsexFWrTV8Dqg8 TtOShDbAvjlaSJUGzaOK8XMuA5YJC8ttVEztUTDAHE1HGqRAe2ymij20wtkiYFVT2Aua DNB0UUPcczzeRD/tfLekjDOmdKM7ftBXIP7Ye7ojEtJ3vCOJKAT9qS1XVS8rUEg+Bui0 qCYgxgglOn8ZjuUGOMnW6PacsbJkBQLY6wU8dYjhdpJAY/jjEG3cKBhNrpAhMnDouPba 61gg== X-Gm-Message-State: ALyK8tLRuW8CYlM6ZFAj44SuTe2CKNktkJj70yHBuqvpTRkVfnoQpoR0ObUdlmno7jjzUQ== X-Received: by 10.36.110.142 with SMTP id w136mr5898853itc.63.1468019860489; Fri, 08 Jul 2016 16:17:40 -0700 (PDT) Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id p16sm4578292iod.25.2016.07.08.16.17.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jul 2016 16:17:39 -0700 (PDT) From: npostavs@users.sourceforge.net To: Michael Heerdegen Subject: Re: bug#11718: 24.1.50; `all-completions' returns results with wrong case References: <87vciss8q2.fsf@web.de> Date: Fri, 08 Jul 2016 19:17:38 -0400 Message-ID: <87vb0fiust.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 11718 Cc: 11718@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) found 11718 24.3 tags 11718 fixed close 11718 24.4 quit Michael Heerdegen writes: > Hello, > > I use emacs-snapshot on Debian Linux ("GNU Emacs 24.1.50.1 > (i486-pc-linux-gnu, GTK+ Version 3.4.2)\n of 2012-06-14 on zelenka, > modified by Debian"). > > I have a directory "~/Trash". If I eval > > (let ((completion-ignore-case t)) > (all-completions "~/tra" 'read-file-name-internal > 'file-exists-p nil)) > > in emacs -Q, I get > > (#("trash/" 0 3 (face completions-common-part))) > > Note the wrong lower case of the result. In Emacs 23, however, I get > > ("Trash/") Emacs 24.3 gives (#("trash/" 0 3 (face completions-common-part))) Emacs 24.4 gives (#("Trash/" 0 3 (face completions-common-part))) From unknown Fri Jun 20 07:17:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 06 Aug 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator