emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-babel-dot on windows
@ 2011-08-31  0:52 Bas Bossink
  2011-09-02 15:19 ` Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Bas Bossink @ 2011-08-31  0:52 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 677 bytes --]

Hi all,

I'm trying to use org-babel-dot on windows but when I try to generate an
image with C-c C-c the following errors apear:

Error: dot: can't open
c\:/Users/bas/AppData/Local/Temp/babel-8036JGY/dot-8036HHn
Error: dot: can't open Dropbox/backward.png

It seems that the file path is not handled correctly. Have there been any
error reports about this? Or can this be solved be changing my configuration
somehow.

- System : Windows 7 64 bit
- dot executable is in the $PATH
- org-mode version git commit cae9f947beb5f529569a7eb33b460e670fb8ff97 (this
behavior also exists in 7.7)
- Emacs 23.2.1

Any light on this issue would be greatly apreciated.

Regards,

Bas Bossink

[-- Attachment #2: Type: text/html, Size: 930 bytes --]

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

* Re: org-babel-dot on windows
  2011-08-31  0:52 org-babel-dot on windows Bas Bossink
@ 2011-09-02 15:19 ` Eric Schulte
  2011-09-02 19:51   ` Sebastien Vauban
  2011-09-02 23:33   ` Bas Bossink
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Schulte @ 2011-09-02 15:19 UTC (permalink / raw)
  To: Bas Bossink; +Cc: emacs-orgmode@gnu.org

Hi Bas,

Unfortunately I don't have access to a windows machine to reproduce this
problem.

