Re: [O] Org sources and PDF files on Worg

2013-05-24 Thread Bastien
Hi Rasmus,

Rasmus  writes:

> Couldn't we just compare input and output?  Or is that not safe
> enough?  E.g. in an over-simplistic form obtain dead pages via
> something like this:

If you can write a general function that will work for any defined
publishing project, that'd be cool.  Maybe as an addition for
worg/org-hacks.org.

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Rasmus
Bastien  writes:

> Hi Suvayu,
>
> Suvayu Ali  writes:
>
>> I believe you can use git for this.  Try
>>
>>   $ git clean -n -x
>
> I didn't know this git command, neat!
>
> The problem we were discussing is different: it's about deleting
> HTML pages that have been published and that have no corresponding
> .org file anymore -- the way I do this for other projects of mine
> is to delete all HTML files and republish my project, but we don't
> want to take that route here...

Couldn't we just compare input and output?  Or is that not safe
enough?  E.g. in an over-simplistic form obtain dead pages via
something like this:

#+BEGIN_SRC emacs-lisp
(let* ((html '("dir1/my-page1.html" 
  "dir2/my-page2.html"
  "dir2/my-page3.html"
  "dir2/my-page4.html"
  "dir3/my-page4.html")) 
   (org '("dir1/my-page1.org" 
 "dir2/my-page2.org"
 "dir3/my-page4.org"))
   (html-sans-extensions (mapcar 'file-name-sans-extension html))
   (org-sans-extensions (mapcar 'file-name-sans-extension org)))
  (mapcar (lambda (x) (concat x ".html"))
  (dolist (x org-sans-extensions html-sans-extensions)
   (setq html-sans-extensions (remove x html-sans-extensions)
#+END_SRC


-- 
A clever person solves a problem. A wise person avoids it




Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Suvayu Ali
On Thu, May 23, 2013 at 07:54:12PM +0200, Bastien wrote:
> Hi Suvayu,
> 
> Suvayu Ali  writes:
> 
> > I believe you can use git for this.  Try
> >
> >   $ git clean -n -x
> 
> I didn't know this git command, neat!
> 
> The problem we were discussing is different: it's about deleting
> HTML pages that have been published and that have no corresponding
> .org file anymore -- the way I do this for other projects of mine
> is to delete all HTML files and republish my project, but we don't
> want to take that route here...

Ahh sorry, I realised the problem but overlooked that this removes all
html files!  It's end of the day after all :-p.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi Bastien,

Bastien wrote:

> Hi Viktor,
> 
> Viktor Rosenfeld  writes:
> 
> > The files are:
> > - http://orgmode.org/worg/org-tutorials/koma-letter-export.html
> > - http://orgmode.org/worg/org-tutorials/koma-letter-example.html
> >
> > Sorry for the inconvenience.
> 
> Deleted, thanks.

Thanks!
 
> > Is there also a way not to publish Org files to HTML which are checked
> > into the Worg repository? 
> 
> We could use an :exclude directive in the publishing project, but
> I'd rather not go this way, too mush maintainance hassle for fixing
> ~zero inconvenience...
> 
> > I am asking because the file
> > http://orgmode.org/worg/exporters/koma-letter-example.html could also be
> > deleted. It is created from
> > http://orgmode.org/worg/sources/exporters/koma-letter-example.org which
> > is included as an example in
> > http://orgmode.org/worg/sources/exporters/koma-letter-export.org. But
> > the HTML file is not linked anywhere.
> 
> Well, it does not hurt that much to have this orphan HTML page.

I agree.

Cheers,
Viktor

> 
> HTH,
> 
> -- 
>  Bastien
> 



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Suvayu,

Suvayu Ali  writes:

> I believe you can use git for this.  Try
>
>   $ git clean -n -x

I didn't know this git command, neat!

The problem we were discussing is different: it's about deleting
HTML pages that have been published and that have no corresponding
.org file anymore -- the way I do this for other projects of mine
is to delete all HTML files and republish my project, but we don't
want to take that route here...

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Viktor,

Viktor Rosenfeld  writes:

> The files are:
> - http://orgmode.org/worg/org-tutorials/koma-letter-export.html
> - http://orgmode.org/worg/org-tutorials/koma-letter-example.html
>
> Sorry for the inconvenience.

Deleted, thanks.

> Is there also a way not to publish Org files to HTML which are checked
> into the Worg repository? 

We could use an :exclude directive in the publishing project, but
I'd rather not go this way, too mush maintainance hassle for fixing
~zero inconvenience...

> I am asking because the file
> http://orgmode.org/worg/exporters/koma-letter-example.html could also be
> deleted. It is created from
> http://orgmode.org/worg/sources/exporters/koma-letter-example.org which
> is included as an example in
> http://orgmode.org/worg/sources/exporters/koma-letter-export.org. But
> the HTML file is not linked anywhere.

Well, it does not hurt that much to have this orphan HTML page.

HTH,

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi Bastien,

Bastien wrote:

> Hi Viktor,
> 
> Viktor Rosenfeld  writes:
> 
> > However, the old version of the tutorial still shows at the old address.
> > I moved the file in the worg git repository from org-tutorials/ to
> > exporters/ but now there are two separate HTML copies. Do I have to do
> > something else to explicitly delete the old version?
> 
> Er, this is a strong (and quite stupid) limitation of the publishing
> engine: it does not delete files that exist from a previous publication.
> 
> I have absolutely no idea for a clever mechanism that would find the
> files to delete.
> 
> We can delete them manually for now -- please send me the list of
> .html files I need to delete.

The files are:
- http://orgmode.org/worg/org-tutorials/koma-letter-export.html
- http://orgmode.org/worg/org-tutorials/koma-letter-example.html

Sorry for the inconvenience.

Is there also a way not to publish Org files to HTML which are checked
into the Worg repository? I am asking because the file
http://orgmode.org/worg/exporters/koma-letter-example.html could also be
deleted. It is created from
http://orgmode.org/worg/sources/exporters/koma-letter-example.org which
is included as an example in
http://orgmode.org/worg/sources/exporters/koma-letter-export.org. But
the HTML file is not linked anywhere.

Cheers,
Viktor
> 
> -- 
>  Bastien
> 



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Suvayu Ali
Hi Bastien,

On Thu, May 23, 2013 at 10:21:23AM +0200, Bastien wrote:
> Viktor Rosenfeld  writes:
> 
> > However, the old version of the tutorial still shows at the old address.
> > I moved the file in the worg git repository from org-tutorials/ to
> > exporters/ but now there are two separate HTML copies. Do I have to do
> > something else to explicitly delete the old version?
> 
> Er, this is a strong (and quite stupid) limitation of the publishing
> engine: it does not delete files that exist from a previous publication.
> 
> I have absolutely no idea for a clever mechanism that would find the
> files to delete.

I believe you can use git for this.  Try

  $ git clean -n -x

to see the files that will be removed.  If you are happy with it, run

  $ git clean -f -x

Please note the subtle difference between -x and -X.  -x cleans *all*
untracked files, whereas -X cleans only files explicitly ignored by
.gitignore.  I would advise to put the published files as ignored:

*.html
*.html~

Then you can safely run

  $ git clean -f -X

and potentially keep untracked manually created files
(e.g. .gitattributes).  This could then be put in the post-commit hook
that publishes Worg.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Viktor,

Viktor Rosenfeld  writes:

> However, the old version of the tutorial still shows at the old address.
> I moved the file in the worg git repository from org-tutorials/ to
> exporters/ but now there are two separate HTML copies. Do I have to do
> something else to explicitly delete the old version?

Er, this is a strong (and quite stupid) limitation of the publishing
engine: it does not delete files that exist from a previous publication.

I have absolutely no idea for a clever mechanism that would find the
files to delete.

We can delete them manually for now -- please send me the list of
.html files I need to delete.

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi Bastien,

Bastien wrote:

> Hi Viktor,
> 
> Viktor Rosenfeld  writes:
> 
> >> I believe I can give a partial answer: it looks like Worg isn't
> >> publishing right now, which suggests that there was a recent commit
> >> which broke things.  The search for the problem begins.  Once the
> >> error is identified and fixed, then things should get back to normal.
> >
> > That's not it. The publishing process was working when I last checked. I
> > just pushed a change and it's reflected in the published HTML file, i.e.
> > [1], but the links are still now working and the old file still
> > exists.
> 
> I forgot to add some publishing projects during the migration,
> namely worg-sources and worg-images.  This should be fixed now.

Thanks for the fix. I can confirm that the links work now. (Did just
send a mail to that effect to the mailing list and then your message
arrived.)

However, the old version of the tutorial still shows at the old address.
I moved the file in the worg git repository from org-tutorials/ to
exporters/ but now there are two separate HTML copies. Do I have to do
something else to explicitly delete the old version?

Thanks again,
Viktor

> 
> Thanks,
> 
> -- 
>  Bastien
> 



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi everybody,

Viktor Rosenfeld wrote:

> > > I recently wrote a tutorial for the ox-koma-letter exporter [1] which
> > > includes a link to an Org file [2] file and a PDF file [3] as examples.
> > > The files are checked into the Worg repository, but they are not
> > > available online. Is there something I have to do to enable this? At
> > > first I thought the problem was related to the switchover to the new
> > > exporter, but the issue persists.
> > >
> > > Also, an old version of the tutorial at an old address [4] is still
> > > online even though I've changed the location in the git repository. How
> > > can I delete this version?
> > >
> > > Cheers,
> > > Viktor
> > >
> > > [1] http://orgmode.org/worg/exporters/koma-letter-export.html
> > > [2] http://orgmode.org/worg/sources/exporters/koma-letter-example.org
> > > [3] http://orgmode.org/worg/images/ox-koma-letter/koma-letter-example.pdf
> > > [4] http://orgmode.org/worg/org-tutorials/koma-letter-export.html
> > >
> > 
> > I believe I can give a partial answer: it looks like Worg isn't
> > publishing right now, which suggests that there was a recent commit
> > which broke things.  The search for the problem begins.  Once the
> > error is identified and fixed, then things should get back to normal.
> 
> That's not it. The publishing process was working when I last checked. I
> just pushed a change and it's reflected in the published HTML file, i.e.
> [1], but the links are still now working and the old file still exists.

So I checked again this morning and now the links to the source file and
the PDF example both work. Not sure if it is because of a delay (the
commit is only now listed on the worg homepage) or if somebody did
actively fix something; in case of the latter, many thanks.

The old version of the tutorial is still available at the old address
which is a minor annoyance because it is quickly getting out of date.
But I'm glad that the links are working.

Cheers,
Viktor



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Viktor,

Viktor Rosenfeld  writes:

>> I believe I can give a partial answer: it looks like Worg isn't
>> publishing right now, which suggests that there was a recent commit
>> which broke things.  The search for the problem begins.  Once the
>> error is identified and fixed, then things should get back to normal.
>
> That's not it. The publishing process was working when I last checked. I
> just pushed a change and it's reflected in the published HTML file, i.e.
> [1], but the links are still now working and the old file still
> exists.

I forgot to add some publishing projects during the migration,
namely worg-sources and worg-images.  This should be fixed now.

Thanks,

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-22 Thread Viktor Rosenfeld
Hi,

Jay Kerns wrote:

> Hello Viktor,
> 
> On Tue, May 21, 2013 at 2:13 PM, Viktor Rosenfeld  
> wrote:
> > Hi,
> >
> > I recently wrote a tutorial for the ox-koma-letter exporter [1] which
> > includes a link to an Org file [2] file and a PDF file [3] as examples.
> > The files are checked into the Worg repository, but they are not
> > available online. Is there something I have to do to enable this? At
> > first I thought the problem was related to the switchover to the new
> > exporter, but the issue persists.
> >
> > Also, an old version of the tutorial at an old address [4] is still
> > online even though I've changed the location in the git repository. How
> > can I delete this version?
> >
> > Cheers,
> > Viktor
> >
> > [1] http://orgmode.org/worg/exporters/koma-letter-export.html
> > [2] http://orgmode.org/worg/sources/exporters/koma-letter-example.org
> > [3] http://orgmode.org/worg/images/ox-koma-letter/koma-letter-example.pdf
> > [4] http://orgmode.org/worg/org-tutorials/koma-letter-export.html
> >
> 
> I believe I can give a partial answer: it looks like Worg isn't
> publishing right now, which suggests that there was a recent commit
> which broke things.  The search for the problem begins.  Once the
> error is identified and fixed, then things should get back to normal.

That's not it. The publishing process was working when I last checked. I
just pushed a change and it's reflected in the published HTML file, i.e.
[1], but the links are still now working and the old file still exists.

Cheers,
Viktor

> 
> I've copied Marc on this message - we'll see if we can track the problem down.
> 
> Thanks for the report.
> 
> -- 
> Jay Kerns
> 
> 
> -- 
> G. Jay Kerns, Ph.D.
> Youngstown State University
> http://people.ysu.edu/~gkerns/
> 



Re: [O] Org sources and PDF files on Worg

2013-05-22 Thread Jay Kerns
On Wed, May 22, 2013 at 3:04 AM, Bastien  wrote:
> Hi Jay and Marc,

[snip]

> Don't want to steal your work :)  Just thought I would fix this
> because I may be the one who broke things by forgetting to compile
> at some point.  I checked the scripts in ~/bin/ and they do compile
> normally.  Also, I removed the FORCE flag in (defun publish-worg ...)
> so that publishing does not republish everything.
>
> HTH,

Thanks, Bastien, yes, this helps a lot.

-- 
Jay



Re: [O] Org sources and PDF files on Worg

2013-05-22 Thread Bastien
Hi Jay and Marc,

Jay Kerns  writes:

> I believe I can give a partial answer: it looks like Worg isn't
> publishing right now, which suggests that there was a recent commit
> which broke things.

Apparently things broke because Org in ~/git/org-mode on the server 
was not compiled (and autoloads not created etc.)  I compiled Org
again and republished it.  It should publish correctly now.

> The search for the problem begins.  Once the
> error is identified and fixed, then things should get back to normal.

Don't want to steal your work :)  Just thought I would fix this
because I may be the one who broke things by forgetting to compile
at some point.  I checked the scripts in ~/bin/ and they do compile
normally.  Also, I removed the FORCE flag in (defun publish-worg ...)
so that publishing does not republish everything.

HTH,

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-21 Thread Jay Kerns
Hello Viktor,

On Tue, May 21, 2013 at 2:13 PM, Viktor Rosenfeld  wrote:
> Hi,
>
> I recently wrote a tutorial for the ox-koma-letter exporter [1] which
> includes a link to an Org file [2] file and a PDF file [3] as examples.
> The files are checked into the Worg repository, but they are not
> available online. Is there something I have to do to enable this? At
> first I thought the problem was related to the switchover to the new
> exporter, but the issue persists.
>
> Also, an old version of the tutorial at an old address [4] is still
> online even though I've changed the location in the git repository. How
> can I delete this version?
>
> Cheers,
> Viktor
>
> [1] http://orgmode.org/worg/exporters/koma-letter-export.html
> [2] http://orgmode.org/worg/sources/exporters/koma-letter-example.org
> [3] http://orgmode.org/worg/images/ox-koma-letter/koma-letter-example.pdf
> [4] http://orgmode.org/worg/org-tutorials/koma-letter-export.html
>

I believe I can give a partial answer: it looks like Worg isn't
publishing right now, which suggests that there was a recent commit
which broke things.  The search for the problem begins.  Once the
error is identified and fixed, then things should get back to normal.

I've copied Marc on this message - we'll see if we can track the problem down.

Thanks for the report.

-- 
Jay Kerns


-- 
G. Jay Kerns, Ph.D.
Youngstown State University
http://people.ysu.edu/~gkerns/



[O] Org sources and PDF files on Worg

2013-05-21 Thread Viktor Rosenfeld
Hi,

I recently wrote a tutorial for the ox-koma-letter exporter [1] which
includes a link to an Org file [2] file and a PDF file [3] as examples.
The files are checked into the Worg repository, but they are not
available online. Is there something I have to do to enable this? At
first I thought the problem was related to the switchover to the new
exporter, but the issue persists. 

Also, an old version of the tutorial at an old address [4] is still
online even though I've changed the location in the git repository. How
can I delete this version?

Cheers,
Viktor

[1] http://orgmode.org/worg/exporters/koma-letter-export.html
[2] http://orgmode.org/worg/sources/exporters/koma-letter-example.org
[3] http://orgmode.org/worg/images/ox-koma-letter/koma-letter-example.pdf
[4] http://orgmode.org/worg/org-tutorials/koma-letter-export.html