emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* can't make org-publish do anything
@ 2008-07-04 19:34 Dan Davison
  2008-07-04 20:13 ` Manish
       [not found] ` <486E9E80.9020004@gmx.de>
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Davison @ 2008-07-04 19:34 UTC (permalink / raw)
  To: emacs org-mode mailing list

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)

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

* Re: can't make org-publish do anything
  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>
  1 sibling, 0 replies; 7+ messages in thread
From: Manish @ 2008-07-04 20:13 UTC (permalink / raw)
  To: Dan Davison; +Cc: emacs org-mode mailing list

On Sat, Jul 5, 2008 at 1:04 AM, Dan Davison wrote:
> 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 had similar issue.  Suggestion here might help:
http://article.gmane.org/gmane.emacs.orgmode/7117

-- Manish

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

* Re: can't make org-publish do anything
       [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
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Davison @ 2008-07-04 22:50 UTC (permalink / raw)
  To: emacs org-mode mailing list

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
>>
>

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

* Re: can't make org-publish do anything
  2008-07-04 22:50   ` Dan Davison
@ 2008-07-05  0:04     ` Sebastian Rose
  2008-07-05  5:55     ` Carsten Dominik
  1 sibling, 0 replies; 7+ messages in thread
From: Sebastian Rose @ 2008-07-05  0:04 UTC (permalink / raw)
  To: [emacs-orgmode]

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

Hi Dan,

fine, just tested. Works. :)


Sebastian

[-- Attachment #2: sebastian_rose.vcf --]
[-- Type: text/x-vcard, Size: 499 bytes --]

begin:vcard
fn:Sebastian Rose
n:Rose;Sebastian
email;internet:sebastian_rose@gmx.de
title:Fachinformatiker/Anwendendungsentwicklung
tel;cell:+49 173 / 83 93 417
note;quoted-printable:Entwicklung  von Internetanwendungen und Programmen  mit  freien  Werkzeu=
	gen  und Bibliotheken.=0D=0A=
	=0D=0A=
	PHP, Java, C/C++,  Bash,  Perl,  Apache, MySQL,  PostgreSQL, xt::commerce=
	, Typo3, Server,  Netzwerk,  Desktop, Datenbank, gtkmm=0D=0A=
	
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

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

* Re: can't make org-publish do anything
  2008-07-04 22:50   ` Dan Davison
  2008-07-05  0:04     ` Sebastian Rose
@ 2008-07-05  5:55     ` Carsten Dominik
  2008-07-05 14:44       ` Richard G Riley
  1 sibling, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2008-07-05  5:55 UTC (permalink / raw)
  To: Dan Davison; +Cc: emacs org-mode mailing list

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

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

* Re: can't make org-publish do anything
  2008-07-05  5:55     ` Carsten Dominik
@ 2008-07-05 14:44       ` Richard G Riley
  2008-07-05 15:29         ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Richard G Riley @ 2008-07-05 14:44 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs org-mode mailing list




Carsten Dominik <carsten.dominik@gmail.com> writes:

> I just pushed this change, thanks!
>
> - Carsten

Aha, this is what caused my problem before I followed your suggestions
and

(setq org-publish-use-timestamps-flag nil)

Just got the git-head and it works fine now.

Just one little usability tweak would be nice - when it does not publish
anything because of timestamps then log a message in the status bar to
that affect.

>
> 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.

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

* Re: can't make org-publish do anything
  2008-07-05 14:44       ` Richard G Riley
@ 2008-07-05 15:29         ` Carsten Dominik
  0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2008-07-05 15:29 UTC (permalink / raw)
  To: Richard G Riley; +Cc: emacs org-mode mailing list


On Jul 5, 2008, at 7:44 AM, Richard G Riley wrote:

>
>
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> I just pushed this change, thanks!
>>
>> - Carsten
>
> Aha, this is what caused my problem before I followed your suggestions
> and
>
> (setq org-publish-use-timestamps-flag nil)
>
> Just got the git-head and it works fine now.
>
> Just one little usability tweak would be nice - when it does not  
> publish
> anything because of timestamps then log a message in the status bar to
> that affect.


It is not trivial to implement this because I would need a global  
variable
to keep track of things.  For now, I am showing a message for each  
published
and for each skipped file.  Bu I agree that a simple publishing  
statistics
message at the very end would be better.

- 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.

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

end of thread, other threads:[~2008-07-05 16:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-07-05 14:44       ` Richard G Riley
2008-07-05 15:29         ` Carsten Dominik

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).