bling / fzf.el

A front-end for fzf
GNU General Public License v3.0
364 stars 49 forks source link

stops working if I use with-editor to export $EDITOR with term-mode hook #57

Closed yilkalargaw closed 3 years ago

yilkalargaw commented 4 years ago

The issue can be recreated with the following setting

(use-package with-editor
  :defer t
  :ensure t
  :hook ((term-mode . with-editor-export-editor)
         (term-mode . with-editor-export-git-editor)
     ))

Since such hooks to term-mode are very common it might be necessary to handle them correctly. I think it might be possible to run fzf after the term-mode-hook. I would appreciate any workaround.

tttuuu888 commented 3 years ago

@yilkalargaw I think those hooks are not for term-mode-hook but for term-exec-hook. When I tried your code, not only fzf but also simple term wasn't working with your hooks.

I found @tarsius also mentioned only term-exec-hook in his with-editor repository.

Assume that you meant adding hook for term-exec-hook, I found that hook anyway break FZF working. Simple fix could be setting term-exec-hook to nil before starting term for fzf.