Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the mode hook defined in helm-bibtex to conditionally activate it when AUCTeX's LaTeX-mode is called? #1054

Open
hongyi-zhao opened this issue May 17, 2023 · 1 comment
Labels
notabug Not a bug in use-package question

Comments

@hongyi-zhao
Copy link

I'm using the following configuration for helm-bibtex:

(use-package helm
  :demand t
  :config (require 'helm-autoloads))
(use-package helm-bibtex
  :demand t
  :init
  (setq
   ;;https://github.com/tmalsburg/helm-bibtex#insert-latex-cite-commands
   bibtex-completion-cite-prompt-for-optional-arguments nil)

  :bind-keymap
  ("<menu>" . helm-command-prefix)
  :bind
  (
   :map helm-command-map
   ("b" . helm-bibtex)
   ("B" . helm-bibtex-with-local-bibliography)
   ("n" . helm-bibtex-with-notes)
   ("<menu>" . helm-resume)
   )
  )

The above configuration will always enable the above packages during the starting process of Emacs, but I want to conditionally activate helm-bibtex when AUCTeX's LaTeX-mode is called and enabled.

For this purpose, it seems that the mode hook based method should be used, but I don't know what's the appropriate hooks defined in helm-bibtex which can help me to achieve this goal.
Any tips will be appreciated.

See here for the related discussion.

Regards,
Zhao

@skangas skangas added question notabug Not a bug in use-package labels Aug 5, 2023
@skangas
Copy link
Collaborator

skangas commented Aug 5, 2023

If I understand you correctly, you should be able to do something like this:

(use-package helm-bibtex
  :after latex-mode
  ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notabug Not a bug in use-package question
Projects
None yet
Development

No branches or pull requests

2 participants