help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

command-execute: Wrong type argument: commandp, helm-command-prefix


From: Hongyi Zhao
Subject: command-execute: Wrong type argument: commandp, helm-command-prefix
Date: Fri, 5 May 2023 08:34:07 +0800

Hi here,

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

```
(use-package helm-bibtex
  :init
  (setq

   ;; bibtex-completion-bibliography (directory-files-recursively
   ;;                     (concat (getenv "HOME")
"/texmf/bibtex/bib/local") "^[A-Za-z].+.bib$")


   ;;bibtex-completion-library-path (concat (getenv "HOME") "/pdf")
   ;;bibtex-completion-notes-path (concat (getenv "HOME") "/notes")
   bibtex-completion-pdf-field "File"
   ;;https://github.com/tmalsburg/helm-bibtex#insert-latex-cite-commands
   bibtex-completion-cite-prompt-for-optional-arguments nil)


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

  :config
  ;;https://github.com/tmalsburg/helm-bibtex#application-used-for-opening-pdfs
  ;;https://github.com/tmalsburg/helm-bibtex/issues/386
  (defun bibtex-completion-open-pdf-external (keys &optional fallback-action)
    (let ((bibtex-completion-pdf-open-function
       (lambda (fpath) (start-process "evince" "*helm-bibtex-evince*"
"/usr/bin/evince" fpath))))
      (bibtex-completion-open-pdf keys fallback-action)))

  (helm-bibtex-helmify-action bibtex-completion-open-pdf-external
helm-bibtex-open-pdf-external)

  (helm-add-action-to-source
   'helm-bibtex
   '(("P" helm-bibtex-open-pdf-external "Open PDF file in external
viewer (if present)")))

  
;;https://github.com/tmalsburg/helm-bibtex#browser-used-for-opening-urls-and-dois
  (setq bibtex-completion-browser-function
    (lambda (url _) (start-process "firefox" "*firefox*" "firefox" url)))

  )
```

When I hit <menu> hey for the first time, the following error will be triggered:

command-execute: Wrong type argument: commandp, helm-command-prefix

If I hit this key once more, the problem doesn't appear. I'm very
puzzled by this problem. Any tips will be appreciated.

See https://github.com/tmalsburg/helm-bibtex/issues/429#issuecomment-1535010227
for the related discussion.

Regards,
Zhao
-- 
Assoc. Prof. Hongsheng Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



reply via email to

[Prev in Thread] Current Thread [Next in Thread]