emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel: ob-plantuml fails on Windows
@ 2010-09-02 18:36 Manish
  2010-09-02 18:47 ` Nick Dokos
  2010-09-02 18:49 ` Eric Schulte
  0 siblings, 2 replies; 6+ messages in thread
From: Manish @ 2010-09-02 18:36 UTC (permalink / raw)
  To: Org-Mode

Hello!

I was trying to test ob-plantuml and it failed with following trace.

Setup:

- GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-08-30 on 3249CTO
- Windows XP SP 2
- Org mode from git head
- org-plantuml-jar-path is set
- This example works from command-line and does not require dot.

Trace:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("[^\"]" nil)
  shell-quote-argument(nil)
  (concat "java -jar " (shell-quote-argument org-plantuml-jar-path) "
-p " cmdline " < " (shell-quote-argument in-file) " > "
(shell-quote-argument out-file))
  (let* ((result-params ...) (out-file ...) (cmdline ...) (in-file
...) (cmd ...)) (unless (file-exists-p org-plantuml-jar-path) (error
"Could not find plantuml.jar at %s" org-plantuml-jar-path))
(with-temp-file in-file (insert ...)) (message "%s" cmd)
(org-babel-eval cmd "") out-file)
  org-babel-execute:plantuml("skinparam defaultFontName
Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
. "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
"replace file") (:session . "none") (:shebang . "") (:tangle . "")))
  funcall(org-babel-execute:plantuml "skinparam defaultFontName
Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
. "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
"replace file") (:session . "none") (:shebang . "") (:tangle . "")))
  (setq result (funcall cmd body params))
  (if (and (not arg) new-hash (equal new-hash old-hash))
(save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (setq
result ...) (message ...) result) (message "executing %s code
block%s..." (capitalize lang) (if ... ... "")) (setq result (funcall
cmd body params)) (if (eq result-type ...) (setq result ...))
(org-babel-insert-result result result-params info new-hash indent
lang) (run-hooks (quote org-babel-after-execute-hook)) result)
  (progn (fset (quote call-process-region) (function* ...)) (unless
(fboundp cmd) (error "No org-babel-execute function for %s!" lang))
(if (and ... new-hash ...) (save-excursion ... ... ... ... ... result)
(message "executing %s code block%s..." ... ...) (setq result ...) (if
... ...) (org-babel-insert-result result result-params info new-hash
indent lang) (run-hooks ...) result))
  (unwind-protect (progn (fset ... ...) (unless ... ...) (if ... ...
... ... ... ... ... result)) (if --cl-letf-bound-- (fset ...
--cl-letf-save--) (fmakunbound ...)))
  (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...))
