We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find-dired
dirvish
emacs -Q
I have a minimal environment configured, loading vanilla dirvish from master (HEAD is 119f9f5), and can reproduce the issue.
When using find-dired, and selecting a file (using enter), I get the error:
signal: Wrong type argument: dirvish, nil
The error is in the function dirvish-find-entry-a. Basically, (dirvish-curr) returns nil.
dirvish-find-entry-a
(dirvish-curr)
The following patch works around the issue, but is probably not ideal (I believe dirvish is not properly initialized in find-dired buffers?):
diff --git a/dirvish.el b/dirvish.el index 07c50b8..ad89626 100644 --- a/dirvish.el +++ b/dirvish.el @@ -644,8 +644,11 @@ buffer, it defaults to filename under the cursor when it is nil." (append (list cmd) args))))) (if ex (apply #'start-process "" nil "nohup" (cl-substitute file "%f" ex :test 'string=)) - (let* ((dv (dirvish-curr)) (fn (nth 4 (dv-type dv)))) - (if fn (funcall fn) (dirvish-kill dv))) + (let* ((dv (dirvish-curr)) + (fn (and dv (nth 4 (dv-type dv))))) + (if fn + (funcall fn) + (and dv (dirvish-kill dv)))) (find-file file)))))) (defun dirvish-insert-subdir-a (dirname &rest _)
M-x find-dired
(with some args)
try to open a listed file
Pressing enter should open the file at point
Linux
29
Vanilla
Debugger entered--Lisp error: (wrong-type-argument dirvish nil) signal(wrong-type-argument (dirvish nil)) (or (progn (and (memq (type-of dv) cl-struct-dirvish-tags) t)) (signal 'wrong-type-argument (list 'dirvish dv))) (progn (or (progn (and (memq (type-of dv) cl-struct-dirvish-tags) t)) (signal 'wrong-type-argument (list 'dirvish dv))) (aref dv 1)) (nth 4 (progn (or (progn (and (memq (type-of dv) cl-struct-dirvish-tags) t)) (signal 'wrong-type-argument (list 'dirvish dv))) (aref dv 1))) (let* ((dv (dirvish-curr)) (fn (nth 4 (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... dv))) (aref dv 1))))) (if fn (funcall fn) (dirvish-kill dv))) (if ex (apply #'start-process "" nil "nohup" (cl-substitute file "%f" ex :test 'string=)) (let* ((dv (dirvish-curr)) (fn (nth 4 (progn (or (progn ...) (signal ... ...)) (aref dv 1))))) (if fn (funcall fn) (dirvish-kill dv))) (find-file file)) (let* ((ext (downcase (or (file-name-extension entry) ""))) (file (expand-file-name entry)) (process-connection-type nil) (ex (let* ((--cl-var-- dirvish-open-with-programs) (args nil) (exts nil) (cmd nil) (--cl-flag-- t) --cl-var--) (while (and (consp --cl-var--) (progn (progn ... ... ...) (setq --cl-flag-- ...))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--))) (if ex (apply #'start-process "" nil "nohup" (cl-substitute file "%f" ex :test 'string=)) (let* ((dv (dirvish-curr)) (fn (nth 4 (progn (or ... ...) (aref dv 1))))) (if fn (funcall fn) (dirvish-kill dv))) (find-file file))) (if buffer (switch-to-buffer buffer) (let* ((ext (downcase (or (file-name-extension entry) ""))) (file (expand-file-name entry)) (process-connection-type nil) (ex (let* ((--cl-var-- dirvish-open-with-programs) (args nil) (exts nil) (cmd nil) (--cl-flag-- t) --cl-var--) (while (and (consp --cl-var--) (progn ... ...)) (setq --cl-var-- (cdr --cl-var--))) --cl-var--))) (if ex (apply #'start-process "" nil "nohup" (cl-substitute file "%f" ex :test 'string=)) (let* ((dv (dirvish-curr)) (fn (nth 4 (progn ... ...)))) (if fn (funcall fn) (dirvish-kill dv))) (find-file file)))) (let* ((entry (or entry (dired-get-filename nil t))) (buffer (cond ((string-prefix-p "🔍" entry) (dirvish-fd-find entry)) ((file-directory-p entry) (dired-noselect entry)) ((string-suffix-p "/" entry) (user-error (concat entry " is not a valid directory")))))) (if buffer (switch-to-buffer buffer) (let* ((ext (downcase (or (file-name-extension entry) ""))) (file (expand-file-name entry)) (process-connection-type nil) (ex (let* ((--cl-var-- dirvish-open-with-programs) (args nil) (exts nil) (cmd nil) (--cl-flag-- t) --cl-var--) (while (and ... ...) (setq --cl-var-- ...)) --cl-var--))) (if ex (apply #'start-process "" nil "nohup" (cl-substitute file "%f" ex :test 'string=)) (let* ((dv (dirvish-curr)) (fn (nth 4 ...))) (if fn (funcall fn) (dirvish-kill dv))) (find-file file))))) dirvish-find-entry-a() apply(dirvish-find-entry-a nil) dired-find-file() funcall-interactively(dired-find-file) command-execute(dired-find-file)
dirvish-issue.org
The text was updated successfully, but these errors were encountered:
Add workaround for alexluigit#261
f5e1d6c
Credit goes to @timcharper Signed-off-by: Björn Bidar <[email protected]>
c3e26c3
No branches or pull requests
Thank you for the bug report
dirvish
related packages.the command
emacs -Q
.Bug description
I have a minimal environment configured, loading vanilla dirvish from master (HEAD is 119f9f5), and can reproduce the issue.
When using
find-dired
, and selecting a file (using enter), I get the error:The error is in the function
dirvish-find-entry-a
. Basically,(dirvish-curr)
returns nil.The following patch works around the issue, but is probably not ideal (I believe dirvish is not properly initialized in find-dired buffers?):
Steps to reproduce
M-x find-dired
(with some args)
try to open a listed file
Expected behavior
Pressing enter should open the file at point
OS
Linux
Emacs Version
29
Emacs Configurations
Vanilla
Error callstack
Anything else
Demo of issue
dirvish-issue.org
The text was updated successfully, but these errors were encountered: