I’m working on a new computer (MacBook Pro) and I copied my old .emacs
file to the new computer. It all looked fine, but export to Latex C-c C-e lo
gives the error below: (it works fine on the old computer)
Debugger entered--Lisp error: (error "File \"/Users/a/nano/exported-org-files/2023-08-27....")
signal(error ("File \"/Users/a/nano/exported-org-files/2023-08-27...."))
error("File \"/Users/a/nano/exported-org-files/2023-08-27....")
org-compile-file("exported-org-files/2023-08-27.tex" ("%L -interaction nonstopmode -output-directory %o %..." "%L -interaction nonstopmode -output-directory %o %..." "%L -interaction nonstopmode -output-directory %o %...") "pdf" "See \"*Org PDF LaTeX Output*\" for details" #<buffer *Org PDF LaTeX Output*> ((66 . "bibtex") (76 . "pdflatex")))
org-latex-compile("exported-org-files/2023-08-27.tex")
#f(compiled-function (file) #<bytecode 0x521ad801>)("exported-org-files/2023-08-27.tex")
org-export-to-file(latex "exported-org-files/2023-08-27.tex" nil nil nil nil nil #f(compiled-function (file) #<bytecode 0x521ad801>))
org-latex-export-to-pdf(nil nil nil nil)
(org-open-file (org-latex-export-to-pdf nil s v b))
(if a (org-latex-export-to-pdf t s v b) (org-open-file (org-latex-export-to-pdf nil s v b)))
(lambda (a s v b) (if a (org-latex-export-to-pdf t s v b) (org-open-file (org-latex-export-to-pdf nil s v b))))(nil nil nil nil)
org-export-dispatch(nil)
funcall-interactively(org-export-dispatch nil)
call-interactively(org-export-dispatch nil nil)
command-execute(org-export-dispatch)
I thought the error was related to this post, but it didn’t help.
I see that these lines are included in my .emacs
file.
(getenv "PATH")
(setenv "PATH"
(concat
"/Users/a/bin" ":"
(getenv "PATH")))
How can I fix this? I use publish and export a lot.
Now, I tried export to PDF and I got this error zsh:1: command not found: pdflatex
pdflatex --help
? Also, isn't MikTeX for Windows? Is that what you need to run on a MacBook? Maybetexlive
would work on MacOS? But maybe you should add to your question the OS/version you are running. – NickD Aug 30 '23 at 19:13texlive
and now I get the help text when I dopdflatex --help
. (I didn't get it before.) But I could not uninstall MikTex. Export still does not work. – zeynel Aug 30 '23 at 20:41emacs -q
and export to latex worked fine! What does this mean? – zeynel Aug 30 '23 at 20:46.emacs
file and it always worked on the "test emacs". Finally, this is what's happenning: If I start emacs from the terminal withemacs
(without-q
) export to Latex works fine. But if I start emacs from the Launchpad, export does not work and I get the error. Why is this happening? – zeynel Aug 31 '23 at 08:19pdflatex
. When you start it from Launchpad, that mechanism does not apply and the PATH variable does not have the right value to findpdflatex
. I am sure this question has been asked before and there might be an answer already. Search a bit before asking a new question. I will search too but I cannot do it immediately. – NickD Sep 11 '23 at 15:02(setenv "PATH" "/Users/a/Library/TeXShop/bin:$PATH" t)
to my.emacs
but this didn't help. – zeynel Sep 12 '23 at 12:58