emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* A problem with publishing
@ 2014-03-23 21:01 Marcin Borkowski
  2014-03-26 13:26 ` Rick Frankel
  0 siblings, 1 reply; 4+ messages in thread
From: Marcin Borkowski @ 2014-03-23 21:01 UTC (permalink / raw)
  To: Org-mode mailing list

Hi list,

publishing doesn't work.  I guess that I broke something;).  May the
source and publishing directories be the same?  I have this in my
init.el:

(setq org-publish-project-alist
      '(("fnis2014"
	:base-directory "~/directory"
	:publishing-directory "~/directory"
	:base-extension "org\\|css\\|jpg\\|png"
	:publishing-function org-reveal-export-to-html
	:completion-function (lambda () (compile "make install")))))

The "make install" means just rsync'ing to a remote server.

When I "export" (C-c C-e R R) and then "publish" (C-c C-e P x) (or
"M-x compile"), everything is ok.  When I just "publish", changes seem
not to be pushed to the remote server, and I'm left with some *Org
export* process buffers.

I know that I didn't give much details, but my suspicion is that I'm
doing something obviously wrong.  If this is not the case, I'll try to
isolate the problem and prepare an ECM.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University

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

* Re: A problem with publishing
  2014-03-23 21:01 A problem with publishing Marcin Borkowski
@ 2014-03-26 13:26 ` Rick Frankel
  2014-03-28  4:44   ` Marcin Borkowski
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Frankel @ 2014-03-26 13:26 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Org-mode mailing list

On 2014-03-23 17:01, Marcin Borkowski wrote:
> Hi list,
> 
> publishing doesn't work.  I guess that I broke something;).  May the
> source and publishing directories be the same?  I have this in my
> init.el:
> 
> (setq org-publish-project-alist
> '(("fnis2014"
> 	:base-directory "~/directory"
> 	:publishing-directory "~/directory"
> 	:base-extension "org\\|css\\|jpg\\|png"
> 	:publishing-function org-reveal-export-to-html
> 	:completion-function (lambda () (compile "make install")))))
> 
> The "make install" means just rsync'ing to a remote server.
> 
> When I "export" (C-c C-e R R) and then "publish" (C-c C-e P x) (or
> "M-x compile"), everything is ok.  When I just "publish", changes seem
> not to be pushed to the remote server, and I'm left with some *Org
> export* process buffers.

My guess is that using *-export-to-html as the publishing function is
the culprit. There should/needs to be an org-reveal-publish-to-html
publishing function. I'm guessing the reason it works when you
manually export is that since the html file is up-to-date vis. the org
source, the code path bypasses that step (and just runs the completion
function).

If org-reveal doesn't have a publishing function, try (not tested):

(lambda (plist filename pubdir)
(org-publish-org-to 'reveal filename ".html" plist pubdir))

BTW, org-publish has built-in support for pushing to a remote server.
You can use a tramp url as the publishing-directory, bypassing the
completion function.

rick

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

* Re: A problem with publishing
  2014-03-26 13:26 ` Rick Frankel
@ 2014-03-28  4:44   ` Marcin Borkowski
  2014-03-28 14:52     ` Rick Frankel
  0 siblings, 1 reply; 4+ messages in thread
From: Marcin Borkowski @ 2014-03-28  4:44 UTC (permalink / raw)
  To: emacs-orgmode

Dnia 2014-03-26, o godz. 09:26:15
Rick Frankel <rick@rickster.com> napisał(a):

> On 2014-03-23 17:01, Marcin Borkowski wrote:
> > Hi list,
> > 
> > publishing doesn't work.  I guess that I broke something;).  May the
> > source and publishing directories be the same?  I have this in my
> > init.el:
> > 
> > (setq org-publish-project-alist
> > '(("fnis2014"
> > 	:base-directory "~/directory"
> > 	:publishing-directory "~/directory"
> > 	:base-extension "org\\|css\\|jpg\\|png"
> > 	:publishing-function org-reveal-export-to-html
> > 	:completion-function (lambda () (compile "make install")))))
> > 
> > The "make install" means just rsync'ing to a remote server.
> > 
> > When I "export" (C-c C-e R R) and then "publish" (C-c C-e P x) (or
> > "M-x compile"), everything is ok.  When I just "publish", changes
> > seem not to be pushed to the remote server, and I'm left with some
> > *Org export* process buffers.
> 
> My guess is that using *-export-to-html as the publishing function is
> the culprit. There should/needs to be an org-reveal-publish-to-html
> publishing function. I'm guessing the reason it works when you
> manually export is that since the html file is up-to-date vis. the org
> source, the code path bypasses that step (and just runs the completion
> function).
> 
> If org-reveal doesn't have a publishing function, try (not tested):
> 
> (lambda (plist filename pubdir)
> (org-publish-org-to 'reveal filename ".html" plist pubdir))

Thanks, I'll try it!

> BTW, org-publish has built-in support for pushing to a remote server.
> You can use a tramp url as the publishing-directory, bypassing the
> completion function.

I know, but I read in the manual that it may not be the fastest thing
in the world.  (In fact, I use a very simple Makefile, which in turn
uses rsync, so it /might/ indeed be faster, not copying unnecessary
stuff.  Not sure whether Emacs+Tramp would do it.)

> rick

Thanks again,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University

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

* Re: A problem with publishing
  2014-03-28  4:44   ` Marcin Borkowski
@ 2014-03-28 14:52     ` Rick Frankel
  0 siblings, 0 replies; 4+ messages in thread
From: Rick Frankel @ 2014-03-28 14:52 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: emacs-orgmode

On 2014-03-28 00:44, Marcin Borkowski wrote:
> Dnia 2014-03-26, o godz. 09:26:15
> Rick Frankel <rick@rickster.com> napisał(a):
> 
> On 2014-03-23 17:01, Marcin Borkowski wrote:
> BTW, org-publish has built-in support for pushing to a remote server.
> You can use a tramp url as the publishing-directory, bypassing the
> completion function.
> 
> I know, but I read in the manual that it may not be the fastest thing
> in the world.  (In fact, I use a very simple Makefile, which in turn
> uses rsync, so it /might/ indeed be faster, not copying unnecessary
> stuff.  Not sure whether Emacs+Tramp would do it.)
> 

Org publish uses a timestamp cache, so while the wire protocol may be
slower, it doesn't copy unnecessary files and doesn't need to
communicate with the remote host to decide which files to copy.

Bonus of course is that the org-publish approach is self-contained
and "reproducible".

rick

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

end of thread, other threads:[~2014-03-28 14:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-23 21:01 A problem with publishing Marcin Borkowski
2014-03-26 13:26 ` Rick Frankel
2014-03-28  4:44   ` Marcin Borkowski
2014-03-28 14:52     ` Rick Frankel

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