all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 11339@debbugs.gnu.org, stefan@marxist.se
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	[thread overview]
Message-ID: <87lfsvyd4i.fsf@gmx.net> (raw)
In-Reply-To: <83eeyphr5q.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Nov 2019 18:16:01 +0200")

[-- Attachment #1: Type: text/plain, Size: 1969 bytes --]

On Sun, 03 Nov 2019 18:16:01 +0200 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> 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 with
>> 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 characters
>> (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 the
>> 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-completion-ignore-case t)
2. M-x cd RET RET => 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


[-- Attachment #2: backtrace --]
[-- Type: text/plain, Size: 5102 bytes --]

Debugger entered--Lisp error: (args-out-of-range ".mupdf.history" 12 2)
  file-name-completion("" "~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>))
  completion-file-name-table("~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>) nil)
  try-completion("~/" completion-file-name-table #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>))
  completion--file-name-table("~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>) nil)
  complete-with-action(nil completion--file-name-table "~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>))
  #f(compiled-function (table) #<bytecode 0xa35ad9>)(completion--file-name-table)
  completion--some(#f(compiled-function (table) #<bytecode 0xa35ad9>) (completion--embedded-envvar-table completion--file-name-table))
  read-file-name-internal("~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>) nil)
  locate-file-completion-table(("./") nil "~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>) nil)
  apply(locate-file-completion-table (("./") nil "~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>) nil))
  #f(compiled-function (&rest args2) #<bytecode 0xa2124d>)("~/" #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>) nil)
  try-completion("~/" #f(compiled-function (&rest args2) #<bytecode 0xa2124d>) #f(compiled-function (dir) #<bytecode 0x1fe7fb916111>))
  completion--complete-and-exit(27 29 exit-minibuffer #f(compiled-function () #<bytecode 0xa35a99>))
  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 (32)) keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one 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 (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\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 . next-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-internal 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/steve/" 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\320\321!!\2064\0..." [cd-path default-directory #f(compiled-function () #<bytecode 0x1fe7fb9160d9>) nil make-byte-code 0 "\302\303\301\242\"\210\300 \207" vconcat vector [remove-hook minibuffer-setup-hook] 3 "\301\302\300\242\"\207" [remove-hook minibuffer-setup-hook] add-hook minibuffer-setup-hook parse-colon-path getenv "CDPATH" "./" read-directory-name "Change default directory: " 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)

  reply	other threads:[~2019-11-04 13:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25 15:37 bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Stephen Berman
2013-07-08 22:08 ` Stephen Berman
2019-11-01 19:57 ` Stefan Kangas
2019-11-01 20:20   ` Eli Zaretskii
2019-11-01 22:37     ` Stephen Berman
2019-11-02  7:11       ` Eli Zaretskii
2019-11-02 15:09         ` Stephen Berman
2019-11-03 16:16           ` Eli Zaretskii
2019-11-04 13:39             ` Stephen Berman [this message]
2019-11-04 16:21               ` Eli Zaretskii
2019-11-04 16:22               ` Stephen Berman
2019-11-04 17:12                 ` Eli Zaretskii
2019-11-04 18:02                   ` Stephen Berman
2019-11-06 16:58                     ` Eli Zaretskii
2019-11-07 14:34                       ` Stephen Berman
2019-11-07 14:49                         ` Eli Zaretskii
2019-11-07 16:01                         ` Stefan Monnier
2019-11-07 16:08                           ` Eli Zaretskii
2019-11-07 16:27                             ` Stefan Monnier
2019-11-07 18:12                               ` Eli Zaretskii
2019-11-08 22:36                                 ` Stefan Monnier
2019-11-09  9:20                                   ` Eli Zaretskii
2019-11-09 17:56                                     ` Stephen Berman
2019-11-09 18:24                                     ` Stefan Monnier
2019-11-09 19:57                                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfsvyd4i.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=11339@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.