From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Date: Mon, 04 Nov 2019 14:39:25 +0100 Message-ID: <87lfsvyd4i.fsf@gmx.net> References: <87ehrbyg8t.fsf@escher.home> <87lfszxtcl.fsf@marxist.se> <83bltvl55x.fsf@gnu.org> <87o8xvz0hp.fsf@gmx.net> <83tv7mkb0l.fsf@gnu.org> <87d0ea9uxg.fsf@gmx.net> <83eeyphr5q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="101215"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 11339@debbugs.gnu.org, stefan@marxist.se To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 04 14:40:37 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iRcaz-000QDI-6b for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2019 14:40:37 +0100 Original-Received: from localhost ([::1]:32934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRcax-0002eB-Bl for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2019 08:40:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52916) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRcaV-0002cG-5F for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 08:40:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRcaT-0000mV-Fe for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 08:40:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55435) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRcaT-0000mO-C4 for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 08:40:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iRcaQ-00050c-4x for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 08:40:05 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Nov 2019 13:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11339 X-GNU-PR-Package: emacs Original-Received: via spool by 11339-submit@debbugs.gnu.org id=B11339.157287478319213 (code B ref 11339); Mon, 04 Nov 2019 13:40:02 +0000 Original-Received: (at 11339) by debbugs.gnu.org; 4 Nov 2019 13:39:43 +0000 Original-Received: from localhost ([127.0.0.1]:36023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRca6-0004zo-VB for submit@debbugs.gnu.org; Mon, 04 Nov 2019 08:39:43 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:42245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRca5-0004za-7J for 11339@debbugs.gnu.org; Mon, 04 Nov 2019 08:39:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572874771; bh=AiMNbhvNldN1GxJxjKaQ0C2VzQOY2Gcn6JfGa62K/8M=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Io4nfaDD7iipd/uLugBqc4f5q3dT9d0CrRbqWm6fTbyGq0m6p7wQ5tU5lkJ9YU5Kl c1jrYRRsaswS3jQ2C3unk+7uZNoupv2d1rj9PMfrcGoOPsO+H+iUoZ9i4DSG8bEObz lT0bU11QgN5CHoxbDkc4fAACItDlJVhZ+23yiOgU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-lfs84 ([188.109.197.143]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MS3ir-1iLs6r2hqt-00TQm2; Mon, 04 Nov 2019 14:39:30 +0100 In-Reply-To: <83eeyphr5q.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Nov 2019 18:16:01 +0200") X-Provags-ID: V03:K1:4Wi/Q7pL+JN6uzkRJJ81MxkRb44bY07IDdcr+MKMwgtY6WulRqX O8P8uWLVQn86Exc9xTwCN6G3N9AbVwOaMrmTFYayQPlGKpPAu0yfrCprbQmYtGqu+8m7DvX ktzNHpwZkUBGEJqBJHf8jRAW+NE7quKeO2IgJ3NxyDfJBEbsMClTbFQfBke24hQwpDvbj38 gigPoZMZmIANnpAj+S47w== X-UI-Out-Filterresults: notjunk:1;V03:K0:Rx7DDqzmtIM=:mAesZci1lJG7OjHAzktSxR wURxACc+axzgGG9m9MSFp4SyqKtzI5x61kBSp3S0ry5gruFP8KAmv3abJfYH4cfuft+0LeULY YrPuFjAUK4B2R6ssm/ES4vD5pSMmSxHhHUeBNvRPQdwBW7CVT2xs7EfRcIGwaCcvER5vlGae2 Lei6gh292tivDylC1wlqDJaICA19Vy0WT4AI/ZE8XW2waKnnnRnYTYw/DgKkpQZbxf8wioBaD YHHKcaERv77RULVPuG6WnmcyJcc6on8GjOnaj0QrigGXqqnIgOE4GJaayUC5fXqQcA0Yti09T opZQn6l8BRtnbulZ6lOhxM4/TikNGjP+CFmCGZBh+ztFAIcjdToJi5vtxc6UABvdXANmz8tmU 83Yh9yjQWzCKf4Uh0Q+tQHVvW1bjkZla8db4G8WZy4gdN1iIcUKyWPvTZSL2hJ62NAmIYTYEX H4NAP+pEvD9bGCcSEDd6gkKp/0iVLzEtRT3eNNPayocUZf/A9BM0v3VjP5GVrdTd0XoZnswlZ 02WkS6VSnUwbDgUl4FWtk8n1lLAe75bctloVj+WpHwZpxJAatseWBXV02h0yYrIHk3D40ejdW 0Tq1EHwT7UzPqbvAt/xhw290dCPKR7N7t0uJ9JPyXKa4fXJ8IOr+YkIhVpt6iCoLqgYqRoTX8 zmAOaRbDS6Q1TW4aPVcLaOmwZemAsUHTiTjeFjCoVTfz4ev5iB7YFwEb88/P+uVdcuET+HvVV lGjYo8hrHELWu0VDK4u5lNcSGqbm7Wb5ljOizi60PojuxuocQFoQwHQtL9rojqGxgOAlyjBc X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170932 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 03 Nov 2019 18:16:01 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: stefan@marxist.se, 11339@debbugs.gnu.org >> Date: Sat, 02 Nov 2019 16:09:31 +0100 >> >> Concerning my followup to my OP, that involved another difference I >> observed in completion behavior between buffer names and file names wit= h >> non-ASCII characters when *-completion-ignore-case is non-nil, and >> that's what the recipe above shows in more detail than in my followup, >> which didn't explicitly contrast the behavior with ASCII-only character= s >> (the above recipe also uses names that differ beyond the case >> differences, to avoid the question of expectations where only case >> differs): with buffer names, all completions are shown regardless of th= e >> case of the input, but with file names, completion is done according to >> the case of the input, i.e. read-file-name-completion-ignore-case >> appears to have no effect (again, only when the names contain non-ASCII >> characters). This seems to be a clear bug. > > Yes, it was a bug, and a very old one: our case-insensitive comparison > of file names worked by bytes, which is only TRT for pure-ASCII > strings. > > I hope I fixed this now, please try the latest master. I've now updated and, the above bug is now fixed; thanks. However, there seems to be some unintended fallout: 0. emacs -Q 1. M-: (setq read-buffer-completion-ignore-case t read-file-name-completio= n-ignore-case t) 2. M-x cd RET RET =3D> args-out-of-range error (backtrace attached) This only seems to happen when trying to cd to a non-empty directory. Judging by the backtrace, it also seems to be the same as bug#38056, except that I cannot reproduce the error initially using the recipe of that bug, but only with the one I gave above. But once the error occurs, all subsequent uses of TAB or RET for completion appear to raise the error. Steve Berman --=-=-= Content-Type: text/plain Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable Content-Description: backtrace Debugger entered--Lisp error: (args-out-of-range ".mupdf.history" 12 2) file-name-completion("" "~/" #f(compiled-function (dir) #)) completion-file-name-table("~/" #f(compiled-function (dir) #) nil) try-completion("~/" completion-file-name-table #f(compiled-function (dir)= #)) completion--file-name-table("~/" #f(compiled-function (dir) #) nil) complete-with-action(nil completion--file-name-table "~/" #f(compiled-fun= ction (dir) #)) #f(compiled-function (table) #)(completion--file-name-= table) completion--some(#f(compiled-function (table) #) (comp= letion--embedded-envvar-table completion--file-name-table)) read-file-name-internal("~/" #f(compiled-function (dir) #) nil) locate-file-completion-table(("./") nil "~/" #f(compiled-function (dir) #= ) nil) apply(locate-file-completion-table (("./") nil "~/" #f(compiled-function = (dir) #) nil)) #f(compiled-function (&rest args2) #)("~/" #f(compiled= -function (dir) #) nil) try-completion("~/" #f(compiled-function (&rest args2) #) #f(compiled-function (dir) #)) completion--complete-and-exit(27 29 exit-minibuffer #f(compiled-function = () #)) completion-complete-and-exit(27 29 exit-minibuffer) minibuffer-complete-and-exit() funcall-interactively(minibuffer-complete-and-exit) call-interactively(minibuffer-complete-and-exit nil nil) command-execute(minibuffer-complete-and-exit) read-from-minibuffer("Change default directory: " "~/" (keymap (keymap (3= 2)) keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-an= d-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "C= omplete" minibuffer-complete :help "Complete as far as possible") (space me= nu-item "Complete Word" minibuffer-complete-word :help "Complete at most on= e word") (63 menu-item "List Completions" minibuffer-completion-help :help = "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to= -completions)) (prior . switch-to-completions) (63 . minibuffer-completion-= help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (men= u-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous Histor= y Item" previous-history-element :help "Put previous minibuffer history ele= ment in the min...") (next menu-item "Next History Item" next-history-eleme= nt :help "Put next minibuffer history element in the minibuf...") (isearch-= backward menu-item "Isearch History Backward" isearch-backward :help "Incre= mentally search minibuffer history backward") (isearch-forward menu-item "I= search History Forward" isearch-forward :help "Incrementally search minibuf= fer history forward") (return menu-item "Enter" exit-minibuffer :key-sequen= ce "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit= " abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf"))= (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (= C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back= . previous-history-element) (up . previous-line-or-history-element) (prior= . previous-history-element) (XF86Forward . next-history-element) (down . n= ext-line-or-history-element) (next . next-history-element) (27 keymap (60 .= minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) = (115 . next-matching-history-element) (112 . previous-history-element) (110= . next-history-element))) nil file-name-history "~/" nil) completing-read-default("Change default directory: " read-file-name-inter= nal file-directory-p t "~/" file-name-history "~/" nil) completing-read("Change default directory: " read-file-name-internal file= -directory-p t "~/" file-name-history "~/") read-file-name-default("Change default directory: " "/home/steve/" "/home= /steve/" t nil file-directory-p) read-file-name("Change default directory: " "/home/steve/" "/home/steve/"= t nil file-directory-p) read-directory-name("Change default directory: " "/home/steve/" "/home/st= eve/" t) byte-code("\302\303C\211\304\305\306\307\310\6\7\6\7\"\311\"\312$\240\210= \304\305\313\307\310\5!\314\"\312$\216\315\316\2\242\"\210\10\2045\0\317\32= 0\321!!\2064\0..." [cd-path default-directory #f(compiled-function () #) nil make-byte-code 0 "\302\303\301\242\"\210\300 \20= 7" vconcat vector [remove-hook minibuffer-setup-hook] 3 "\301\302\300\242\"= \207" [remove-hook minibuffer-setup-hook] add-hook minibuffer-setup-hook pa= rse-colon-path getenv "CDPATH" "./" read-directory-name "Change default dir= ectory: " t] 10) call-interactively(cd record nil) command-execute(cd record) execute-extended-command(nil "cd" "cd") funcall-interactively(execute-extended-command nil "cd" "cd") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) --=-=-=--