From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: function for cleaning org-attach directories Date: Thu, 16 Jul 2015 20:43:09 +0800 Message-ID: <87d1zs46jm.fsf@ericabrahamsen.net> References: <877fq0o4xx.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFiVW-0007jj-Dj for emacs-orgmode@gnu.org; Thu, 16 Jul 2015 08:43:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFiVR-0000k3-Va for emacs-orgmode@gnu.org; Thu, 16 Jul 2015 08:43:22 -0400 Received: from plane.gmane.org ([80.91.229.3]:51004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFiVR-0000jm-PI for emacs-orgmode@gnu.org; Thu, 16 Jul 2015 08:43:17 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZFiVP-0004fm-2u for emacs-orgmode@gnu.org; Thu, 16 Jul 2015 14:43:15 +0200 Received: from 221.218.164.240 ([221.218.164.240]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jul 2015 14:43:15 +0200 Received: from eric by 221.218.164.240 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jul 2015 14:43:15 +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 Alan Schmitt writes: > Hi Eric, > > On 2015-07-16 10:57, Eric Abrahamsen writes: > >> I use org-attach a lot, and if you're not careful you can get a "data/" >> directory of many gigabytes. Not a problem, until you want to rsync it >> and it takes all day... >> >> I wrote this to clean my attach directories. I'm not sure how portable >> it is (and I'm really not pleased with the (concat attach-dir "/" d "/" >> d+)), but I'm posting it to see if it's useful to anyone. >> >> Comments/improvements welcome! If the final product is desirable, I can >> work it up as a patch. > > This would be most useful indeed. One quick question: why do you use > "rm" instead of "delete-file"? Because I was copy-pasting from org-attach! The real question is: why didn't I use `delete-directory' :) I'll do another version! E