Skip to content

Instantly share code, notes, and snippets.

@PuercoPop
Created April 3, 2014 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PuercoPop/9949421 to your computer and use it in GitHub Desktop.
Save PuercoPop/9949421 to your computer and use it in GitHub Desktop.
(defun helm-venv-workon ()
"Like venv-work, for helm."
(interactive)
(helm :sources 'helm-source-venv
:helm-buffer "*Virtual Environments*"))
(defun helm-venv-workon (candidate)
nil)
(defvar helm-source-venv
`((name . "Virtual env completion")
(candidates . ,(cl-loop
for venv in (venv-get-candidates)
collect venv) )
(action . (("activate" . helm-venv-workon)))
(persistent-action . helm-venv-workon)
(persistent-help . "Get activate the virtualenv.")))
(helm-venv-workon)
;; Backtrace
Debugger entered--Lisp error: (wrong-type-argument window-live-p nil)
select-window(nil norecord)
helm-update(nil)
helm-read-pattern-maybe(nil nil nil nil nil nil nil)
#[0 "\312\211\211\211\305\206\n ...
helm-internal(helm-source-venv nil nil nil nil nil nil nil nil)
apply(helm-internal (helm-source-venv nil nil nil nil nil nil nil nil))
helm(helm-source-venv nil nil nil nil nil nil nil nil)
apply(helm (helm-source-venv nil nil nil nil nil nil nil nil))
#[0 "\303\301\304\305\306\307\310\311\300!\312\"\313\314%\n\"\"\207" [(:sources helm-source-venv :helm-buffer "*Virtual Environments*") helm helm-argument-keys apply mapcar make-byte-code 257 "\301\300\"\207" vconcat vector [plist-get] 4 "\n\n(fn KEY)"] 9 "\n\n(fn)"]()
helm-let-internal(((helm-buffer . "*Virtual Environments*")) #[0 "\303\301\304\305\306\307\310\311\300!\312\"\313\314%\n\"\"\207" [(:sources helm-source-venv :helm-buffer "*Virtual Environments*") helm helm-argument-keys apply mapcar make-byte-code 257 "\301\300\"\207" vconcat vector [plist-get] 4 "\n\n(fn KEY)"] 9 "\n\n(fn)"])
helm(:sources helm-source-venv :helm-buffer "*Virtual Environments*")
helm-venv-workon()
eval((helm-venv-workon) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment