emacs-configuration icon indicating copy to clipboard operation
emacs-configuration copied to clipboard

elpy-occur-definitions integrated with helm

Open humitos opened this issue 8 years ago • 2 comments

occur searches for occurrences in the current buffer, and elpy- uses a regex to search only for classes and functions. So, I want to integrate them with helm.

The problem is that elpy- and occur open a new buffer instead of returning a list of candidates (which is needed by helm as input).

(defun helm-elpy-occur-definitions ()
  (interactive)
  (helm :sources (occur "^ *\\(def\\|class\\) ")
        :buffer "*helm elpy occur definition*"))

humitos avatar Nov 20 '16 21:11 humitos

(helm-occur)

does exactly what I want, but I didn't find a way yo call it with a pre-defined regex

humitos avatar Jun 12 '17 02:06 humitos

Regex passed to helm-occur to get the same result ^ *\(def\|class\)

humitos avatar Jun 20 '17 23:06 humitos