how can I call common helm specific actions on results from non-helm specific operations? #2557
Replies: 1 comment
-
Fred Fu ***@***.***> writes:
Hi Thierry and Helm veterans,
If I understand correctly, after enabling helm via (helm-mode 1), helm
takes over all the complete-read. The problem is that there is no
actions other than the default identity action on the resulting
candidates.
This is intended, see the helm-mode node in helm documentation.
Besides writing a helm extension for project-find-file,
If your project is managed by Git, you can install helm-ls-git and
browse your project with helm-browse-project.
is there a simple way to allow helm to call file-related actions on
the targets above?
No, not on generic helm functions, the goal of this functions is to
behave exactly like the vanilla completing-read they actually replace.
Example:
Consider the following function:
(defun foo ()
(interactive)
(let ((str (completing-read "test: " '("foo" "bar" "baz"))))
(do-something-on-str str)))
What if we allow arbitrary actions on the completing-read?
What the function do-something-on-str is now intended to do if you
already did something different on the resulting string?
And anyway the action you may run from the completing-read would be
overrided by do-something-on-str.
And same for marked candidates, if we return a list intead of a single
element like emacs functions expect we end up with an error.
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
capfredf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Thierry and Helm veterans,
If I understand correctly, after enabling helm via
(helm-mode 1)
,helm
takes over all thecomplete-read
. The problem is that there is no actions other than the defaultidentity
action on the resulting candidates. For example, I callproject-find-file
and presstab
on a candidate:Screencast.from.2022-10-13.11-17-45.webm
Besides writing a helm extension for
project-find-file
, is there a simple way to allow helm to call file-related actions on the targets above?Beta Was this translation helpful? Give feedback.
All reactions