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

How to use (helm-org-capture-templates) within other persistent actions? #7

Open
leungbk opened this issue Sep 14, 2019 · 0 comments
Open

Comments

@leungbk
Copy link

leungbk commented Sep 14, 2019

(require 'helm)
(require 'helm-org)

;; [...]

(defun my-helm-extension/org-capture (cand)
  ;; [some code to add my own `org-capture' templates...]
  (helm-org-capture-templates))

(defvar my-helm-extension/helm-source
  (helm-build-sync-source " My extension"
    :candidates #'my-extension/compute-candidates
    :action (helm-make-actions
             "Org capture" #'my-helm-extension/org-capture)))

;;;###autoload
(defun my-helm-extension ()
  "My Helm extension"
  (interactive)
  (helm :sources my-helm-extension/helm-source
        :buffer "*my-helm-extension*"))

I've written a helm extension that is structured like this. The normal action my-helm-extension/org-capture works fine, but when I try to call the persistent version of this action with C-j, then helm-alive-p is t, (helm--alive-p) is nil, and I abort the helm session entirely at helm-keyboard-quit:

https://github.com/emacs-helm/helm/blob/c00b5826c1d5797debe92ed235d50b068a348c14/helm.el#L2455.

This is not what I expect; I want to perform the org-capture and subsequently return to the my-helm-extension helm session. Is it wrong of me to use helm-org-capture-templates in this manner?

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