From: Sebastian Rose <sebastian_rose@gmx.de>
To: emacs-orgmode@gnu.org
Subject: Re: Export ascii-images using ditaa when targeting HTML?
Date: Wed, 12 Nov 2008 22:54:42 +0100 [thread overview]
Message-ID: <87ej1g4nkt.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <87ej1geknp.fsf@gmail.com> (Eric Schulte's message of "Wed, 12 Nov 2008 12:47:38 -0800")
Hi Eric,
yes, this looks fine to me and works :-)
What do the others think?
I believe overwriting is the desired behaviour on export. I use
org-publish-attachment for images, stylesheets, scripts and so on. And
they shurely should be updated in the publishing-directory.
I just wonder, why I never ran into that problem. All the other files
where always overwritten.
One more:
If I refile an entry containing such an ditaa image, the old image
remains in both, the base-directory, and the publishing-directory. An
option to set the image directory relative to base-directory (and adjust
the link accordingly) would be very nice. That way, we could refer to
the image in other files too and the links would work after refiling
such an entry.
Thanks again,
Sebastian
"Eric Schulte" <schulte.eric@gmail.com> writes:
> Sebastian Rose <sebastian_rose@gmx.de> 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
>
>
> 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
>
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose emma-stil de, sebastian_rose gmx de
Http: www.emma-stil.de
next prev parent reply other threads:[~2008-11-12 21:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 16:12 Export ascii-images using ditaa when targeting HTML? Mac
2008-11-12 1:57 ` Eric Schulte
2008-11-12 8:14 ` Mac
2008-11-12 9:44 ` Mac
2008-11-12 10:00 ` Carsten Dominik
2008-11-12 10:17 ` Mac
2008-11-14 14:54 ` Bernt Hansen
2008-11-14 15:51 ` Carsten Dominik
2008-11-14 16:02 ` Bernt Hansen
2008-11-12 1:59 ` Eric Schulte
2008-11-12 6:45 ` Carsten Dominik
2008-11-12 9:53 ` Mac
2008-11-12 13:54 ` Sebastian Rose
2008-11-12 15:59 ` Carsten Dominik
2008-11-12 18:33 ` Sebastian Rose
2008-11-12 18:42 ` Sebastian Rose
2008-11-12 19:18 ` Bernt Hansen
2008-11-12 19:41 ` Sebastian Rose
2008-11-12 19:47 ` Bernt Hansen
2008-11-12 20:33 ` Sebastian Rose
2008-11-12 18:53 ` Eric Schulte
2008-11-12 19:13 ` Sebastian Rose
2008-11-12 19:30 ` Eric Schulte
2008-11-12 20:31 ` Sebastian Rose
2008-11-12 20:47 ` Eric Schulte
2008-11-12 21:54 ` Sebastian Rose [this message]
2008-11-12 23:01 ` Carsten Dominik
2008-11-12 22:42 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ej1g4nkt.fsf@kassiopeya.MSHEIMNETZ \
--to=sebastian_rose@gmx.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).