unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* TAB autocompletion in dired producing error args-out-of-range
@ 2019-11-03 20:06 Pankaj Jangid
  2019-11-03 20:23 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Pankaj Jangid @ 2019-11-03 20:06 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-04 17:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-03 20:06 TAB autocompletion in dired producing error args-out-of-range Pankaj Jangid
2019-11-03 20:23 ` Stefan Monnier
2019-11-04  3:24   ` Pankaj Jangid
2019-11-04  5:25   ` Pankaj Jangid
2019-11-04 16:08     ` Eli Zaretskii
2019-11-04 17:52       ` Pankaj Jangid

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).