Skip to content
New issue

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

helm-fasd issue if used together with sunrise-commander #7

Open
wafgo opened this issue Mar 1, 2022 · 0 comments
Open

helm-fasd issue if used together with sunrise-commander #7

wafgo opened this issue Mar 1, 2022 · 0 comments

Comments

@wafgo
Copy link

wafgo commented Mar 1, 2022

Hi,
if using helm-fasd together with the sunrise-commander the following error occurs as soon as you try to open a sunrise pane via "M-x sunrise-cd"

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  make-process(:name "*fasd*" :buffer nil :command ("fasd" "--add" nil))
  start-process("*fasd*" nil "fasd" "--add" nil)
  (let ((file (if (string= major-mode "dired-mode") dired-directory (buffer-file-name)))) (start-process "*fasd*" nil "fasd" "--add" file))
  helm-find-fasd-add-file()
  run-hooks(change-major-mode-after-body-hook dired-mode-hook sunrise-mode-hook sunrise-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook dired-mode-hook sunrise-mode-hook sunrise-mode-hook))
  run-mode-hooks(sunrise-mode-hook)
  sunrise-mode()
  (let ((dired-listing-switches dired-listing-switches) (sorting-options (or (get sunrise-selected-window 'sorting-options) ""))) (if (string-match tramp-file-name-regexp default-directory) nil (setq dired-listing-switches (concat sunrise-listing-switches sorting-options))) (sunrise-mode) (dired-unadvertise dired-directory))
  (if (and (not (eq major-mode 'sunrise-mode))) (let ((dired-listing-switches dired-listing-switches) (sorting-options (or (get sunrise-selected-window 'sorting-options) ""))) (if (string-match tramp-file-name-regexp default-directory) nil (setq dired-listing-switches (concat sunrise-listing-switches sorting-options))) (sunrise-mode) (dired-unadvertise dired-directory)))
  sunrise-dired-mode()
  dired-readin()
  dired-internal-noselect("~/.emacs.d/custom/" nil)

The following patch fixes the problem, eventhough i dont think this is the right way doing it

--- a/helm-fasd.el
+++ b/helm-fasd.el
@@ -89,7 +89,7 @@
 (defun helm-find-fasd-add-file ()
   "Add file to fasd database."
   (unless (executable-find "fasd") (error "Helm-search-fasd: cannot find the fasd executable"))
-  (let ((file (if (string= major-mode "dired-mode") dired-directory (buffer-file-name))))
+  (let ((file (if (or (string= major-mode "dired-mode") (string= major-mode "sunrise-mode") ) dired-directory (buffer-file-name))))
     (start-process "*fasd*" nil "fasd" "--add" file)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant