From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Export ascii-images using ditaa when targeting HTML? Date: Wed, 12 Nov 2008 12:47:38 -0800 Message-ID: <87ej1geknp.fsf@gmail.com> References: <878wrpso07.fsf@gmail.com> <874p2dgid4.fsf@kassiopeya.MSHEIMNETZ> <1BA2B74F-75F6-4176-A3D3-7CCD672B7520@uva.nl> <874p2c6bgk.fsf@kassiopeya.MSHEIMNETZ> <87zlk4hj2a.fsf@gmail.com> <87vdus4v1g.fsf@kassiopeya.MSHEIMNETZ> <873ahwhhcc.fsf@gmail.com> <87myg44rfk.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0Mci-00039B-T2 for emacs-orgmode@gnu.org; Wed, 12 Nov 2008 15:47:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0Mcf-00037g-70 for emacs-orgmode@gnu.org; Wed, 12 Nov 2008 15:47:36 -0500 Received: from [199.232.76.173] (port=37797 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0Mce-00037Z-RE for emacs-orgmode@gnu.org; Wed, 12 Nov 2008 15:47:33 -0500 Received: from wa-out-1112.google.com ([209.85.146.181]:62557) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0Mcd-00041K-T3 for emacs-orgmode@gnu.org; Wed, 12 Nov 2008 15:47:32 -0500 Received: by wa-out-1112.google.com with SMTP id n4so489908wag.26 for ; Wed, 12 Nov 2008 12:47:29 -0800 (PST) In-Reply-To: <87myg44rfk.fsf@kassiopeya.MSHEIMNETZ> (Sebastian Rose's message of "Wed, 12 Nov 2008 21:31:27 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastian Rose Cc: emacs-orgmode@gnu.org --=-=-= Sebastian Rose writes: > Hi Eric, > > > sorry for being unclear. I use the -o option. The image is always > created correctly. But it seems that the exporter > (org-publish-attachment) refuses to overwrite existing files. > Hi Sebastian, I see now. It looks like org-publish-attachment uses the `copy-file' function to copy files to the publish directory. We just need to set an option argument to copy-file to tell it how to deal with overwriting. ,----[from copy-file documentation] | The optional third argument OK-IF-ALREADY-EXISTS specifies what to do | if file NEWNAME already exists. If OK-IF-ALREADY-EXISTS is nil, we | signal a `file-already-exists' error without overwriting. If | OK-IF-ALREADY-EXISTS is a number, we request confirmation from the user | about overwriting; this is what happens in interactive use with M-x. | Any other value for OK-IF-ALREADY-EXISTS means to overwrite the | existing file. `---- This file is currently set to nil, we should probably set it to t so it always overwrites files. Does that sound like the best option? The attached minimal patch set this option to t. Best -- Eric --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-publish.patch diff --git a/lisp/org-publish.el b/lisp/org-publish.el index aa8c495..bbd9180 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -537,7 +537,7 @@ See `org-publish-org-to' to the list of arguments." ;; make sure eshell/cp code is loaded (unless (file-directory-p pub-dir) (make-directory pub-dir t)) - (copy-file filename pub-dir)) + (copy-file filename pub-dir t)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Publishing files, sets of files, and indices --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--