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

When using helm from terminal emacs, typing too quickly may result in helm unexpectedly closing #198

Open
mullikine opened this issue May 17, 2021 · 0 comments

Comments

@mullikine
Copy link

This relates to the following issue in helm.

emacs-helm/helm#2417

The issue is that helm-dash uses :candidates instead of :candidates-process. In terminal emacs, this will break because a C-g is generated by typing quickly as the terminal will hang while generating candidates with the external process.

(defun helm-dash--build-source (docset)
  "Build a Helm source for DOCSET."
  (lexical-let ((docset docset))
    (helm-build-sync-source (car docset)
      :action-transformer #'helm-dash-actions
      :candidates (lambda ()
                    (cl-loop for row in (helm-dash--run-query docset helm-pattern)
                             collect (helm-dash--candidate docset row)))
      :volatile t
      :persistent-help "View doc"
      :requires-pattern helm-dash-min-length)))

That would require some re-engineering. Alternatively, a inhibit-quit can be placed inside the lambda. This would fix it for terminal emacs.

Here is an example of the correct way to implement a source by using an emacs process.

https://github.com/emacs-helm/helm-notmuch/blob/97a01497e079a7b6505987e9feba6b603bbec288/helm-notmuch.el#L74

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

Successfully merging a pull request may close this issue.

1 participant