I would like to perform some commands after I open a file in helm. For instance, call
imenu to get a list of headings of opened org-mode buffer. But for some buffers, like
message, it is not necessary to do that. So if here, the major-mode name or the file name of current selection in helm can be obtained, it will be much easy to call conditional subsequent commands.
(defun call-imenu-after-helm () (interactive) (helm-for-files) (when "a condition to say this buffer is a org file" (helm-imenu) (org-show-entry)))
I asked help in github and google plus, but it seems like that the function has not been implemented in helm for now.
Can anyone get some good ideas to do this?