helm-bibtex icon indicating copy to clipboard operation
helm-bibtex copied to clipboard

add a separate follow processor for helm

Open mpedramfar opened this issue 1 year ago • 4 comments

Thanks for your great package!

Having helm-bibtex open as the follow processor is not ideal, since to take an action, we need to press tab and then not all actions are meaningful when point is on a citation. The PR adds a separate follow processor and two new variables, helm-bibtex-follow-actions-alist and helm-bibtex-follow-full-frame, to customize it. To use this processor, this should be added to the init file:

(org-cite-register-processor 'my-bibtex-org-cite-follow
  :follow 'helm-bibtex-follow)

(setq org-cite-follow-processor 'my-bibtex-org-cite-follow)

mpedramfar avatar Jul 06 '22 20:07 mpedramfar

Hi and thank you. I can't test this right now. Could you please explain in one sentence what this follow processor does differently? And woudn't it be better to just replace the existing processor?

tmalsburg avatar Jul 07 '22 07:07 tmalsburg

Sure, but it's more than 1 sentence :)

In current setup:

  1. After following a citation, the entry is only pre-selected, and user needs to select it again to take any action.
  2. Not all actions are applicable for citations (I wouldn't want to insert the whole bibtex entry into a citation)
  3. I prefer to have helm-bibtex take the whole buffer, but selecting from a few follow actions doesn't need the whole buffer.

This PR solves 1 and adds better defaults and customization options for 2 and 3.

And woudn't it be better to just replace the existing processor?

I'm not sure what you mean. This is exactly what this PR does!

mpedramfar avatar Jul 07 '22 15:07 mpedramfar

Actually it might be good to add

(org-cite-register-processor 'helm-bibtex-org-cite-follow
  :follow 'helm-bibtex-follow)

to the commit and then the user has the option of using this follow processor by adding

(setq org-cite-follow-processor 'helm-bibtex-org-cite-follow)

to their init file.

mpedramfar avatar Jul 07 '22 15:07 mpedramfar

Looks good. Could you please also update the documentation here to reflect these changes? Thank you!

tmalsburg avatar Jul 20 '22 11:07 tmalsburg

Sure! I just made some changes. Let me know if there's anything else here I can change.

mpedramfar avatar Nov 14 '22 03:11 mpedramfar

merged, thank you!

tmalsburg avatar Nov 14 '22 12:11 tmalsburg