I don't use dired
mode too often, but was trying to practice with it a bit. So I created a few empty practice text files and marked them with the usual dired shortcut key. Then I tried to rename the files using the "R" command--in order to move the files to a new folder. I get this odd error and the operation does not succeed.
apply: Wrong number of arguments: (8 . 8), 10 [3 times]
I ran into the same error when I tried to do a copy using the "C" command. But interestingly enough, the problem does not occur when I tried to do a delete with "D". Delete did work. So it seems like somewhere the apply
function is being used incorrectly.
I am using emacs version 25.3 and Spacemacs version 0.200.13.x on ubuntu linux 16.04 LTS.
Does anyone have a sense of why this error is occurring? Since dired
is part of the emacs core, I imagine there might be some conflict with a different package or something. I checked the spacemacs github repo issues list, but did not see any problems mentioned. Any help would be appreciated.
UPDATED
As per Phil's suggestion, here is the stacktrace:
Debugger entered--Lisp error: (wrong-number-of-arguments (8 . 8) 10)
helm-read-file-name-handler-1("Rename jarrett-iccv-09.pdf to: " read-file-name-internal file-exists-p nil "~/Downloads/" file-name-history nil nil "dired-do-rename" "*helm-mode-dired-do-rename*")
apply(helm-read-file-name-handler-1 ("Rename jarrett-iccv-09.pdf to: " read-file-name-internal file-exists-p nil "~/Downloads/" file-name-history nil nil "dired-do-rename" "*helm-mode-dired-do-rename*"))
helm--completing-read-default("Rename jarrett-iccv-09.pdf to: " read-file-name-internal file-exists-p nil "~/Downloads/" file-name-history nil nil)
apply(helm--completing-read-default ("Rename jarrett-iccv-09.pdf to: " read-file-name-internal file-exists-p nil "~/Downloads/" file-name-history nil nil))
#f(advice-wrapper :override completing-read-default helm--completing-read-default)("Rename jarrett-iccv-09.pdf to: " read-file-name-internal file-exists-p nil "~/Downloads/" file-name-history nil nil)
completing-read("Rename jarrett-iccv-09.pdf to: " read-file-name-internal file-exists-p nil "~/Downloads/" file-name-history nil)
read-file-name-default("Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil nil nil nil)
read-file-name("Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil nil nil nil)
ido-read-file-name("Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil nil nil nil)
apply(ido-read-file-name ("Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil nil nil nil))
#f(advice-wrapper :override #f(advice-wrapper :override read-file-name-default helm--generic-read-file-name) ido-read-file-name)("Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil nil nil nil)
read-file-name("Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil)
apply(read-file-name ("Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil))
dired-mark-pop-up(nil move ("jarrett-iccv-09.pdf") read-file-name "Rename jarrett-iccv-09.pdf to: " "/home/krishnab/Downloads/" nil)
dired-mark-read-file-name("Rename %s to: " "/home/krishnab/Downloads/" move nil ("jarrett-iccv-09.pdf") nil)
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)
UPDATED 2
There does seem to be a similar issue reported under the helm
github repository. Seems that helm and ido mode are not compatible.
https://github.com/emacs-helm/helm/issues/1819
There is also a reference to this in the helm
wiki.
https://github.com/emacs-helm/helm/wiki#use-helm-mode-and-ido-mode
I tried some of their suggestions, like adding
'(helm-completing-read-handlers-alist
(quote
((find-file-read-only . ido)
(find-alternate-file . nil))
But still getting the same error.
emacs -Q
? – philsemacs -Q
and then dired works correctly. The tricky thing is that I am using Spacemacs, so I am not seeing any strange errors in the Messages buffer. I also checked the help on thedired-do-rename
function and it seems to reference the regulardired
package. I thought that if it was overridden then I would see the name of the overriding package. Hmm, not sure where to look next? – krishnabM-x toggle-debug-on-error
gives you a stack trace when the error occurs, paste that into the question. DoesC-h k R
in dired confirm thatdired-do-rename
is actually what is being called? If so, does the help say that there is any advice defined for that function? (If so, what does it tell you about it?) – philsjarrett-XXX.pdf
. – krishnab