From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: capture, attach, link files from web Date: Tue, 08 Oct 2013 09:39:14 +0800 Message-ID: <87ob70pmm5.fsf@ericabrahamsen.net> References: <87wqlpuwpl.fsf@gmail.com> <87siwdoz33.fsf@ericabrahamsen.net> <87r4bxug24.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTMFk-0002jI-HN for emacs-orgmode@gnu.org; Mon, 07 Oct 2013 21:38:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTMFe-0001ux-Do for emacs-orgmode@gnu.org; Mon, 07 Oct 2013 21:38:24 -0400 Received: from plane.gmane.org ([80.91.229.3]:43405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTMFe-0001un-6e for emacs-orgmode@gnu.org; Mon, 07 Oct 2013 21:38:18 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VTMFc-0004hV-TG for emacs-orgmode@gnu.org; Tue, 08 Oct 2013 03:38:16 +0200 Received: from 111.199.226.97 ([111.199.226.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Oct 2013 03:38:16 +0200 Received: from eric by 111.199.226.97 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Oct 2013 03:38:16 +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 Myles English writes: > Hi Eric, > > I am glad you like it. > > eric@ericabrahamsen.net writes: > > [..] > >> Rather than sending downloaded files to $TMPDIR, it might be nice to >> have them just use whatever dir org-attach would have used. I use >> org-attach from time to time, and notice that everything ends up under >> ~/org/data/. I haven't actually investigated why that happens (I've got >> org-directory set to ~/org/), mostly because it strikes me as a fine >> default. When we've got that directory, setting a different TMPDIR seems >> unnecessary. I'll admit part of my hesitation comes from the fact that >> "TMPDIR" sounds like it's going to get automatically deleted at some >> point. > > The $TMPDIR was just an environment variable I had set already so > assumed it was semi-standard (doesn't everyone have a $TMPDIR?). When > my function calls: > > (org-attach-attach (concat tmpdir "/" fname) nil 'mv) > > it moves the file from $TMPDIR to the attachment directory, amongst > other things no doubt. Whoops, should have looked at the signature of `org-attach-attach' more closely... > The attachment directory is decided by the (org-attach-dir) function and > I presume the new file could be downloaded straight there and then the > task/heading would have to be synchronised with it's attachments to get > the new file to show up in the heading's properties. > >> I've often thought it would be nice to link to images in an org file >> with http: links, then at some arbitrary point in time call a >> hypothetical org-localize-external-resources command. That command would >> wget all the external resources, put them somewhere local, and switch >> the links to the file: type. Just a thought. > > Good idea. I look forward to your clever implementation with proper > indenting and informative comments. I'll get right on it :)