Closed cemeroncel closed 3 years ago
That was a bug indeed, thanks for reporting it. I have pushed a fix that should work on melpa in a few hours.
Thank you for the quick response. Unfortunately, now I get the following message when I start emacs.
Eager macro-expansion failure: (error "Expected a cl-loop keyword, found cl-return") [2 times]
Now if I use org-ref-insert-ref-link
to refer to an equation I get
progn: No catch for tag: --cl-block-nil--, "eqref"
I think I have pushed some fixes for this. it will be later this evening before I can verify it works with the MELPA version.
ok, I just tested the latest melpa version, and I am pretty sure it finally works!
After the latest update, the first problem, with the error Eager macro-expansion failure:...
is fixed, but I still get the error
progn: No catch for tag: --cl-block-nil--, "eqref"
when I try to reference an equation with org-ref-insert-ref-link
. I tried with a fresh Emacs directory, and also by cloning org-ref
directly from Github.
Is there an alternative way to reference an equation? I can do it manually but it would really be helpful to see a list of equations.
I don't know what could be wrong here, these both work fine for me (git and Melpa).
Can you run M-x org-ref
and paste the contents here?
If you add this block to your file and run it:
#+BEGIN_SRC emacs-lisp
(org-ref-get-labels)
#+END_SRC
Does it trigger the error?
By running M-x org-ref
I get
#+title: org-ref report on [[/home/dreameat/temp.org][temp.org]]
org-ref called from /home/dreameat/temp.org
* Unreferenced label links
- [[elisp:(progn (switch-to-buffer "temp.org") (goto-char 307)(org-show-entry))][eq:1]]
* Bibliography
- No bibliography style found. This may be ok, if your latex class style sets that up, but if not this is an error. Try adding something like:
bibliographystyle:unsrt
at the end of your file.
- [[~/Dropbox/Org/bibliography/references.bib]] (dialect = BibTeX)
* Miscellaneous
- org-latex-prefer-user-labels = nil
- bibtex-dialect = BibTeX
- biblatex is not required.
- biblatex is not used.
- emacs-version = GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
of 2020-09-19
- org-version = 9.3
- org-ref: Version 1.1.1 (git-commit a5dfb7c820012b702b161596831dfbef1e3958fa)
- org-ref.el installed at /home/dreameat/.emacs.d/lisp/org-ref/org-ref.el
- completion backend = org-ref-helm-bibtex
- org-ref-default-bibliography = ("~/Dropbox/Org/bibliography/references.bib")
- org-ref-default-bibliography is a list = t
- org-latex-pdf-process is defined as (%latex -interaction nonstopmode -output-directory %o %f %latex -interaction nonstopmode -output-directory %o %f %latex -interaction nonstopmode -output-directory %o %f)
- natbib is not required.
- natbib is not in org-latex-default-packages-alist or org-latex-packages-alist.
- cleveref is not required.
- cleveref is not in org-latex-default-packages-alist or org-latex-packages-alist.
- org-latex-default-packages-alist
("AUTO" "inputenc" t ("pdflatex"))
("T1" "fontenc" t ("pdflatex"))
("" "graphicx" t)
("" "grffile" t)
("" "longtable" nil)
("" "wrapfig" nil)
("" "rotating" nil)
("normalem" "ulem" t)
("" "amsmath" t)
("" "textcomp" t)
("" "amssymb" t)
("" "capt-of" nil)
("" "hyperref" nil)
- org-latex-packages-alist is nil
* Utilities
- [[elisp:(progn (find-file "/home/dreameat/temp.org") (ispell))][Spell check document]]
- [[elisp:(progn (find-file "/home/dreameat/temp.org") (org-ref))][recheck document with org-ref]]
org-ref-get-labels
seems to work correctly. It returns
("tbl-test" "eq:1")
I suppose (org-ref-infer-ref-type "eq:1")
in that buffer is triggering the issue then?
Yes. If I evaluate that code I got the following response in the messages buffer:
Debugger entered--Lisp error: (no-catch --cl-block-nil-- "eqref")
throw(--cl-block-nil-- "eqref")
(progn (throw '--cl-block-nil-- (eval (cdr pred-pair))))
(if (funcall (car pred-pair) label) (progn (throw '--cl-block-nil-- (eval (cdr pred-pair)))))
(while --dolist-tail-- (setq pred-pair (car --dolist-tail--)) (if (funcall (car pred-pair) label) (progn (throw '--cl-block-nil-- (eval (cdr pred-pair))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
(let ((--dolist-tail-- org-ref-ref-type-inference-alist) pred-pair) (while --dolist-tail-- (setq pred-pair (car --dolist-tail--)) (if (funcall (car pred-pair) label) (progn (throw '--cl-block-nil-- (eval (cdr pred-pair))))) (setq --dolist-tail-- (cdr --dolist-tail--))))
(or (let ((--dolist-tail-- org-ref-ref-type-inference-alist) pred-pair) (while --dolist-tail-- (setq pred-pair (car --dolist-tail--)) (if (funcall (car pred-pair) label) (progn (throw '--cl-block-nil-- (eval (cdr pred-pair))))) (setq --dolist-tail-- (cdr --dolist-tail--)))) org-ref-default-ref-type)
org-ref-infer-ref-type("eq:1")
eval((org-ref-infer-ref-type "eq:1") t)
eval-expression((org-ref-infer-ref-type "eq:1") nil nil 127)
funcall-interactively(eval-expression (org-ref-infer-ref-type "eq:1") nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
ok. Thanks much for the patience in debugging this! I don't understand why it has been working for me, and not for you. I guess it has to do with some incantation of (require 'cl) here and there. fe792be might be the solution for you, where I hopefully use the right version of dolist (cl-dolist) here.
@cemeroncel does it work now?
Now it works! Thank you very much for your help and this excellent package.
Hello,
I have the following org document:
I can reference the table
tbl-test
viaorg-ref-insert-ref-link
without an issue. But when I try to reference the equation, I get the following error:org-ref-infer-ref-type: Symbol’s function definition is void: return
I can enter the reference manually as
eqref:eq:1
. The same problem appears when I use the menu itemOrg -> org-ref -> Insert ref
. I am using the following minimalinit.el
:Any help is appreciated.
Emacs version : 27.1 on Ubuntu 20.04 Org version : 9.3 (which comes default with Emacs) Org-ref version : 1.1.1 (installed from Melpa)