Skip to content

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

@mullikine

Description

@mullikine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions