[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?
From: |
Sebastian Rose |
Subject: |
Re: [Orgmode] Export ascii-images using ditaa when targeting HTML? |
Date: |
Wed, 12 Nov 2008 20:13:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Hi Eric,
I used no options at all for testing. Now it works here (see my previous
mail).
The only problem left is now the copy problem if I change
something. Seems that this happens somewhere else. I.e., not in
org-exp-blocks.el, but rather in one of those:
sh$ grep -Fr copy-file emacs/lisp/ext/org-mode/lisp/
emacs/lisp/ext/org-mode/lisp/org.el: (copy-file pngfile tofile 'replace)
emacs/lisp/ext/org-mode/lisp/org-attach.el: ((eq method 'cp)
(copy-file file fname))
emacs/lisp/ext/org-mode/lisp/org-publish.el: (copy-file filename pub-dir))
Debugger entered--Lisp error: (file-already-exists "File already exists"
"/home/sebastian/develop/htdocs/org-notes/ditaa-all-examples.png")
copy-file("/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/ditaa-all-examples.png" nil nil nil)
apply(copy-file ("/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/ditaa-all-examples.png" nil nil nil))
image-file-call-underlying(copy-file copy-file
"/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/ditaa-all-examples.png" nil nil nil)
apply(image-file-call-underlying copy-file copy-file
("/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/ditaa-all-examples.png" nil nil nil))
image-file-handler(copy-file
"/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/ditaa-all-examples.png" nil nil nil)
copy-file("/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/")
org-publish-attachment((:base-directory "~/emacs/org/notes/" :recursive t
:base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|txt\\|htm\\|html\\|dtd\\|php"
:publishing-directory "~/develop/htdocs/org-notes/" :publishing-function
org-publish-attachment)
"/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/")
funcall(org-publish-attachment (:base-directory "~/emacs/org/notes/"
:recursive t :base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|txt\\|htm\\|html\\|dtd\\|php"
:publishing-directory "~/develop/htdocs/org-notes/" :publishing-function
org-publish-attachment)
"/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
"/home/sebastian/develop/htdocs/org-notes/")
(if (listp publishing-function) (mapc (lambda ... ...) publishing-function)
(funcall publishing-function project-plist filename tmp-pub-dir))
(let* ((project ...) (project-plist ...) (ftname ...) (publishing-function
...) (base-dir ...) (pub-dir ...) tmp-pub-dir) (setq tmp-pub-dir
(file-name-directory ...)) (if (listp publishing-function) (mapc ...
publishing-function) (funcall publishing-function project-plist filename
tmp-pub-dir)))
(progn (let* (... ... ... ... ... ... tmp-pub-dir) (setq tmp-pub-dir ...) (if
... ... ...)) (org-publish-update-timestamp filename))
(if (org-publish-needed-p filename) (progn (let* ... ... ...)
(org-publish-update-timestamp filename)))
(when (org-publish-needed-p filename) (let* (... ... ... ... ... ...
tmp-pub-dir) (setq tmp-pub-dir ...) (if ... ... ...))
(org-publish-update-timestamp filename))
org-publish-file("/home/sebastian/emacs/org/notes/ditaa-all-examples.png"
("org-notes-static" :base-directory "~/emacs/org/notes/" :recursive t
:base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|txt\\|htm\\|html\\|dtd\\|php"
:publishing-directory "~/develop/htdocs/org-notes/" :publishing-function
org-publish-attachment))
(while (setq file (pop files)) (org-publish-file file project))
(let* ((project-plist ...) (exclude-regexp ...) (index-p ...) (index-filename
...) (index-function ...) (preparation-function ...) (completion-function ...)
(files ...) file) (when preparation-function (funcall preparation-function))
(if index-p (funcall index-function project index-filename)) (while (setq file
...) (org-publish-file file project)) (when completion-function (funcall
completion-function)))
(lambda (project) (let* (... ... ... ... ... ... ... ... file) (when
preparation-function ...) (if index-p ...) (while ... ...) (when
completion-function ...)))(("org-notes-static" :base-directory
"~/emacs/org/notes/" :recursive t :base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|txt\\|htm\\|html\\|dtd\\|php"
:publishing-directory "~/develop/htdocs/org-notes/" :publishing-function
org-publish-attachment))
mapc((lambda (project) (let* (... ... ... ... ... ... ... ... file) (when
preparation-function ...) (if index-p ...) (while ... ...) (when
completion-function ...))) (("org-notes" :base-directory "~/emacs/org/notes/"
:auto-index t :index-filename "sitemap.org" :index-title "Sitemap" :recursive t
:base-extension "org" :publishing-directory "~/develop/htdocs/org-notes/"
:publishing-function org-publish-org-to-html :headline-levels 4 :auto-preamble
t :style "<link rel=\"stylesheet\" href=\"stylesheet.css\" type=\"text/css\"
/>\n <script type=\"text/javascript\" src=\"org-info.js\"></script>")
("org-notes-static" :base-directory "~/emacs/org/notes/" :recursive t
:base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|txt\\|htm\\|html\\|dtd\\|php"
:publishing-directory "~/develop/htdocs/org-notes/" :publishing-function
org-publish-attachment)))
org-publish-projects((("org" :components ("org-notes" "org-notes-static"))))
(let* ((force current-prefix-arg) (org-publish-use-timestamps-flag ...))
(org-publish-projects (list ...)))
(save-window-excursion (let* (... ...) (org-publish-projects ...)))
org-publish(nil)
call-interactively(org-publish t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
Don't know if this is new - I never ever changed an image file so far.
Regards,
Sebastian
"Eric Schulte" <address@hidden> writes:
> Sebastian Rose <address@hidden> writes:
>
>> Carsten Dominik <address@hidden> writes:
>>>> ditaa has no option to adjust the background color, but if I use ditaa
>>>> from the commandline, the background color is white.
>>>
>>> For what it is worth, I have no problems with the background, it is white
>>> all
>>> right. Maybe it is transparent?
>>
>>
>> No, it is black indeed. But I found out, what it is.
>>
>>
>> This line
>>
>> (shell-command (concat "java -jar " ditaa-jar-path " " args " "
>> data-file " " out-file))
>>
>> calls another java than this command line:
>>
>> java -jar ~/bin/ditaar.jar /tmp/org-ditaa5607fgk
>>
>>
>
> Just to make sure, did you notice the command line option -S which
> controls the background color?
>
> ,----[java -jar ditaa0_6b.jar -h]
> |
> | DiTAA version 0.6b, Copyright (C) 2004 Efstathios Sideris
> |
> | Using options:
> | html: true
> | Error: Please provide the input file filename
> | Usage:
> | java -jar text2image.jar
> |
> | [{-o,--overwrite}]
> | [{-d,--debug}]
> | [{-t,--tabs}]
> |
> | [{-S,--no-shadows}]
> | [{-A,--no-antialias}]
> | [{-s,--scale} scale]
> | [{-r,--round-corners}]
> | [{-E,--no-separation}]
> |
> | [{-h,--html}]
> |
> | <inpfile> [outfile]
> |
> | Note: do not group options like -rES. This is going to be fixed.
> `----
>
> -- Eric
>
>> >
>> Yes, that seems to be the reason:
>>
>> /usr/bin/java is that free GNU java stuff that comes with Debian
>> (some packages depend on it). It's deadslow and makes the black
>> background.
>>
>>
>> The commandline calls:
>>
>> sh$ which java
>> /usr/lib/jvm/java-6-sun/bin/java
>>
>> It's fast and makes the background white :-)
>>
>>
>>
>> `shell-command' seems to call /usr/bin/java instead of regarding my $PATH
>>
>> $sh echo $PATH
>> /home/sebastian/bin/ext/maven/bin:/usr/lib/jvm/java-6-sun/bin:/home/sebastian/bin:/usr/local/bin:/usr/bin:/bin
>>
>>
>> Funny enough, the problem remains, if I start emacs from the bash
>> prompt. Seems that `shell-command' searches the standard directories
>> without regarding the environment?
>>
>>
>>
>> Don't know yet, if this is related to the problem:
>>
>> Debian/Java - it's a stupid combination really. I installed the SUN java
>> stuff using apt-get - it's odd:
>>
>> sh$ ls -l /etc/alternatives/java
>> lrwxrwxrwx 1 root root 34 28. Okt 20:35 /etc/alternatives/java ->
>> /usr/lib/jvm/java-gcj/jre/bin/java
>>
>> Don't believe adjusting this helps, but I'd have to adjust all the
>> other /etc/alternatives/java* stuff by hand anyway. Maybe I should
>> file a bug report to Debian.
>>
>>
>>
>>
>> Adjusting the java path in org-exp-blocks directly fixes it.
>>
>>
>>
>> Thanks,
>
--
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
- [Orgmode] Re: Export ascii-images using ditaa when targeting HTML?, (continued)
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Sebastian Rose, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Carsten Dominik, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Sebastian Rose, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Sebastian Rose, 2008/11/12
- [Orgmode] Re: Export ascii-images using ditaa when targeting HTML?, Bernt Hansen, 2008/11/12
- [Orgmode] Re: Export ascii-images using ditaa when targeting HTML?, Sebastian Rose, 2008/11/12
- [Orgmode] Re: Export ascii-images using ditaa when targeting HTML?, Bernt Hansen, 2008/11/12
- [Orgmode] Re: Export ascii-images using ditaa when targeting HTML?, Sebastian Rose, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Eric Schulte, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?,
Sebastian Rose <=
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Eric Schulte, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Sebastian Rose, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Eric Schulte, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Sebastian Rose, 2008/11/12
- Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Carsten Dominik, 2008/11/12
Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Eric Schulte, 2008/11/12
Re: [Orgmode] Export ascii-images using ditaa when targeting HTML?, Eric Schulte, 2008/11/11