Does the temporary file name mentioned in your error report exist, and
does it look to be a valid file name?  Org-mode uses built-in Emacs
functions for creating temporary files, and these functions are supposed
to work across Windows/*nix systems, so I'm not sure what the problem
could be.

Are you using the latest version of Org-mode, and do you have anything
weird in your configuration which could cause this problem?

Sorry I can't be of more help, maybe another windows user on the list
can check that dot works for them.

Best -- Eric

Bas Bossink <bas.bossink@gmail.com> writes:

> Hi all,
>
> I'm trying to use org-babel-dot on windows but when I try to generate an
> image with C-c C-c the following errors apear:
>
> Error: dot: can't open
> c\:/Users/bas/AppData/Local/Temp/babel-8036JGY/dot-8036HHn
> Error: dot: can't open Dropbox/backward.png
>
> It seems that the file path is not handled correctly. Have there been any
> error reports about this? Or can this be solved be changing my configuration
> somehow.
>
> - System : Windows 7 64 bit
> - dot executable is in the $PATH
> - org-mode version git commit cae9f947beb5f529569a7eb33b460e670fb8ff97 (this
> behavior also exists in 7.7)
> - Emacs 23.2.1
>
> Any light on this issue would be greatly apreciated.
>
> Regards,
>
> Bas Bossink

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: org-babel-dot on windows
  2011-09-02 15:19 ` Eric Schulte
@ 2011-09-02 19:51   ` Sebastien Vauban
  2011-09-02 23:33   ` Bas Bossink
  1 sibling, 0 replies; 6+ messages in thread
From: Sebastien Vauban @ 2011-09-02 19:51 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bas and Eric,

Eric Schulte wrote:
>> I'm trying to use org-babel-dot on windows but when I try to generate an
>> image with C-c C-c the following errors apear:
>
> Unfortunately I don't have access to a windows machine to reproduce this
> problem.
>
> Does the temporary file name mentioned in your error report exist, and does
> it look to be a valid file name? Org-mode uses built-in Emacs functions for
> creating temporary files, and these functions are supposed to work across
> Windows/*nix systems, so I'm not sure what the problem could be.
>
> Are you using the latest version of Org-mode, and do you have anything weird
> in your configuration which could cause this problem?
>
> Sorry I can't be of more help, maybe another windows user on the list can
> check that dot works for them.

The following works for me (just tested) on Windows XP SP3:

#+begin_src dot :file foo.png :cmdline -Tpng
digraph G {
  a -> b [label="hello", style=dashed];
  a -> c [label="world"];
  c -> d; b -> c; d -> a;
  b [shape=Mdiamond, label="this is b"];
  c [shape=polygon, sides=5, peripheries=3];
  d [style=bold];
}
#+end_src

Could you maybe provide an ECM of what you were trying to use?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: org-babel-dot on windows
  2011-09-02 15:19 ` Eric Schulte
  2011-09-02 19:51   ` Sebastien Vauban
@ 2011-09-02 23:33   ` Bas Bossink
  2011-09-03 19:18     ` Eric Schulte
  2011-09-03 20:27     ` Sebastien Vauban
  1 sibling, 2 replies; 6+ messages in thread
From: Bas Bossink @ 2011-09-02 23:33 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3652 bytes --]

Hi Eric,

I'm using the following version of org-mode and Emacs:

commit cae9f947beb5f529569a7eb33b460e670fb8ff97
Author: Eric Schulte <schulte.eric@gmail.com>
Date:   Tue Aug 30 14:50:26 2011 -0600

Emacs: GNU Emacs 23.3.1 (i386-mingw-nt6.1.7601)
 of 2011-03-10 on 3249CTO

The error says: Error: dot: can't open
c\:/Users/bas/AppData/Local/Temp/babel-2652SMW/dot-2652b4h

running:
dot -Tpng \Users\bas\AppData\Local\Temp\babel-2652SMW\dot-2652b4h -o
test.png

in a cmd window works fine and generates the png I would expect.

About my configuration, I don't know if there is anything weird in it. For
reference I appended the org-mode part of my .emacs at the bottom of this
message.

Do you know anybody who has a Windows box that can reproduce/investigate
this problem?

Thanks for your quick response.

Regards,

Bas Bossink



----
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(global-set-key (kbd "<f3>") 'org-clock-in)
(global-set-key (kbd "S-<f3>") 'org-clock-out)
(global-set-key (kbd "C-c r") 'remember)    ;; (1)
(add-hook 'remember-mode-hook 'org-remember-apply-template) ;; (2)
(setq org-remember-templates
      '((?n "* %U %?\n\n  %i\n  %a" "~/notes.org")))  ;; (3)
(setq remember-annotation-functions '(org-remember-annotation)) ;; (4)
(setq remember-handler-functions '(org-remember-handler)) ;; (5)
(setq org-log-done t)
(setq org-habit-show-habits-only-for-today t)
(setq org-export-html-inline-images t)
(setq org-ditaa-jar-path "~/programs/dita/ditaa0_9.jar")
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)

(org-babel-do-load-languages
 (quote org-babel-load-languages)
 (quote ((emacs-lisp . t)
         (dot . t)
         (ditaa . t)
         (R . t)
         (python . t)
         (ruby . t)
         (gnuplot . t)
         (clojure . t)
         (sh . t)
         (ledger . t)
         (org . t)
         (plantuml . t)
         (latex . t))))
---



On Fri, Sep 2, 2011 at 5:19 PM, Eric Schulte <schulte.eric@gmail.com> wrote:

> Hi Bas,
>
> Unfortunately I don't have access to a windows machine to reproduce this
> problem.
>
> Does the temporary file name mentioned in your error report exist, and
> does it look to be a valid file name?  Org-mode uses built-in Emacs
> functions for creating temporary files, and these functions are supposed
> to work across Windows/*nix systems, so I'm not sure what the problem
> could be.
>
> Are you using the latest version of Org-mode, and do you have anything
> weird in your configuration which could cause this problem?
>
> Sorry I can't be of more help, maybe another windows user on the list
> can check that dot works for them.
>
> Best -- Eric
>
> Bas Bossink <bas.bossink@gmail.com> writes:
>
> > Hi all,
> >
> > I'm trying to use org-babel-dot on windows but when I try to generate an
> > image with C-c C-c the following errors apear:
> >
> > Error: dot: can't open
> > c\:/Users/bas/AppData/Local/Temp/babel-8036JGY/dot-8036HHn
> > Error: dot: can't open Dropbox/backward.png
> >
> > It seems that the file path is not handled correctly. Have there been any
> > error reports about this? Or can this be solved be changing my
> configuration
> > somehow.
> >
> > - System : Windows 7 64 bit
> > - dot executable is in the $PATH
> > - org-mode version git commit cae9f947beb5f529569a7eb33b460e670fb8ff97
> (this
> > behavior also exists in 7.7)
> > - Emacs 23.2.1
> >
> > Any light on this issue would be greatly apreciated.
> >
> > Regards,
> >
> > Bas Bossink
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/
>

[-- Attachment #2: Type: text/html, Size: 5356 bytes --]

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

* Re: org-babel-dot on windows
  2011-09-02 23:33   ` Bas Bossink
@ 2011-09-03 19:18     ` Eric Schulte
  2011-09-03 20:27     ` Sebastien Vauban
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Schulte @ 2011-09-03 19:18 UTC (permalink / raw)
  To: Bas Bossink; +Cc: emacs-orgmode

I would suggest updating to the most recent version of Org-mode and see
if that fixes your issue, as we have confirmed that others are able to
evaluate dot code blocks on Windows machines.

Best -- Eric

Bas Bossink <bas.bossink@gmail.com> writes:

> Hi Eric,
>
> I'm using the following version of org-mode and Emacs:
>
> commit cae9f947beb5f529569a7eb33b460e670fb8ff97
> Author: Eric Schulte <schulte.eric@gmail.com>
> Date:   Tue Aug 30 14:50:26 2011 -0600
>
> Emacs: GNU Emacs 23.3.1 (i386-mingw-nt6.1.7601)
>  of 2011-03-10 on 3249CTO
>
> The error says: Error: dot: can't open
> c\:/Users/bas/AppData/Local/Temp/babel-2652SMW/dot-2652b4h
>
> running:
> dot -Tpng \Users\bas\AppData\Local\Temp\babel-2652SMW\dot-2652b4h -o
> test.png
>
> in a cmd window works fine and generates the png I would expect.
>
> About my configuration, I don't know if there is anything weird in it. For
> reference I appended the org-mode part of my .emacs at the bottom of this
> message.
>
> Do you know anybody who has a Windows box that can reproduce/investigate
> this problem?
>
> Thanks for your quick response.
>
> Regards,
>
> Bas Bossink
>
>
>
> ----
> (require 'org-install)
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> (define-key global-map "\C-cl" 'org-store-link)
> (define-key global-map "\C-ca" 'org-agenda)
> (global-set-key (kbd "<f3>") 'org-clock-in)
> (global-set-key (kbd "S-<f3>") 'org-clock-out)
> (global-set-key (kbd "C-c r") 'remember)    ;; (1)
> (add-hook 'remember-mode-hook 'org-remember-apply-template) ;; (2)
> (setq org-remember-templates
>       '((?n "* %U %?\n\n  %i\n  %a" "~/notes.org")))  ;; (3)
> (setq remember-annotation-functions '(org-remember-annotation)) ;; (4)
> (setq remember-handler-functions '(org-remember-handler)) ;; (5)
> (setq org-log-done t)
> (setq org-habit-show-habits-only-for-today t)
> (setq org-export-html-inline-images t)
> (setq org-ditaa-jar-path "~/programs/dita/ditaa0_9.jar")
> (add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
>
> (org-babel-do-load-languages
>  (quote org-babel-load-languages)
>  (quote ((emacs-lisp . t)
>          (dot . t)
>          (ditaa . t)
>          (R . t)
>          (python . t)
>          (ruby . t)
>          (gnuplot . t)
>          (clojure . t)
>          (sh . t)
>          (ledger . t)
>          (org . t)
>          (plantuml . t)
>          (latex . t))))
> ---
>
>
>
> On Fri, Sep 2, 2011 at 5:19 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> Hi Bas,
>>
>> Unfortunately I don't have access to a windows machine to reproduce this
>> problem.
>>
>> Does the temporary file name mentioned in your error report exist, and
>> does it look to be a valid file name?  Org-mode uses built-in Emacs
>> functions for creating temporary files, and these functions are supposed
>> to work across Windows/*nix systems, so I'm not sure what the problem
>> could be.
>>
>> Are you using the latest version of Org-mode, and do you have anything
>> weird in your configuration which could cause this problem?
>>
>> Sorry I can't be of more help, maybe another windows user on the list
>> can check that dot works for them.
>>
>> Best -- Eric
>>
>> Bas Bossink <bas.bossink@gmail.com> writes:
>>
>> > Hi all,
>> >
>> > I'm trying to use org-babel-dot on windows but when I try to generate an
>> > image with C-c C-c the following errors apear:
>> >
>> > Error: dot: can't open
>> > c\:/Users/bas/AppData/Local/Temp/babel-8036JGY/dot-8036HHn
>> > Error: dot: can't open Dropbox/backward.png
>> >
>> > It seems that the file path is not handled correctly. Have there been any
>> > error reports about this? Or can this be solved be changing my
>> configuration
>> > somehow.
>> >
>> > - System : Windows 7 64 bit
>> > - dot executable is in the $PATH
>> > - org-mode version git commit cae9f947beb5f529569a7eb33b460e670fb8ff97
>> (this
>> > behavior also exists in 7.7)
>> > - Emacs 23.2.1
>> >
>> > Any light on this issue would be greatly apreciated.
>> >
>> > Regards,
>> >
>> > Bas Bossink
>>
>> --
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/
>>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: org-babel-dot on windows
  2011-09-02 23:33   ` Bas Bossink
  2011-09-03 19:18     ` Eric Schulte
@ 2011-09-03 20:27     ` Sebastien Vauban
  1 sibling, 0 replies; 6+ messages in thread
From: Sebastien Vauban @ 2011-09-03 20:27 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bas,

Bas Bossink wrote:
> The error says: Error: dot: can't open
> c\:/Users/bas/AppData/Local/Temp/babel-2652SMW/dot-2652b4h
>
> running:
> dot -Tpng \Users\bas\AppData\Local\Temp\babel-2652SMW\dot-2652b4h -o
> test.png
>
> in a cmd window works fine and generates the png I would expect.

That shows a problem that I would relate to the shell.

BTW, I find your filepath quite weird, with c\:/Users... I'm sure there is a
quoting problem there. What happens if you try M-x ffap on that path?  Does
Emacs recognize it?

> About my configuration, I don't know if there is anything weird in it. For
> reference I appended the org-mode part of my .emacs at the bottom of this
> message.

Hence, your org-mode config is not important; the one which is, is the one
about shell. Something such as:

#+begin_src sh
      ;; for single shell commands
      (setq shell-file-name
            ;; must be in the `PATH' (Windows users)
            (cond ((executable-find "bash") "bash")
                  ((executable-find "cmdproxy.exe") "cmdproxy.exe")
                  (t "cmd.exe"))) ;; = system shell

      ;; use `shell-file-name' as the default shell
      (when (try-require 'env)
        (setenv "SHELL" shell-file-name))

      ;; switch used to have the shell execute its command line argument
      ;; (`/c' does not work with XEmacs)
      (setq shell-command-switch
            (cond ((eq shell-file-name "cmd.exe") "/c") ; using a system shell
                  (t "-c")))

      ;; quote process arguments to ensure correct parsing on Windows
      (setq w32-quote-process-args
            (cond ((eq shell-file-name "cmd.exe") nil) ; using a system shell
                  (t t)))
#+end_src

> Do you know anybody who has a Windows box that can reproduce/investigate
> this problem?

HTH.

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2011-09-03 20:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31  0:52 org-babel-dot on windows Bas Bossink
2011-09-02 15:19 ` Eric Schulte
2011-09-02 19:51   ` Sebastien Vauban
2011-09-02 23:33   ` Bas Bossink
2011-09-03 19:18     ` Eric Schulte
2011-09-03 20:27     ` Sebastien Vauban

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