emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Rasmus
Subject: Re: [O] Org sources and PDF files on Worg
Date: Fri, 24 May 2013 02:46:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Bastien <address@hidden> writes:

> Hi Suvayu,
>
> Suvayu Ali <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]