emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question about org-publish-project-alist
@ 2015-04-14 12:51 Thomas Moyer
  2015-04-14 13:05 ` Marcin Borkowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Thomas Moyer @ 2015-04-14 12:51 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

Is it possible (and I just have the wrong syntax) to do the following:

(defvar base-dir "~/Documents/org/")
(defvar pub-dir "~/Public/notes/")

(setq org-publish-project-alist '(
    ("org"
        :base-directory base-dir
        :base-extension "org"
        :publishing-directory pub-dir
        :recursive t
        :publishing-function org-html-publish-to-html
        :exclude "level-..org"
    )
    ("static"
        :base-directory base-dir
        :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
        :publishing-directory pub-dir
        :recursive t
        :publishing-function org-publish-attachment
    )
("project-root" :components ("org" "static")))
)

When I have the above code and I call (org-publish-project "project-root"),
I get the following error.

Wrong type argument: stringp, base-dir

Thanks.
Tom

[-- Attachment #2: Type: text/html, Size: 1488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question about org-publish-project-alist
  2015-04-14 12:51 Question about org-publish-project-alist Thomas Moyer
@ 2015-04-14 13:05 ` Marcin Borkowski
  2015-04-14 13:10 ` Nick Dokos
  2015-04-14 13:38 ` Feng Shu
  2 siblings, 0 replies; 5+ messages in thread
From: Marcin Borkowski @ 2015-04-14 13:05 UTC (permalink / raw)
  To: emacs-orgmode


On 2015-04-14, at 14:51, Thomas Moyer <tommoyer@gmail.com> wrote:

> Is it possible (and I just have the wrong syntax) to do the following:
>
> (defvar base-dir "~/Documents/org/")
> (defvar pub-dir "~/Public/notes/")
>
> (setq org-publish-project-alist '(
>     ("org"
>         :base-directory base-dir

(setq org-publish-project-alist `(
    ("org"
        :base-directory ,base-dir

?

>         :base-extension "org"
>         :publishing-directory pub-dir
>         :recursive t
>         :publishing-function org-html-publish-to-html
>         :exclude "level-..org"
>     )
>     ("static"
>         :base-directory base-dir
>         :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
>         :publishing-directory pub-dir
>         :recursive t
>         :publishing-function org-publish-attachment
>     )
> ("project-root" :components ("org" "static")))
> )
>
> When I have the above code and I call (org-publish-project "project-root"),
> I get the following error.
>
> Wrong type argument: stringp, base-dir
>
> Thanks.
> Tom


-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question about org-publish-project-alist
  2015-04-14 12:51 Question about org-publish-project-alist Thomas Moyer
  2015-04-14 13:05 ` Marcin Borkowski
@ 2015-04-14 13:10 ` Nick Dokos
  2015-04-14 13:38 ` Feng Shu
  2 siblings, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2015-04-14 13:10 UTC (permalink / raw)
  To: emacs-orgmode

Thomas Moyer <tommoyer@gmail.com> writes:

> Is it possible (and I just have the wrong syntax) to do the following:
>
> (defvar base-dir "~/Documents/org/")
> (defvar pub-dir "~/Public/notes/")
>
> (setq org-publish-project-alist '(
>     ("org"
>         :base-directory base-dir
>         :base-extension "org"
>         :publishing-directory pub-dir
>         :recursive t
>         :publishing-function org-html-publish-to-html
>         :exclude "level-..org"
>     )
>     ("static"
>         :base-directory base-dir
>         :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
>         :publishing-directory pub-dir
>         :recursive t
>         :publishing-function org-publish-attachment
>     )
> ("project-root" :components ("org" "static")))
> )
>
> When I have the above code and I call (org-publish-project "project-root"), I get the following error.
>
> Wrong type argument: stringp, base-dir
>

You need to use backquote instead of quote and commas wherevern an "inner"
variable needs to be evaluated. See

 (info "(elisp) Backquote")

Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question about org-publish-project-alist
  2015-04-14 12:51 Question about org-publish-project-alist Thomas Moyer
  2015-04-14 13:05 ` Marcin Borkowski
  2015-04-14 13:10 ` Nick Dokos
@ 2015-04-14 13:38 ` Feng Shu
  2015-04-15 11:20   ` Thomas Moyer
  2 siblings, 1 reply; 5+ messages in thread
From: Feng Shu @ 2015-04-14 13:38 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Feng Shu



(defvar base-dir "~/Documents/org/")
(defvar pub-dir "~/Public/notes/")

(setq org-publish-project-alist
      `(("org"
         :base-directory ,base-dir
         :base-extension "org"
         :publishing-directory ,pub-dir
         :recursive t
         :publishing-function org-html-publish-to-html
         :exclude "level-..org"
         )
        ("static"
         :base-directory base-dir
         :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
         :publishing-directory pub-dir
         :recursive t
         :publishing-function org-publish-attachment
         )
        ("project-root" :components ("org" "static"))))

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question about org-publish-project-alist
  2015-04-14 13:38 ` Feng Shu
@ 2015-04-15 11:20   ` Thomas Moyer
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Moyer @ 2015-04-15 11:20 UTC (permalink / raw)
  To: Feng Shu; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

That was what finally worked. Thanks!

Tom
On Apr 14, 2015 9:49 AM, "Feng Shu" <tumashu@163.com> wrote:

>
>
> (defvar base-dir "~/Documents/org/")
> (defvar pub-dir "~/Public/notes/")
>
> (setq org-publish-project-alist
>       `(("org"
>          :base-directory ,base-dir
>          :base-extension "org"
>          :publishing-directory ,pub-dir
>          :recursive t
>          :publishing-function org-html-publish-to-html
>          :exclude "level-..org"
>          )
>         ("static"
>          :base-directory base-dir
>          :base-extension
> "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
>          :publishing-directory pub-dir
>          :recursive t
>          :publishing-function org-publish-attachment
>          )
>         ("project-root" :components ("org" "static"))))
>
> --
>
>
>

[-- Attachment #2: Type: text/html, Size: 1334 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-15 11:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-14 12:51 Question about org-publish-project-alist Thomas Moyer
2015-04-14 13:05 ` Marcin Borkowski
2015-04-14 13:10 ` Nick Dokos
2015-04-14 13:38 ` Feng Shu
2015-04-15 11:20   ` Thomas Moyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).