TAB autocompletion in dired producing error args-out-of-range

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

TAB autocompletion in dired producing error args-out-of-range

Pankaj Jangid
I have a file "a.txt". The directory is opened in dired. When I try to
rename it I press R over it and for autocompletion I press "a" and
<TAB>. I get the following error. Is this behaviour expected?

This is macOS build on today's commit
84a3793b194efe92e2eb80cd0f625f3324bf4cae. (v27.0.50)

Error:

Debugger entered--Lisp error: (args-out-of-range "a.txt" 3 2)
  file-name-completion("a" "~/work/temp/" file-exists-p)
  completion-file-name-table("~/work/temp/a" file-exists-p nil)
  try-completion("~/work/temp/a" completion-file-name-table file-exists-p)
  completion-basic-try-completion("~/work/temp/a" completion-file-name-table file-exists-p 13)
  #f(compiled-function (style) #<bytecode 0x1ff268afc2b5>)(basic)
  completion--some(#f(compiled-function (style) #<bytecode 0x1ff268afc2b5>) (basic partial-completion emacs22))
  completion--nth-completion(1 "~/work/temp/a" read-file-name-internal file-exists-p 13 (metadata (category . file) (completion--unquote-requote . t)))
  completion-try-completion("~/work/temp/a" read-file-name-internal file-exists-p 13 (metadata (category . file) (completion--unquote-requote . t)))
  completion--do-completion(18 31)
  completion--in-region-1(18 31)
  #f(compiled-function (start end collection predicate) #<bytecode 0x430e824b>)(18 31 read-file-name-internal file-exists-p)
  apply(#f(compiled-function (start end collection predicate) #<bytecode 0x430e824b>) (18 31 read-file-name-internal file-exists-p))
  #f(compiled-function (funs global args) #<bytecode 0x1ff268afc21d>)(nil nil (18 31 read-file-name-internal file-exists-p))
  completion--in-region(18 31 read-file-name-internal file-exists-p)
  completion-in-region(18 31 read-file-name-internal file-exists-p)
  minibuffer-complete()
  funcall-interactively(minibuffer-complete)
  call-interactively(minibuffer-complete nil nil)
  command-execute(minibuffer-complete)
  read-from-minibuffer("Rename a.txt to: " "~/work/temp/" (keymap (keymap (32)) 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 "~/work/temp/a.txt" nil)
  completing-read-default("Rename a.txt to: " read-file-name-internal file-exists-p nil "~/work/temp/" file-name-history "~/work/temp/a.txt" nil)
  completing-read("Rename a.txt to: " read-file-name-internal file-exists-p nil "~/work/temp/" file-name-history "~/work/temp/a.txt")
  read-file-name-default("Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt" nil nil nil)
  read-file-name("Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt" nil nil nil)
  ido-read-file-name("Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt" nil nil nil)
  apply(ido-read-file-name ("Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt" nil nil nil))
  #f(advice-wrapper :override read-file-name-default ido-read-file-name)("Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt" nil nil nil)
  read-file-name("Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt")
  apply(read-file-name ("Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt"))
  dired-mark-pop-up(nil move ("a.txt") read-file-name "Rename a.txt to: " "/Users/pankaj/work/temp/" "/Users/pankaj/work/temp/a.txt")
  dired-mark-read-file-name("Rename %s to: " "/Users/pankaj/work/temp/" move nil ("a.txt") "/Users/pankaj/work/temp/a.txt")
  dired-do-create-files(move dired-rename-file "Move" nil t "Rename")
  dired-do-rename(nil)
  funcall-interactively(dired-do-rename nil)
  call-interactively(dired-do-rename nil nil)
  command-execute(dired-do-rename)

--
Pankaj Jangid

Reply | Threaded
Open this post in threaded view
|

Re: TAB autocompletion in dired producing error args-out-of-range

Stefan Monnier
> I have a file "a.txt". The directory is opened in dired. When I try to
> rename it I press R over it and for autocompletion I press "a" and
> <TAB>. I get the following error. Is this behaviour expected?

No, it's clearly not normal.

> Debugger entered--Lisp error: (args-out-of-range "a.txt" 3 2)
>   file-name-completion("a" "~/work/temp/" file-exists-p)

I suggest you M-x report-emacs-bug so we get a bug number to track it.


        Stefan


Reply | Threaded
Open this post in threaded view
|

Re: TAB autocompletion in dired producing error args-out-of-range

Pankaj Jangid
>> I have a file "a.txt". The directory is opened in dired. When I try to
>> rename it I press R over it and for autocompletion I press "a" and
>> <TAB>. I get the following error. Is this behaviour expected?
>
> No, it's clearly not normal.
>
>> Debugger entered--Lisp error: (args-out-of-range "a.txt" 3 2)
>>   file-name-completion("a" "~/work/temp/" file-exists-p)
>
> I suggest you M-x report-emacs-bug so we get a bug number to track it.
>
Sure. I'll do it today.

--
Pankaj Jangid

Reply | Threaded
Open this post in threaded view
|

Re: TAB autocompletion in dired producing error args-out-of-range

Pankaj Jangid
In reply to this post by Stefan Monnier
>> I have a file "a.txt". The directory is opened in dired. When I try to
>> rename it I press R over it and for autocompletion I press "a" and
>> <TAB>. I get the following error. Is this behaviour expected?
>
> No, it's clearly not normal.
>
>> Debugger entered--Lisp error: (args-out-of-range "a.txt" 3 2)
>>   file-name-completion("a" "~/work/temp/" file-exists-p)
>
> I suggest you M-x report-emacs-bug so we get a bug number to track it.
>
Done. Reported this bug.

The issues was introduced in commit
84a3793b194efe92e2eb80cd0f625f3324bf4cae.

--
Pankaj Jangid

Reply | Threaded
Open this post in threaded view
|

Re: TAB autocompletion in dired producing error args-out-of-range

Eli Zaretskii
> From: Pankaj Jangid <[hidden email]>
> Date: Mon, 04 Nov 2019 10:55:00 +0530
> Cc: emacs-devel <[hidden email]>
>
> Done. Reported this bug.
>
> The issues was introduced in commit
> 84a3793b194efe92e2eb80cd0f625f3324bf4cae.

FTR: the issue was actually introduced in 0b21ecd.

Reply | Threaded
Open this post in threaded view
|

Re: TAB autocompletion in dired producing error args-out-of-range

Pankaj Jangid
Eli Zaretskii <[hidden email]> writes:

>> From: Pankaj Jangid <[hidden email]>
>> Date: Mon, 04 Nov 2019 10:55:00 +0530
>> Cc: emacs-devel <[hidden email]>
>>
>> Done. Reported this bug.
>>
>> The issues was introduced in commit
>> 84a3793b194efe92e2eb80cd0f625f3324bf4cae.
>
> FTR: the issue was actually introduced in 0b21ecd.

Yes. Correct. Error in my report.


--
Pankaj Jangid