Graphviz Dot file failing to compile in Windows Emacs
Asked Answered
H

1

0

I took the following steps to use Graphviz Dot mode in emacs:

  • as per instructions at http://ppareit.github.io/graphviz-dot-mode/, added

    (load-file "PATH_TO_FILE/graphviz-dot-mode.el")

    to my .emacs file (C:/emacs/.emacs for me), and copied the text from http://www.graphviz.org/Misc/graphviz-dot-mode.el to a file in that path.

  • in Emacs, created a new file (c-x c-f) and named it something.dot. Copied the DOT text from the aforementioned website, which became highlighted for dot syntax.

  • Selected all text and pressed C-c c. Was given the following message:

    dot -Tpng c:/emacs/dot_test.dot > c:/emacs/dot_test.png 'dot' is not recognized as an internal or external command, operable program or batch file.

    Compilation exited abnormally with code 1 at Thu Jul 30 06:36:12

Hestia answered 30/7, 2015 at 14:56 Comment(1)
Have you installed Graphviz? The Emacs mode simply interfaces with the separately installed dot utility; it doesn't implement Graphviz itself.Rollicking
P
0

You have to first install graphviz to your system. The Windows installer is found here.

I was able to use it successfully without making any changes to my PATH (which they say would be an issue), however be aware you may need to add it to your path.

Plusch answered 31/7, 2015 at 13:40 Comment(2)
I unpacked the zip file into C:\graphviz and added GRAPHVIZ_DOT to my environment variables with the path C:\graphviz\graphviz-2.38\release\bin\dot.exe. Still displaying the same error message when I run in emacs. I tried pip install graphviz, which said that graphviz was installed successfully, other than what I've already done I'm not sure what installing graphviz entails..Hestia
It shouldn't be part of GRAPHVIZ_DOT, it should be added to PATH so that it can be found as an executable.Plusch

© 2022 - 2024 — McMap. All rights reserved.