0

I am following tutorial on https://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html. I move point to the end of this line and press C-x C-e to load org-publish:

(require 'org-publish) 

It worked yesterday. Now it gets this backtrace:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "org-publish") require(org-publish) eval((require 'org-publish) nil) elisp--eval-last-sexp(nil) #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. With a prefix argument of zero,\nhowever, there is no such truncation. Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x1f84db>)(nil) #f(compiled-function (&rest _it) #<bytecode 0x25ee78d>)() eval-sexp-fu-flash-doit-simple(#f(compiled-function (&rest _it) #<bytecode 0x25ee78d>) #f(compiled-function (&rest args2) #<bytecode 0x21bb4b1>) #f(compiled-function (&rest args2) #<bytecode 0x21ba8b1>)) eval-sexp-fu-flash-doit(#f(compiled-function (&rest _it) #<bytecode 0x25ee78d>) #f(compiled-function (&rest args2) #<bytecode 0x21bb4b1>) #f(compiled-function (&rest args2) #<bytecode 0x21ba8b1>)) esf-flash-doit(#f(compiled-function (&rest _it) #<bytecode 0x25ee78d>) #f(compiled-function (&rest args2) #<bytecode 0x21bb4b1>) #f(compiled-function (&rest args2) #<bytecode 0x21ba8b1>) #f(compiled-function (&rest args2) #<bytecode 0x21ba0b1>)) ad-Advice-eval-last-sexp(#f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. With a prefix argument of zero,\nhowever, there is no such truncation. Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x1f84db>) nil) apply(ad-Advice-eval-last-sexp #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. With a prefix argument of zero,\nhowever, there is no such truncation. Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x1f84db>) nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp) 

How to troubleshoot? I don't understand the error message and I don't know Lisp.

UPDATE 1:

org-publish is not listed in list-packages.

UPDATE 2:

The tutorial uses two different "require".

(require 'ox-publish) (require 'org-publish) 
19
  • See if you can use org-export-dispatch instead? You can use htmlize and ox-twbs packages for nice html exports. Commented Mar 11, 2019 at 19:45
  • Sounds like org-publish is not in your load-path. Commented Mar 11, 2019 at 22:41
  • 2
    The official master has ox-publish.el in its lisp directory but no org-publish.el. Try to replace (require 'org-publish) with (require 'ox-publish). Commented Mar 12, 2019 at 11:49
  • 1
    The tutorial you linked to says (require ox-publish) just as @Tobias has suggested. Commented Mar 12, 2019 at 12:00
  • 1
    Did you check your Messages buffer? It should contain some information about the publishing process and maybe some errors as well. FWIW, I copied the definition of org-publish-project-alist above, modified the paths for my setup, added a simple org file to the specified base-directory and did M-x org-publish RET org RET with no errors. Moreover, there was a corresponding html file in the publishing directory afterwards. Commented Mar 12, 2019 at 19:24

1 Answer 1

0

(require 'org-publish) should be (require 'ox-publish).

Here is the directory structure:

[~/Documents/developer/editors/emacs/publish_html] $ tree . ├── org │ ├── css │ ├── f1.org │ ├── f2.org │ └── index.org ├── org-publish-project-alist.el ├── public_html │ ├── f1.html │ └── index.html └── publish_html_notes.org 

Here is the file containing my org-publish-project-alist configuration: ~/Documents/developer/editors/emacs/publish_html/org-publish-project-alist.el

(require 'ox-publish) ;C-x C-e to load org-publish (setq org-publish-project-alist '( ("org-source" ;org-source files to be transformed into html files :base-directory "~/Documents/developer/editors/emacs/publish_html/org/" :base-extension "org" :publishing-directory "~/Documents/developer/editors/emacs/publish_html/public_html/" :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 :auto-preamble f ) ("org-static" :base-directory "~/Documents/developer/editors/emacs/publish_html/org/" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-directory "~/Documents/developer/editors/emacs/publish_html/public_html/" :recursive t :publishing-function org-publish-attachment ) ("org" :components ("org-source" "org-static")) )) ;C-x C-e and repeat after every change to org-publish-project-alist.el 

Then performed the next steps in the tutorial:

Move to the end of the first line and press C-x C-e to load org-publish. Now go to the end of the last line and press C-x C-e again. ... To publish your Org-mode files just type M-x org-publish-project RET org RET 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.