(unwind-protect (progn ... ... ...) (if --cl-letf-bound-- ... ...)))
  (letf ((... ...)) (unless (fboundp cmd) (error "No org-babel-execute
function for %s!" lang)) (if (and ... new-hash ...) (save-excursion
... ... ... ... ... result) (message "executing %s code block%s..."
... ...) (setq result ...) (if ... ...) (org-babel-insert-result
result result-params info new-hash indent lang) (run-hooks ...)
result))
  (letf* ((... ...)) (unless (fboundp cmd) (error "No
org-babel-execute function for %s!" lang)) (if (and ... new-hash ...)
(save-excursion ... ... ... ... ... result) (message "executing %s
code block%s..." ... ...) (setq result ...) (if ... ...)
(org-babel-insert-result result result-params info new-hash indent
lang) (run-hooks ...) result))
  (flet ((call-process-region ... ...)) (unless (fboundp cmd) (error
"No org-babel-execute function for %s!" lang)) (if (and ... new-hash
...) (save-excursion ... ... ... ... ... result) (message "executing
%s code block%s..." ... ...) (setq result ...) (if ... ...)
(org-babel-insert-result result result-params info new-hash indent
lang) (run-hooks ...) result))
  (unwind-protect (flet (...) (unless ... ...) (if ... ... ... ... ...
... ... result)) (setq call-process-region (quote
org-babel-call-process-region-original)))
  (let* ((lang ...) (params ...) (new-hash ...) (old-hash ...) (body
...) (result-params ...) (result-type ...) (cmd ...) (dir ...)
(default-directory ...) (org-babel-call-process-region-original ...)
(indent ...) result) (unwind-protect (flet ... ... ...) (setq
call-process-region ...)))
  (progn (let* (... ... ... ... ... ... ... ... ... ... ... ...
result) (unwind-protect ... ...)))
  (if (org-babel-confirm-evaluate info) (progn (let* ... ...)))
  (when (org-babel-confirm-evaluate info) (let* (... ... ... ... ...
... ... ... ... ... ... ... result) (unwind-protect ... ...)))
  (let ((info ...)) (when (org-babel-confirm-evaluate info) (let* ... ...)))
  org-babel-execute-src-block(nil ("plantuml" "skinparam
defaultFontName Candara\nskinparam defaultFontSize 8\nparticipant
User\nUser  ->  A:  DoWork\nactivate  A\nA  ->  B:  <<  createRequest
>>\nactivate  B\nB  ->  C:  DoWork\nactivate  C\nC  -->  B:
WorkDone\ndestroy  C\nB  -->  A:  RequestCreated\ndeactivate  B\nA  ->
 User:  Done\ndeactivate  A\n" ((:cache . "no") (:comments . "")
(:exports . "results") (:hlines . "no") (:noweb . "no") (:result .
"\"sequence.png\"") (:results . "replace file") (:session . "none")
(:shebang . "") (:tangle . "")) "" nil nil 0))
  (progn (org-babel-execute-src-block current-prefix-arg info) t)
  (if info (progn (org-babel-execute-src-block current-prefix-arg info) t) nil)
  (let ((info ...)) (if info (progn ... t) nil))
  org-babel-execute-src-block-maybe()
  (or (org-babel-execute-src-block-maybe) (org-babel-lob-execute-maybe))
  org-babel-execute-maybe()
  (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-execute-maybe))
  (unless org-babel-no-eval-on-ctrl-c-ctrl-c (org-babel-execute-maybe))
  org-babel-execute-safely-maybe()
  run-hook-with-args-until-success(org-babel-execute-safely-maybe)
  (cond ((or ... org-occur-highlights
org-latex-fragment-image-overlays) (and ... ...)
(org-remove-occur-highlights)
(org-remove-latex-fragment-image-overlays) (message "Temporary
highlights/overlays removed from current buffer")) ((and ... ...)
(funcall org-finish-function)) ((run-hook-with-args-until-success
...)) ((or ... ...) (call-interactively ...)) ((org-on-target-p)
(call-interactively ...)) ((and ... ...) (call-interactively ...))
((org-on-heading-p) (call-interactively ...)) ((org-at-table\.el-p)
(message "Use C-c ' to edit table.el tables")) ((org-at-table-p)
(org-table-maybe-eval-formula) (if arg ... ...) (call-interactively
...)) ((or ... ...) (call-interactively ...))
((org-at-item-checkbox-p) (call-interactively ...) (call-interactively
...) (org-list-send-list ...)) ((org-at-item-p) (call-interactively
...) (when arg ...) (org-list-send-list ...)) ((save-excursion ...
...) (beginning-of-line 1) (save-excursion ...)) ((save-excursion ...
...) (cond ... ...)) ((org-clock-update-time-maybe)) (t (error "C-c
C-c can do nothing useful at this location")))
  (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (...
...) (...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...
... ...) (... ...) (... ... ... ...) (... ... ... ...) (... ... ...)
(... ...) (...) (t ...)))
  org-ctrl-c-ctrl-c(nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
--8<---------------cut here---------------end--------------->8---

Any clues/ideas what could be wrong?

Thanks
-- Manish

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Babel: ob-plantuml fails on Windows
  2010-09-02 18:36 Babel: ob-plantuml fails on Windows Manish
@ 2010-09-02 18:47 ` Nick Dokos
  2010-09-03 13:46   ` Eric Schulte
  2010-09-02 18:49 ` Eric Schulte
  1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2010-09-02 18:47 UTC (permalink / raw)
  To: Manish; +Cc: nicholas.dokos, Org-Mode

Manish <mailtomanish.sharma@gmail.com> wrote:

> Hello!
> 
> I was trying to test ob-plantuml and it failed with following trace.
> 
> Setup:
> 
> - GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-08-30 on 3249CTO
> - Windows XP SP 2
> - Org mode from git head
> - org-plantuml-jar-path is set
> - This example works from command-line and does not require dot.
> 
> Trace:
> 
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   string-match("[^\"]" nil)
>   shell-quote-argument(nil)
>   (concat "java -jar " (shell-quote-argument org-plantuml-jar-path) "
> -p " cmdline " < " (shell-quote-argument in-file) " > "
> (shell-quote-argument out-file))

Maybe something similar to the problem discussed in this message/thread?

http://thread.gmane.org/gmane.emacs.orgmode/29535/focus=29539

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Babel: ob-plantuml fails on Windows
  2010-09-02 18:36 Babel: ob-plantuml fails on Windows Manish
  2010-09-02 18:47 ` Nick Dokos
@ 2010-09-02 18:49 ` Eric Schulte
  2010-09-08  2:58   ` Manish
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2010-09-02 18:49 UTC (permalink / raw)
  To: Manish; +Cc: Org-Mode

Hi Manish,

Are you sure that org-plantuml-jar-path is set when the function
produces that error?  I've just pushed up a slight change to ob-plantuml
which is more explicit about ensuring the correctness of
org-plantuml-jar-path before it is used.  Could you retry with this new
addition?

Thanks -- Eric

Manish <mailtomanish.sharma@gmail.com> writes:

> Hello!
>
> I was trying to test ob-plantuml and it failed with following trace.
>
> Setup:
>
> - GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-08-30 on 3249CTO
> - Windows XP SP 2
> - Org mode from git head
> - org-plantuml-jar-path is set
> - This example works from command-line and does not require dot.
>
> Trace:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   string-match("[^\"]" nil)
>   shell-quote-argument(nil)
>   (concat "java -jar " (shell-quote-argument org-plantuml-jar-path) "
> -p " cmdline " < " (shell-quote-argument in-file) " > "
> (shell-quote-argument out-file))
>   (let* ((result-params ...) (out-file ...) (cmdline ...) (in-file
> ...) (cmd ...)) (unless (file-exists-p org-plantuml-jar-path) (error
> "Could not find plantuml.jar at %s" org-plantuml-jar-path))
> (with-temp-file in-file (insert ...)) (message "%s" cmd)
> (org-babel-eval cmd "") out-file)
>   org-babel-execute:plantuml("skinparam defaultFontName
> Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
> DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
> ->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
> A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
> A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
> . "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
> "replace file") (:session . "none") (:shebang . "") (:tangle . "")))
>   funcall(org-babel-execute:plantuml "skinparam defaultFontName
> Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
> DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
> ->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
> A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
> A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
> . "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
> "replace file") (:session . "none") (:shebang . "") (:tangle . "")))
>   (setq result (funcall cmd body params))
>   (if (and (not arg) new-hash (equal new-hash old-hash))
> (save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (setq
> result ...) (message ...) result) (message "executing %s code
> block%s..." (capitalize lang) (if ... ... "")) (setq result (funcall
> cmd body params)) (if (eq result-type ...) (setq result ...))
> (org-babel-insert-result result result-params info new-hash indent
> lang) (run-hooks (quote org-babel-after-execute-hook)) result)
>   (progn (fset (quote call-process-region) (function* ...)) (unless
> (fboundp cmd) (error "No org-babel-execute function for %s!" lang))
> (if (and ... new-hash ...) (save-excursion ... ... ... ... ... result)
> (message "executing %s code block%s..." ... ...) (setq result ...) (if
> ... ...) (org-babel-insert-result result result-params info new-hash
> indent lang) (run-hooks ...) result))
>   (unwind-protect (progn (fset ... ...) (unless ... ...) (if ... ...
> ... ... ... ... ... result)) (if --cl-letf-bound-- (fset ...
> --cl-letf-save--) (fmakunbound ...)))
>   (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...))
> (unwind-protect (progn ... ... ...) (if --cl-letf-bound-- ... ...)))
>   (letf ((... ...)) (unless (fboundp cmd) (error "No org-babel-execute
> function for %s!" lang)) (if (and ... new-hash ...) (save-excursion
> ... ... ... ... ... result) (message "executing %s code block%s..."
> ... ...) (setq result ...) (if ... ...) (org-babel-insert-result
> result result-params info new-hash indent lang) (run-hooks ...)
> result))
>   (letf* ((... ...)) (unless (fboundp cmd) (error "No
> org-babel-execute function for %s!" lang)) (if (and ... new-hash ...)
> (save-excursion ... ... ... ... ... result) (message "executing %s
> code block%s..." ... ...) (setq result ...) (if ... ...)
> (org-babel-insert-result result result-params info new-hash indent
> lang) (run-hooks ...) result))
>   (flet ((call-process-region ... ...)) (unless (fboundp cmd) (error
> "No org-babel-execute function for %s!" lang)) (if (and ... new-hash
> ...) (save-excursion ... ... ... ... ... result) (message "executing
> %s code block%s..." ... ...) (setq result ...) (if ... ...)
> (org-babel-insert-result result result-params info new-hash indent
> lang) (run-hooks ...) result))
>   (unwind-protect (flet (...) (unless ... ...) (if ... ... ... ... ...
> ... ... result)) (setq call-process-region (quote
> org-babel-call-process-region-original)))
>   (let* ((lang ...) (params ...) (new-hash ...) (old-hash ...) (body
> ...) (result-params ...) (result-type ...) (cmd ...) (dir ...)
> (default-directory ...) (org-babel-call-process-region-original ...)
> (indent ...) result) (unwind-protect (flet ... ... ...) (setq
> call-process-region ...)))
>   (progn (let* (... ... ... ... ... ... ... ... ... ... ... ...
> result) (unwind-protect ... ...)))
>   (if (org-babel-confirm-evaluate info) (progn (let* ... ...)))
>   (when (org-babel-confirm-evaluate info) (let* (... ... ... ... ...
> ... ... ... ... ... ... ... result) (unwind-protect ... ...)))
>   (let ((info ...)) (when (org-babel-confirm-evaluate info) (let* ... ...)))
>   org-babel-execute-src-block(nil ("plantuml" "skinparam
> defaultFontName Candara\nskinparam defaultFontSize 8\nparticipant
> User\nUser  ->  A:  DoWork\nactivate  A\nA  ->  B:  <<  createRequest
>>>\nactivate  B\nB  ->  C:  DoWork\nactivate  C\nC  -->  B:
> WorkDone\ndestroy  C\nB  -->  A:  RequestCreated\ndeactivate  B\nA  ->
>  User:  Done\ndeactivate  A\n" ((:cache . "no") (:comments . "")
> (:exports . "results") (:hlines . "no") (:noweb . "no") (:result .
> "\"sequence.png\"") (:results . "replace file") (:session . "none")
> (:shebang . "") (:tangle . "")) "" nil nil 0))
>   (progn (org-babel-execute-src-block current-prefix-arg info) t)
>   (if info (progn (org-babel-execute-src-block current-prefix-arg info) t) nil)
>   (let ((info ...)) (if info (progn ... t) nil))
>   org-babel-execute-src-block-maybe()
>   (or (org-babel-execute-src-block-maybe) (org-babel-lob-execute-maybe))
>   org-babel-execute-maybe()
>   (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-execute-maybe))
>   (unless org-babel-no-eval-on-ctrl-c-ctrl-c (org-babel-execute-maybe))
>   org-babel-execute-safely-maybe()
>   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
>   (cond ((or ... org-occur-highlights
> org-latex-fragment-image-overlays) (and ... ...)
> (org-remove-occur-highlights)
> (org-remove-latex-fragment-image-overlays) (message "Temporary
> highlights/overlays removed from current buffer")) ((and ... ...)
> (funcall org-finish-function)) ((run-hook-with-args-until-success
> ...)) ((or ... ...) (call-interactively ...)) ((org-on-target-p)
> (call-interactively ...)) ((and ... ...) (call-interactively ...))
> ((org-on-heading-p) (call-interactively ...)) ((org-at-table\.el-p)
> (message "Use C-c ' to edit table.el tables")) ((org-at-table-p)
> (org-table-maybe-eval-formula) (if arg ... ...) (call-interactively
> ...)) ((or ... ...) (call-interactively ...))
> ((org-at-item-checkbox-p) (call-interactively ...) (call-interactively
> ...) (org-list-send-list ...)) ((org-at-item-p) (call-interactively
> ...) (when arg ...) (org-list-send-list ...)) ((save-excursion ...
> ...) (beginning-of-line 1) (save-excursion ...)) ((save-excursion ...
> ...) (cond ... ...)) ((org-clock-update-time-maybe)) (t (error "C-c
> C-c can do nothing useful at this location")))
>   (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (...
> ...) (...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...
> ... ...) (... ...) (... ... ... ...) (... ... ... ...) (... ... ...)
> (... ...) (...) (t ...)))
>   org-ctrl-c-ctrl-c(nil)
>   call-interactively(org-ctrl-c-ctrl-c nil nil)
>
> Any clues/ideas what could be wrong?
>
> Thanks
> -- Manish
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Babel: ob-plantuml fails on Windows
  2010-09-02 18:47 ` Nick Dokos
@ 2010-09-03 13:46   ` Eric Schulte
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Schulte @ 2010-09-03 13:46 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org-Mode

Nick Dokos <nicholas.dokos@hp.com> writes:

> Manish <mailtomanish.sharma@gmail.com> wrote:
>
>> Hello!
>> 
>> I was trying to test ob-plantuml and it failed with following trace.
>> 
>> Setup:
>> 
>> - GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-08-30 on 3249CTO
>> - Windows XP SP 2
>> - Org mode from git head
>> - org-plantuml-jar-path is set
>> - This example works from command-line and does not require dot.
>> 
>> Trace:
>> 
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>   string-match("[^\"]" nil)
>>   shell-quote-argument(nil)
>>   (concat "java -jar " (shell-quote-argument org-plantuml-jar-path) "
>> -p " cmdline " < " (shell-quote-argument in-file) " > "
>> (shell-quote-argument out-file))
>
> Maybe something similar to the problem discussed in this message/thread?
>
> http://thread.gmane.org/gmane.emacs.orgmode/29535/focus=29539
>

In case that may be the problem here, I've just applied the same fix
from the thread above to ob-plantuml. -- Eric

>
> Nick
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Babel: ob-plantuml fails on Windows
  2010-09-02 18:49 ` Eric Schulte
@ 2010-09-08  2:58   ` Manish
  2010-09-08  5:23     ` Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Manish @ 2010-09-08  2:58 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-Mode

On Fri, Sep 3, 2010 at 12:19 AM, Eric Schulte wrote:
> Hi Manish,
>
> Are you sure that org-plantuml-jar-path is set when the function
> produces that error? I've just pushed up a slight change to
> ob-plantuml which is more explicit about ensuring the correctness of
> org-plantuml-jar-path before it is used. Could you retry with this new
> addition?

Sorry for the late reply, Eric. Yes, org-plantuml-jar-path was set
correctly. I just tried with the new code and noticed that I was missing
:file option in the begin_src line. With new code and :file set
correctly, it worked for me. May be the error messages could be indicate
if :file is required and missing?

Thanks
-- Manish

>
> Thanks -- Eric
>
> Manish <mailtomanish.sharma@gmail.com> writes:
>
>> Hello!
>>
>> I was trying to test ob-plantuml and it failed with following trace.
>>
>> Setup:
>>
>> - GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-08-30 on 3249CTO
>> - Windows XP SP 2
>> - Org mode from git head
>> - org-plantuml-jar-path is set
>> - This example works from command-line and does not require dot.
>>
>> Trace:
>>
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>   string-match("[^\"]" nil)
>>   shell-quote-argument(nil)
>>   (concat "java -jar " (shell-quote-argument org-plantuml-jar-path) "
>> -p " cmdline " < " (shell-quote-argument in-file) " > "
>> (shell-quote-argument out-file))
>>   (let* ((result-params ...) (out-file ...) (cmdline ...) (in-file
>> ...) (cmd ...)) (unless (file-exists-p org-plantuml-jar-path) (error
>> "Could not find plantuml.jar at %s" org-plantuml-jar-path))
>> (with-temp-file in-file (insert ...)) (message "%s" cmd)
>> (org-babel-eval cmd "") out-file)
>>   org-babel-execute:plantuml("skinparam defaultFontName
>> Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
>> DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
>> ->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
>> A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
>> A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
>> . "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
>> "replace file") (:session . "none") (:shebang . "") (:tangle . "")))
>>   funcall(org-babel-execute:plantuml "skinparam defaultFontName
>> Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
>> DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
>> ->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
>> A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
>> A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
>> . "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
>> "replace file") (:session . "none") (:shebang . "") (:tangle . "")))
>>   (setq result (funcall cmd body params))
>>   (if (and (not arg) new-hash (equal new-hash old-hash))
>> (save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (setq
>> result ...) (message ...) result) (message "executing %s code
>> block%s..." (capitalize lang) (if ... ... "")) (setq result (funcall
>> cmd body params)) (if (eq result-type ...) (setq result ...))
>> (org-babel-insert-result result result-params info new-hash indent
>> lang) (run-hooks (quote org-babel-after-execute-hook)) result)
>>   (progn (fset (quote call-process-region) (function* ...)) (unless
>> (fboundp cmd) (error "No org-babel-execute function for %s!" lang))
>> (if (and ... new-hash ...) (save-excursion ... ... ... ... ... result)
>> (message "executing %s code block%s..." ... ...) (setq result ...) (if
>> ... ...) (org-babel-insert-result result result-params info new-hash
>> indent lang) (run-hooks ...) result))
>>   (unwind-protect (progn (fset ... ...) (unless ... ...) (if ... ...
>> ... ... ... ... ... result)) (if --cl-letf-bound-- (fset ...
>> --cl-letf-save--) (fmakunbound ...)))
>>   (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...))
>> (unwind-protect (progn ... ... ...) (if --cl-letf-bound-- ... ...)))
>>   (letf ((... ...)) (unless (fboundp cmd) (error "No org-babel-execute
>> function for %s!" lang)) (if (and ... new-hash ...) (save-excursion
>> ... ... ... ... ... result) (message "executing %s code block%s..."
>> ... ...) (setq result ...) (if ... ...) (org-babel-insert-result
>> result result-params info new-hash indent lang) (run-hooks ...)
>> result))
>>   (letf* ((... ...)) (unless (fboundp cmd) (error "No
>> org-babel-execute function for %s!" lang)) (if (and ... new-hash ...)
>> (save-excursion ... ... ... ... ... result) (message "executing %s
>> code block%s..." ... ...) (setq result ...) (if ... ...)
>> (org-babel-insert-result result result-params info new-hash indent
>> lang) (run-hooks ...) result))
>>   (flet ((call-process-region ... ...)) (unless (fboundp cmd) (error
>> "No org-babel-execute function for %s!" lang)) (if (and ... new-hash
>> ...) (save-excursion ... ... ... ... ... result) (message "executing
>> %s code block%s..." ... ...) (setq result ...) (if ... ...)
>> (org-babel-insert-result result result-params info new-hash indent
>> lang) (run-hooks ...) result))
>>   (unwind-protect (flet (...) (unless ... ...) (if ... ... ... ... ...
>> ... ... result)) (setq call-process-region (quote
>> org-babel-call-process-region-original)))
>>   (let* ((lang ...) (params ...) (new-hash ...) (old-hash ...) (body
>> ...) (result-params ...) (result-type ...) (cmd ...) (dir ...)
>> (default-directory ...) (org-babel-call-process-region-original ...)
>> (indent ...) result) (unwind-protect (flet ... ... ...) (setq
>> call-process-region ...)))
>>   (progn (let* (... ... ... ... ... ... ... ... ... ... ... ...
>> result) (unwind-protect ... ...)))
>>   (if (org-babel-confirm-evaluate info) (progn (let* ... ...)))
>>   (when (org-babel-confirm-evaluate info) (let* (... ... ... ... ...
>> ... ... ... ... ... ... ... result) (unwind-protect ... ...)))
>>   (let ((info ...)) (when (org-babel-confirm-evaluate info) (let* ... ...)))
>>   org-babel-execute-src-block(nil ("plantuml" "skinparam
>> defaultFontName Candara\nskinparam defaultFontSize 8\nparticipant
>> User\nUser  ->  A:  DoWork\nactivate  A\nA  ->  B:  <<  createRequest
>>>>\nactivate  B\nB  ->  C:  DoWork\nactivate  C\nC  -->  B:
>> WorkDone\ndestroy  C\nB  -->  A:  RequestCreated\ndeactivate  B\nA  ->
>>  User:  Done\ndeactivate  A\n" ((:cache . "no") (:comments . "")
>> (:exports . "results") (:hlines . "no") (:noweb . "no") (:result .
>> "\"sequence.png\"") (:results . "replace file") (:session . "none")
>> (:shebang . "") (:tangle . "")) "" nil nil 0))
>>   (progn (org-babel-execute-src-block current-prefix-arg info) t)
>>   (if info (progn (org-babel-execute-src-block current-prefix-arg info) t) nil)
>>   (let ((info ...)) (if info (progn ... t) nil))
>>   org-babel-execute-src-block-maybe()
>>   (or (org-babel-execute-src-block-maybe) (org-babel-lob-execute-maybe))
>>   org-babel-execute-maybe()
>>   (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-execute-maybe))
>>   (unless org-babel-no-eval-on-ctrl-c-ctrl-c (org-babel-execute-maybe))
>>   org-babel-execute-safely-maybe()
>>   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
>>   (cond ((or ... org-occur-highlights
>> org-latex-fragment-image-overlays) (and ... ...)
>> (org-remove-occur-highlights)
>> (org-remove-latex-fragment-image-overlays) (message "Temporary
>> highlights/overlays removed from current buffer")) ((and ... ...)
>> (funcall org-finish-function)) ((run-hook-with-args-until-success
>> ...)) ((or ... ...) (call-interactively ...)) ((org-on-target-p)
>> (call-interactively ...)) ((and ... ...) (call-interactively ...))
>> ((org-on-heading-p) (call-interactively ...)) ((org-at-table\.el-p)
>> (message "Use C-c ' to edit table.el tables")) ((org-at-table-p)
>> (org-table-maybe-eval-formula) (if arg ... ...) (call-interactively
>> ...)) ((or ... ...) (call-interactively ...))
>> ((org-at-item-checkbox-p) (call-interactively ...) (call-interactively
>> ...) (org-list-send-list ...)) ((org-at-item-p) (call-interactively
>> ...) (when arg ...) (org-list-send-list ...)) ((save-excursion ...
>> ...) (beginning-of-line 1) (save-excursion ...)) ((save-excursion ...
>> ...) (cond ... ...)) ((org-clock-update-time-maybe)) (t (error "C-c
>> C-c can do nothing useful at this location")))
>>   (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (...
>> ...) (...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...
>> ... ...) (... ...) (... ... ... ...) (... ... ... ...) (... ... ...)
>> (... ...) (...) (t ...)))
>>   org-ctrl-c-ctrl-c(nil)
>>   call-interactively(org-ctrl-c-ctrl-c nil nil)
>>
>> Any clues/ideas what could be wrong?
>>
>> Thanks
>> -- Manish

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Babel: ob-plantuml fails on Windows
  2010-09-08  2:58   ` Manish
@ 2010-09-08  5:23     ` Eric Schulte
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Schulte @ 2010-09-08  5:23 UTC (permalink / raw)
  To: Manish; +Cc: Org-Mode

Manish <mailtomanish.sharma@gmail.com> writes:

> On Fri, Sep 3, 2010 at 12:19 AM, Eric Schulte wrote:
>> Hi Manish,
>>
>> Are you sure that org-plantuml-jar-path is set when the function
>> produces that error? I've just pushed up a slight change to
>> ob-plantuml which is more explicit about ensuring the correctness of
>> org-plantuml-jar-path before it is used. Could you retry with this new
>> addition?
>
> Sorry for the late reply, Eric. Yes, org-plantuml-jar-path was set
> correctly. I just tried with the new code and noticed that I was missing
> :file option in the begin_src line. With new code and :file set
> correctly, it worked for me. May be the error messages could be indicate
> if :file is required and missing?
>

Done, an error message should now be raised when the :file header
argument is not present.

Best -- Eric

>
> Thanks
> -- Manish
>
>>
>> Thanks -- Eric
>>
>> Manish <mailtomanish.sharma@gmail.com> writes:
>>
>>> Hello!
>>>
>>> I was trying to test ob-plantuml and it failed with following trace.
>>>
>>> Setup:
>>>
>>> - GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-08-30 on 3249CTO
>>> - Windows XP SP 2
>>> - Org mode from git head
>>> - org-plantuml-jar-path is set
>>> - This example works from command-line and does not require dot.
>>>
>>> Trace:
>>>
>>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>>   string-match("[^\"]" nil)
>>>   shell-quote-argument(nil)
>>>   (concat "java -jar " (shell-quote-argument org-plantuml-jar-path) "
>>> -p " cmdline " < " (shell-quote-argument in-file) " > "
>>> (shell-quote-argument out-file))
>>>   (let* ((result-params ...) (out-file ...) (cmdline ...) (in-file
>>> ...) (cmd ...)) (unless (file-exists-p org-plantuml-jar-path) (error
>>> "Could not find plantuml.jar at %s" org-plantuml-jar-path))
>>> (with-temp-file in-file (insert ...)) (message "%s" cmd)
>>> (org-babel-eval cmd "") out-file)
>>>   org-babel-execute:plantuml("skinparam defaultFontName
>>> Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
>>> DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
>>> ->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
>>> A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
>>> A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
>>> . "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
>>> "replace file") (:session . "none") (:shebang . "") (:tangle . "")))
>>>   funcall(org-babel-execute:plantuml "skinparam defaultFontName
>>> Candara\nskinparam defaultFontSize 8\nparticipant  User\nUser  ->  A:
>>> DoWork\nactivate  A\nA  ->  B:  <<  createRequest  >>\nactivate  B\nB
>>> ->  C:  DoWork\nactivate  C\nC  -->  B:  WorkDone\ndestroy  C\nB  -->
>>> A:  RequestCreated\ndeactivate  B\nA  ->  User:  Done\ndeactivate
>>> A\n" ((:cache . "no") (:comments . "") (:exports . "results") (:hlines
>>> . "no") (:noweb . "no") (:result . "\"sequence.png\"") (:results .
>>> "replace file") (:session . "none") (:shebang . "") (:tangle . "")))
>>>   (setq result (funcall cmd body params))
>>>   (if (and (not arg) new-hash (equal new-hash old-hash))
>>> (save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (setq
>>> result ...) (message ...) result) (message "executing %s code
>>> block%s..." (capitalize lang) (if ... ... "")) (setq result (funcall
>>> cmd body params)) (if (eq result-type ...) (setq result ...))
>>> (org-babel-insert-result result result-params info new-hash indent
>>> lang) (run-hooks (quote org-babel-after-execute-hook)) result)
>>>   (progn (fset (quote call-process-region) (function* ...)) (unless
>>> (fboundp cmd) (error "No org-babel-execute function for %s!" lang))
>>> (if (and ... new-hash ...) (save-excursion ... ... ... ... ... result)
>>> (message "executing %s code block%s..." ... ...) (setq result ...) (if
>>> ... ...) (org-babel-insert-result result result-params info new-hash
>>> indent lang) (run-hooks ...) result))
>>>   (unwind-protect (progn (fset ... ...) (unless ... ...) (if ... ...
>>> ... ... ... ... ... result)) (if --cl-letf-bound-- (fset ...
>>> --cl-letf-save--) (fmakunbound ...)))
>>>   (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...))
>>> (unwind-protect (progn ... ... ...) (if --cl-letf-bound-- ... ...)))
>>>   (letf ((... ...)) (unless (fboundp cmd) (error "No org-babel-execute
>>> function for %s!" lang)) (if (and ... new-hash ...) (save-excursion
>>> ... ... ... ... ... result) (message "executing %s code block%s..."
>>> ... ...) (setq result ...) (if ... ...) (org-babel-insert-result
>>> result result-params info new-hash indent lang) (run-hooks ...)
>>> result))
>>>   (letf* ((... ...)) (unless (fboundp cmd) (error "No
>>> org-babel-execute function for %s!" lang)) (if (and ... new-hash ...)
>>> (save-excursion ... ... ... ... ... result) (message "executing %s
>>> code block%s..." ... ...) (setq result ...) (if ... ...)
>>> (org-babel-insert-result result result-params info new-hash indent
>>> lang) (run-hooks ...) result))
>>>   (flet ((call-process-region ... ...)) (unless (fboundp cmd) (error
>>> "No org-babel-execute function for %s!" lang)) (if (and ... new-hash
>>> ...) (save-excursion ... ... ... ... ... result) (message "executing
>>> %s code block%s..." ... ...) (setq result ...) (if ... ...)
>>> (org-babel-insert-result result result-params info new-hash indent
>>> lang) (run-hooks ...) result))
>>>   (unwind-protect (flet (...) (unless ... ...) (if ... ... ... ... ...
>>> ... ... result)) (setq call-process-region (quote
>>> org-babel-call-process-region-original)))
>>>   (let* ((lang ...) (params ...) (new-hash ...) (old-hash ...) (body
>>> ...) (result-params ...) (result-type ...) (cmd ...) (dir ...)
>>> (default-directory ...) (org-babel-call-process-region-original ...)
>>> (indent ...) result) (unwind-protect (flet ... ... ...) (setq
>>> call-process-region ...)))
>>>   (progn (let* (... ... ... ... ... ... ... ... ... ... ... ...
>>> result) (unwind-protect ... ...)))
>>>   (if (org-babel-confirm-evaluate info) (progn (let* ... ...)))
>>>   (when (org-babel-confirm-evaluate info) (let* (... ... ... ... ...
>>> ... ... ... ... ... ... ... result) (unwind-protect ... ...)))
>>>   (let ((info ...)) (when (org-babel-confirm-evaluate info) (let* ... ...)))
>>>   org-babel-execute-src-block(nil ("plantuml" "skinparam
>>> defaultFontName Candara\nskinparam defaultFontSize 8\nparticipant
>>> User\nUser  ->  A:  DoWork\nactivate  A\nA  ->  B:  <<  createRequest
>>>>>\nactivate  B\nB  ->  C:  DoWork\nactivate  C\nC  -->  B:
>>> WorkDone\ndestroy  C\nB  -->  A:  RequestCreated\ndeactivate  B\nA  ->
>>>  User:  Done\ndeactivate  A\n" ((:cache . "no") (:comments . "")
>>> (:exports . "results") (:hlines . "no") (:noweb . "no") (:result .
>>> "\"sequence.png\"") (:results . "replace file") (:session . "none")
>>> (:shebang . "") (:tangle . "")) "" nil nil 0))
>>>   (progn (org-babel-execute-src-block current-prefix-arg info) t)
>>>   (if info (progn (org-babel-execute-src-block current-prefix-arg info) t) nil)
>>>   (let ((info ...)) (if info (progn ... t) nil))
>>>   org-babel-execute-src-block-maybe()
>>>   (or (org-babel-execute-src-block-maybe) (org-babel-lob-execute-maybe))
>>>   org-babel-execute-maybe()
>>>   (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-execute-maybe))
>>>   (unless org-babel-no-eval-on-ctrl-c-ctrl-c (org-babel-execute-maybe))
>>>   org-babel-execute-safely-maybe()
>>>   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
>>>   (cond ((or ... org-occur-highlights
>>> org-latex-fragment-image-overlays) (and ... ...)
>>> (org-remove-occur-highlights)
>>> (org-remove-latex-fragment-image-overlays) (message "Temporary
>>> highlights/overlays removed from current buffer")) ((and ... ...)
>>> (funcall org-finish-function)) ((run-hook-with-args-until-success
>>> ...)) ((or ... ...) (call-interactively ...)) ((org-on-target-p)
>>> (call-interactively ...)) ((and ... ...) (call-interactively ...))
>>> ((org-on-heading-p) (call-interactively ...)) ((org-at-table\.el-p)
>>> (message "Use C-c ' to edit table.el tables")) ((org-at-table-p)
>>> (org-table-maybe-eval-formula) (if arg ... ...) (call-interactively
>>> ...)) ((or ... ...) (call-interactively ...))
>>> ((org-at-item-checkbox-p) (call-interactively ...) (call-interactively
>>> ...) (org-list-send-list ...)) ((org-at-item-p) (call-interactively
>>> ...) (when arg ...) (org-list-send-list ...)) ((save-excursion ...
>>> ...) (beginning-of-line 1) (save-excursion ...)) ((save-excursion ...
>>> ...) (cond ... ...)) ((org-clock-update-time-maybe)) (t (error "C-c
>>> C-c can do nothing useful at this location")))
>>>   (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (...
>>> ...) (...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...
>>> ... ...) (... ...) (... ... ... ...) (... ... ... ...) (... ... ...)
>>> (... ...) (...) (t ...)))
>>>   org-ctrl-c-ctrl-c(nil)
>>>   call-interactively(org-ctrl-c-ctrl-c nil nil)
>>>
>>> Any clues/ideas what could be wrong?
>>>
>>> Thanks
>>> -- Manish

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-08  5:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 18:36 Babel: ob-plantuml fails on Windows Manish
2010-09-02 18:47 ` Nick Dokos
2010-09-03 13:46   ` Eric Schulte
2010-09-02 18:49 ` Eric Schulte
2010-09-08  2:58   ` Manish
2010-09-08  5:23     ` Eric Schulte

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).