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
The problem related to (require 'helm-config)
and (require 'helm-bibtex)
.
#432
Comments
If I understand correctly, your Emacs fails to execute the command |
According to the description here:
It seems that |
Ah, I see. The code doesn't use |
I've removed the Debugger entered--Lisp error: (wrong-number-of-arguments (3 . 4) 2)
helm-add-action-to-source(helm-bibtex (("P"
helm-bibtex-open-pdf-external "Open PDF file in external viewer (if
present)")))
(progn (defalias 'bibtex-completion-open-pdf-external #'(lambda
(keys &optional fallback-action) (let
((bibtex-completion-pdf-open-function #'...))
(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)"))) (setq bibtex-completion-browser-function #'(lambda
(url _) (start-process "firefox" "*firefox*" "firefox" url))) t)
(condition-case err (progn (defalias
'bibtex-completion-open-pdf-external #'(lambda (keys &optional
fallback-action) (let ((bibtex-completion-pdf-open-function ...))
(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)"))) (setq bibtex-completion-browser-function #'(lambda
(url _) (start-process "firefox" "*firefox*" "firefox" url))) t)
((debug error) (funcall use-package--warning56 :config err)))
(lambda nil (condition-case err (progn (defalias
'bibtex-completion-open-pdf-external #'(lambda (keys &optional
fallback-action) (let (...) (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)"))) (setq bibtex-completion-browser-function #'(lambda (url
_) (start-process "firefox" "*firefox*" "firefox" url))) t) ((debug
error) (funcall use-package--warning56 :config err))))()
eval-after-load-helper("/home/werner/.emacs.d/straight/build/helm-bibtex/h...")
run-hook-with-args(eval-after-load-helper
"/home/werner/.emacs.d/straight/build/helm-bibtex/h...")
do-after-load-evaluation("/home/werner/.emacs.d/straight/build/helm-bibtex/h...")
require(helm-bibtex)
(progn (require 'helm-bibtex))
eval((progn (require 'helm-bibtex)) t)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
See https://lists.gnu.org/archive/html/help-gnu-emacs/2023-05/msg00148.html for the related discussions. |
(require 'helm-config)
and (require 'helm-bibtex)
.
Finally, It solved the problem discussed here with the following simpler configuration: ;; https://github.com/emacs-helm/helm/wiki#if-installed-from-source
;; First issue the following command
/home/werner/.emacs.d/straight/repos/helm$ make
(use-package helm :config (require 'helm-autoloads))
(use-package helm-bibtex
:init
(setq
bibtex-completion-pdf-field "File"
;;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)
)
) See the attached screenshot for the completion results, which include See #431 (comment) for the related discussion. |
Yes, it's sometimes really important in Emacs configurations to do things in the right order. Glad you could fix it. |
As you can see, I've already removed almost all the advanced or fine-tuned configurations of this package, which in turn fixed the related problems. So, I'm still confused on the out-of-box using of the configurations represented in README.org. |
It shouldn't be necessary to remove all advanced configurations. I think the last problem was simply that you tried to load helm-bibtex before helm was properly loaded. Not sure though. In cases like this, it's useful start with a simple configuration that works and to then add features step by step. |
Anyway, the minimum configuration above is sufficient for my usage scenario, therefore, I will not add functions step by step, at least now. |
In my case, the configuration for helm and helm-bibtex is as follows:
With the above setting, I still observed the following result:
C-x b *scratch* RET
then in scratch buffer eval(featurep 'helm-bibtex)
byC-x C-e
gives nil.Then, I try to eval
(require 'helm-bibtex)
in scratch buffer and the following error will be triggered:What do these problems mean, and do they indicate a corresponding bug in the
helm-bibtex
package?See here and here for the related discussions.
Regards,
Zhao
The text was updated successfully, but these errors were encountered: