From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Org sources and PDF files on Worg Date: Fri, 24 May 2013 02:46:10 +0200 Message-ID: <874ndti4rx.fsf@pank.iue.private> References: <20130521181345.GA58552@client199-78.wlan.hu-berlin.de> <20130522150433.GC61443@kenny.local> <87mwrmw2ux.fsf@bzg.ath.cx> <20130523080241.GB642@kenny.local> <87d2siw1h8.fsf@bzg.ath.cx> <20130523154853.GC20987@kuru.dyndns-at-home.com> <87li75h9a3.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufg9K-0002HC-FY for emacs-orgmode@gnu.org; Thu, 23 May 2013 20:46:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ufg9J-0004v6-Dz for emacs-orgmode@gnu.org; Thu, 23 May 2013 20:46:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:57161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufg9J-0004uw-7k for emacs-orgmode@gnu.org; Thu, 23 May 2013 20:46:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ufg9G-0008Ls-Or for emacs-orgmode@gnu.org; Fri, 24 May 2013 02:46:22 +0200 Received: from dynamic-adsl-94-39-217-165.clienti.tiscali.it ([94.39.217.165]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 May 2013 02:46:22 +0200 Received: from rasmus by dynamic-adsl-94-39-217-165.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 May 2013 02:46:22 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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