1

I am having some trouble setting my org-publish blog. Basically I have the following config, but when I try to publish I get the following error:

Wrong type argument: stringp, (\, publish-directory-path)

So what this means to me is that, the :publishing-directory property is expecting a string, and I am not giving it a string, even though clearly the variable publish-directory-path is a string.

I have been going crazy with this. Any idea on what is happening?

(defvar publish-directory-path "~/Projects/Public/")

(setq org-publish-project-alist
      '(("org-notes"
     :base-directory "~/Projects/blog/"
     :base-extendion "org"
     :publishing-directory ,publish-directory-path
     :recursive t
     :makeindex t
     :html-postamble nil
     :publishing-function org-html-publish-to-html
     :auto-sitemap t
     :html-link-home "theindex.html"
     :html-link-up "theindex.html"
     :sitemap-filename "theindex.org"
    )
     ("org-static"
     :base-directory "~/org/"
     :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
     :publishing-directory "~/Projects/Public/"
     :recursive t
     :publishing-function org-publish-attachment
     )
     ("org" :components ("org-notes" "org-static"))
))
Muihlinn
  • 2,576
  • 1
  • 14
  • 22
  • elisp tag doesn't apply here. Please read [Elisp tag info](https://emacs.stackexchange.com/tags/elisp/info) – Muihlinn May 17 '20 at 12:01
  • 1
    In order to allow *some* evaluation while quoting *most* of the expression, you need the comma construct which you are using but you also need to replace the initial quote ' with a backquote `, usually found to the left of the 1 key on US keyboards, but maybe somewhere else on your keyboard. – NickD May 17 '20 at 12:17
  • 2
    This is one of the countless duplicates of threads where people discover how to use backquote. – wasamasa May 17 '20 at 12:18
  • 2
    God dammit I though they were the same. Such a tricky detail –  May 17 '20 at 13:20
  • 3
    Does this answer your question? [How to use ,var-name (defvar) syntax in org-publish-project-alist? Init file is in form of org-mode](https://emacs.stackexchange.com/questions/29351/how-to-use-var-name-defvar-syntax-in-org-publish-project-alist-init-file-is) – NickD May 17 '20 at 14:58
  • I saw that post before posting this one. My problem was that I thought that ' was the same as ` for the purposes of elisp. But clearly that is explained in there. My bad. Thanks a lot I would have been stuck on this one for a while lol :) –  May 17 '20 at 17:44
  • Well, you only make this mistake once - but *everybody* makes this mistake once! Hence the duplicates. – NickD May 18 '20 at 00:53

0 Answers0