From: Carsten Dominik <carsten.dominik@gmail.com>
To: Dan Davison <davison@stats.ox.ac.uk>
Cc: emacs org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: can't make org-publish do anything
Date: Fri, 4 Jul 2008 22:55:26 -0700 [thread overview]
Message-ID: <0E56C563-182B-4A68-B408-D292E50B706B@gmail.com> (raw)
In-Reply-To: <20080704225052.GA1245@stats.ox.ac.uk>
I just pushed this change, thanks!
- Carsten
On Jul 4, 2008, at 3:50 PM, Dan Davison wrote:
> On Sat, Jul 05, 2008 at 12:04:48AM +0200, Sebastian Rose wrote:
>> Hi Dan,
>>
>> org-publish-to-html is the default as I look in the code ...
>>
>> Sorry.
>>
>> When I put the value of your org-publish-projects-alist into my
>> own one and evaluate it, it works here. So maybe Manish was on
>> the right track, hopefully.
>
> Yes, he was. I think I may have identified the bug. The symptom is
> that when the directory ~/.org-timestamps does not exist, org-publish
> does nothing. I think what it should do is create ~/.org-timestamps,
> and go ahead with the requested publishing. org-publish.el contains
> the function org-publish-needed-p which is supposed to return 't' if
> the file should be published. Here's my suggested change which seems
> to result in the behaviour I was expecting. But I haven't looked at
> the code extensively, maybe there's some more appropriate place to
> make the missing timestamp directory. Also, I barely know what I'm
> doing in elisp. The original defun is below.
>
> ~> diff -uNr /usr/local/src/org-mode/lisp/org-publish.el ~/org-
> publish-dan.el
> --- /usr/local/src/org-mode/lisp/org-publish.el 2008-07-04
> 23:25:36.000000000 +0100
> +++ /home/dan/org-publish-dan.el 2008-07-04 23:27:17.000000000
> +0100
> @@ -312,7 +312,9 @@
> org-publish-timestamp-directory)
> ;; there is a timestamp, check if FILENAME is newer
> (file-newer-than-file-p
> - filename (org-publish-timestamp-filename filename))))
> + filename (org-publish-timestamp-filename filename)))
> + (make-directory org-publish-timestamp-directory)
> + t)
> ;; don't use timestamps, always return t
> t))
>
>
> Thanks Manish and Sebastian.
>
> Dan
>
>
> current version:
>
> (defun org-publish-needed-p (filename)
> "Return `t' if FILENAME should be published."
> (if org-publish-use-timestamps-flag
> (if (file-exists-p org-publish-timestamp-directory)
> ;; first handle possible wrong timestamp directory
> (if (not (file-directory-p org-publish-timestamp-directory))
> (error "Org publish timestamp: %s is not a directory"
> org-publish-timestamp-directory)
> ;; there is a timestamp, check if FILENAME is newer
> (file-newer-than-file-p
> filename (org-publish-timestamp-filename filename))))
> ;; don't use timestamps, always return t
> t))
>
>
>
>>
>>
>> Regards, Sebastian
>>
>>
>> Dan Davison schrieb:
>>> I'm trying to get going with org-publish, but am falling at the
>>> first hurdle. I can't get it to do anything...
>>>
>>> C-h v shows that org-publish-projects-alist has the value
>>>
>>> (("website" :base-directory "~/website/" :publishing-directory "~/
>>> pub_html/website/" :section-numbers nil :table-of-contents nil))
>>>
>>> The directory ~/website exists and contains a trivial org syntax
>>> file called root.org ('* hello' followed by a newline)
>>>
>>> The directory ~/pub_html/website exists.
>>>
>>> I was expecting org-publish website, and C-c C-e X website
>>> (incidentally the X is erroneously down as a C in the
>>> documentation node 13.3) to result in a file called root.html
>>> being written to ~/pub_html/website, but that directory remains
>>> empty, despite repeated invocations of the same commands...
>>>
>>> I know I'm being stupid... how, please?
>>>
>>> Cheers,
>>>
>>> Dan
>>>
>>> Org-mode version 6.06pre01
>>>
>>> I've tried with and without the trailing slashes on the base/
>>> publishing-directory values, the documentation shows trailing
>>> slashes
>>> I've tried manually expanding ~, to no avail. (But I believe ~
>>> should be fine as it is)
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2008-07-05 5:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-04 19:34 can't make org-publish do anything Dan Davison
2008-07-04 20:13 ` Manish
[not found] ` <486E9E80.9020004@gmx.de>
2008-07-04 22:50 ` Dan Davison
2008-07-05 0:04 ` Sebastian Rose
2008-07-05 5:55 ` Carsten Dominik [this message]
2008-07-05 14:44 ` Richard G Riley
2008-07-05 15:29 ` Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0E56C563-182B-4A68-B408-D292E50B706B@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=davison@stats.ox.ac.uk \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).