emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Need help on org-exp-blocks and dot
@ 2011-01-20 18:59 Bryan Emrys
  2011-01-20 19:12 ` Eric Schulte
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Emrys @ 2011-01-20 18:59 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 621 bytes --]

Hello. Trying to use org-exp-blocks with dot to export a graphic in
generated html file. Works on linux box.

However, on a mac box everything except the graph is generated. Instead of
pulling in the graphic, it just prints dot_somehashednumber.png. As far as I
can tell, that png is not generated anywhere and left in a file system
either.

Dot works standalone from a terminal window. Paths seem to be right and
emacs isn't complaining about loading org-exp-blocks.

The emacs version on the mac is 23.1.1. I have (require 'org-exp-blocks) in
the .emacs file.

Any suggestions on what to look for next?

Thanks,

Bryan

[-- Attachment #1.2: Type: text/html, Size: 679 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 9+ messages in thread

* Re: Need help on org-exp-blocks and dot
  2011-01-20 18:59 Need help on org-exp-blocks and dot Bryan Emrys
@ 2011-01-20 19:12 ` Eric Schulte
  2011-01-20 21:21   ` Bryan Emrys
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2011-01-20 19:12 UTC (permalink / raw)
  To: Bryan Emrys; +Cc: emacs-orgmode

Hi Bryan,

For generating dot graphics from Org-mode it is now suggested to use a
normal code block rather than org-exp-blocks, for example the following
should generate a graph when pressing C-c C-c on the block, and on
export should include the resulting graph rather than the code block.

from http://www.graphviz.org/Gallery/directed/fsm.gv.txt
#+begin_src dot :file fsa.png :exports results
  digraph finite_state_machine {
          rankdir=LR;
          size="8,5"
          node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
          node [shape = circle];
          LR_0 -> LR_2 [ label = "SS(B)" ];
          LR_0 -> LR_1 [ label = "SS(S)" ];
          LR_1 -> LR_3 [ label = "S($end)" ];
          LR_2 -> LR_6 [ label = "SS(b)" ];
          LR_2 -> LR_5 [ label = "SS(a)" ];
          LR_2 -> LR_4 [ label = "S(A)" ];
          LR_5 -> LR_7 [ label = "S(b)" ];
          LR_5 -> LR_5 [ label = "S(a)" ];
          LR_6 -> LR_6 [ label = "S(b)" ];
          LR_6 -> LR_5 [ label = "S(a)" ];
          LR_7 -> LR_8 [ label = "S(b)" ];
          LR_7 -> LR_5 [ label = "S(a)" ];
          LR_8 -> LR_6 [ label = "S(b)" ];
          LR_8 -> LR_5 [ label = "S(a)" ];
  }
#+end_src

Cheers -- Eric

Bryan Emrys <bryan.emrys@gmail.com> writes:

> Hello. Trying to use org-exp-blocks with dot to export a graphic in
> generated html file. Works on linux box.
>
> However, on a mac box everything except the graph is generated. Instead of
> pulling in the graphic, it just prints dot_somehashednumber.png. As far as I
> can tell, that png is not generated anywhere and left in a file system
> either.
>
> Dot works standalone from a terminal window. Paths seem to be right and
> emacs isn't complaining about loading org-exp-blocks.
>
> The emacs version on the mac is 23.1.1. I have (require 'org-exp-blocks) in
> the .emacs file.
>
> Any suggestions on what to look for next?
>
> Thanks,
>
> Bryan
> _______________________________________________
> 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] 9+ messages in thread

* Re: Need help on org-exp-blocks and dot
  2011-01-20 19:12 ` Eric Schulte
@ 2011-01-20 21:21   ` Bryan Emrys
  2011-01-20 21:28     ` Erik Iverson
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Emrys @ 2011-01-20 21:21 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2624 bytes --]

Hi,

Now getting an error message: /bin/bash: dot: command not found

Hmm. Pathname issue?

On the mac, dot is in /opt/local/bin/dot
My .emacs file has: (setq load-path (cons "/opt/local/bin" load-path))

I can certainly just open a terminal window and run dot from the command
line.

Thanks for any further suggestions.

Bryan,

On Thu, Jan 20, 2011 at 11:12 AM, Eric Schulte <schulte.eric@gmail.com>wrote:

> Hi Bryan,
>
> For generating dot graphics from Org-mode it is now suggested to use a
> normal code block rather than org-exp-blocks, for example the following
> should generate a graph when pressing C-c C-c on the block, and on
> export should include the resulting graph rather than the code block.
>
> from http://www.graphviz.org/Gallery/directed/fsm.gv.txt
> #+begin_src dot :file fsa.png :exports results
>  digraph finite_state_machine {
>          rankdir=LR;
>          size="8,5"
>          node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
>          node [shape = circle];
>          LR_0 -> LR_2 [ label = "SS(B)" ];
>          LR_0 -> LR_1 [ label = "SS(S)" ];
>          LR_1 -> LR_3 [ label = "S($end)" ];
>          LR_2 -> LR_6 [ label = "SS(b)" ];
>          LR_2 -> LR_5 [ label = "SS(a)" ];
>          LR_2 -> LR_4 [ label = "S(A)" ];
>          LR_5 -> LR_7 [ label = "S(b)" ];
>          LR_5 -> LR_5 [ label = "S(a)" ];
>          LR_6 -> LR_6 [ label = "S(b)" ];
>          LR_6 -> LR_5 [ label = "S(a)" ];
>          LR_7 -> LR_8 [ label = "S(b)" ];
>          LR_7 -> LR_5 [ label = "S(a)" ];
>          LR_8 -> LR_6 [ label = "S(b)" ];
>          LR_8 -> LR_5 [ label = "S(a)" ];
>  }
> #+end_src
>
> Cheers -- Eric
>
> Bryan Emrys <bryan.emrys@gmail.com> writes:
>
> > Hello. Trying to use org-exp-blocks with dot to export a graphic in
> > generated html file. Works on linux box.
> >
> > However, on a mac box everything except the graph is generated. Instead
> of
> > pulling in the graphic, it just prints dot_somehashednumber.png. As far
> as I
> > can tell, that png is not generated anywhere and left in a file system
> > either.
> >
> > Dot works standalone from a terminal window. Paths seem to be right and
> > emacs isn't complaining about loading org-exp-blocks.
> >
> > The emacs version on the mac is 23.1.1. I have (require 'org-exp-blocks)
> in
> > the .emacs file.
> >
> > Any suggestions on what to look for next?
> >
> > Thanks,
> >
> > Bryan
> > _______________________________________________
> > 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
>

[-- Attachment #1.2: Type: text/html, Size: 3708 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 9+ messages in thread

* Re: Need help on org-exp-blocks and dot
  2011-01-20 21:21   ` Bryan Emrys
@ 2011-01-20 21:28     ` Erik Iverson
  2011-01-20 21:33       ` Bryan Emrys
  0 siblings, 1 reply; 9+ messages in thread
From: Erik Iverson @ 2011-01-20 21:28 UTC (permalink / raw)
  To: Bryan Emrys; +Cc: emacs-orgmode



Bryan Emrys wrote:
> Hi,
> 
> Now getting an error message: /bin/bash: dot: command not found
> 
> Hmm. Pathname issue?

Absolutely.

> 
> On the mac, dot is in /opt/local/bin/dot
> My .emacs file has: (setq load-path (cons "/opt/local/bin" load-path))
> 

That won't add anything to your shell's path, it's just where Emacs
looks for code to load.

> I can certainly just open a terminal window and run dot from the command 
> line.

Can you grep your shell startup files and find out which one adds
/opt/local/bin to the path?

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

* Re: Need help on org-exp-blocks and dot
  2011-01-20 21:28     ` Erik Iverson
@ 2011-01-20 21:33       ` Bryan Emrys
  2011-01-20 21:38         ` Bryan Emrys
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Emrys @ 2011-01-20 21:33 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 909 bytes --]

Eric,

.profile has:
# MacPorts Installer addition on 2009-04-08_at_20:48:37: adding an
appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.


On Thu, Jan 20, 2011 at 1:28 PM, Erik Iverson <eriki@ccbr.umn.edu> wrote:

>
>
> Bryan Emrys wrote:
>
>> Hi,
>>
>> Now getting an error message: /bin/bash: dot: command not found
>>
>> Hmm. Pathname issue?
>>
>
> Absolutely.
>
>
>
>> On the mac, dot is in /opt/local/bin/dot
>> My .emacs file has: (setq load-path (cons "/opt/local/bin" load-path))
>>
>>
> That won't add anything to your shell's path, it's just where Emacs
> looks for code to load.
>
>
>  I can certainly just open a terminal window and run dot from the command
>> line.
>>
>
> Can you grep your shell startup files and find out which one adds
> /opt/local/bin to the path?
>
>

[-- Attachment #1.2: Type: text/html, Size: 1770 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 9+ messages in thread

* Re: Need help on org-exp-blocks and dot
  2011-01-20 21:33       ` Bryan Emrys
@ 2011-01-20 21:38         ` Bryan Emrys
  2011-01-20 21:41           ` Erik Iverson
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Emrys @ 2011-01-20 21:38 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1207 bytes --]

/usr/local/bin is also in /etc/paths

if I echo $PATH, I get

/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Thanks,

Bryan

On Thu, Jan 20, 2011 at 1:33 PM, Bryan Emrys <bryan.emrys@gmail.com> wrote:

> Eric,
>
> .profile has:
> # MacPorts Installer addition on 2009-04-08_at_20:48:37: adding an
> appropriate PATH variable for use with MacPorts.
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> # Finished adapting your PATH environment variable for use with MacPorts.
>
>
>
> On Thu, Jan 20, 2011 at 1:28 PM, Erik Iverson <eriki@ccbr.umn.edu> wrote:
>
>>
>>
>> Bryan Emrys wrote:
>>
>>> Hi,
>>>
>>> Now getting an error message: /bin/bash: dot: command not found
>>>
>>> Hmm. Pathname issue?
>>>
>>
>> Absolutely.
>>
>>
>>
>>> On the mac, dot is in /opt/local/bin/dot
>>> My .emacs file has: (setq load-path (cons "/opt/local/bin" load-path))
>>>
>>>
>> That won't add anything to your shell's path, it's just where Emacs
>> looks for code to load.
>>
>>
>>  I can certainly just open a terminal window and run dot from the command
>>> line.
>>>
>>
>> Can you grep your shell startup files and find out which one adds
>> /opt/local/bin to the path?
>>
>>
>

[-- Attachment #1.2: Type: text/html, Size: 2333 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 9+ messages in thread

* Re: Need help on org-exp-blocks and dot
  2011-01-20 21:38         ` Bryan Emrys
@ 2011-01-20 21:41           ` Erik Iverson
  2011-01-20 21:51             ` Eric Schulte
  0 siblings, 1 reply; 9+ messages in thread
From: Erik Iverson @ 2011-01-20 21:41 UTC (permalink / raw)
  To: Bryan Emrys; +Cc: emacs-orgmode



Bryan Emrys wrote:
> /usr/local/bin is also in /etc/paths
> 
> if I echo $PATH, I get
> 
> /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

How are you echoing path, starting up a terminal, or within
Emacs M-x shell?

What if you try M-x getenv <RET> PATH <RET> in Emacs?


> 
> Thanks,
> 
> Bryan
> 
> On Thu, Jan 20, 2011 at 1:33 PM, Bryan Emrys <bryan.emrys@gmail.com 
> <mailto:bryan.emrys@gmail.com>> wrote:
> 
>     Eric,
> 
>     .profile has:
>     # MacPorts Installer addition on 2009-04-08_at_20:48:37: adding an
>     appropriate PATH variable for use with MacPorts.
>     export PATH=/opt/local/bin:/opt/local/sbin:$PATH
>     # Finished adapting your PATH environment variable for use with
>     MacPorts.
> 
> 
> 
>     On Thu, Jan 20, 2011 at 1:28 PM, Erik Iverson <eriki@ccbr.umn.edu
>     <mailto:eriki@ccbr.umn.edu>> wrote:
> 
> 
> 
>         Bryan Emrys wrote:
> 
>             Hi,
> 
>             Now getting an error message: /bin/bash: dot: command not found
> 
>             Hmm. Pathname issue?
> 
> 
>         Absolutely.
> 
> 
> 
>             On the mac, dot is in /opt/local/bin/dot
>             My .emacs file has: (setq load-path (cons "/opt/local/bin"
>             load-path))
> 
> 
>         That won't add anything to your shell's path, it's just where Emacs
>         looks for code to load.
> 
> 
>             I can certainly just open a terminal window and run dot from
>             the command line.
> 
> 
>         Can you grep your shell startup files and find out which one adds
>         /opt/local/bin to the path?
> 
> 
> 

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

* Re: Need help on org-exp-blocks and dot
  2011-01-20 21:41           ` Erik Iverson
@ 2011-01-20 21:51             ` Eric Schulte
  2011-01-20 21:57               ` Bryan Emrys
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2011-01-20 21:51 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode

back when I had to use a mac, I would just symlink paths into standard
locations, e.g.

  ln -s /opt/local/bin/dot /usr/bin/dot

Maybe not the most elegant solution, but it works reliably

To do this the *right* way you can update the PATH environment variable
*within* Emacs by doing something like the following

(setenv "PATH" (concat "/opt/local/bin/:" (getenv "PATH")))

Cheers -- Eric

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

* Re: Need help on org-exp-blocks and dot
  2011-01-20 21:51             ` Eric Schulte
@ 2011-01-20 21:57               ` Bryan Emrys
  0 siblings, 0 replies; 9+ messages in thread
From: Bryan Emrys @ 2011-01-20 21:57 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 679 bytes --]

Thank you Eric and Erik for the incredibly quick troubleshooting. I updated
.emacs with the setenv command suggested by Eric, restarted emacs and
everything now works as expected.

Bryan

On Thu, Jan 20, 2011 at 1:51 PM, Eric Schulte <schulte.eric@gmail.com>wrote:

> back when I had to use a mac, I would just symlink paths into standard
> locations, e.g.
>
>  ln -s /opt/local/bin/dot /usr/bin/dot
>
> Maybe not the most elegant solution, but it works reliably
>
> To do this the *right* way you can update the PATH environment variable
> *within* Emacs by doing something like the following
>
> (setenv "PATH" (concat "/opt/local/bin/:" (getenv "PATH")))
>
> Cheers -- Eric
>

[-- Attachment #1.2: Type: text/html, Size: 1024 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2011-01-20 21:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 18:59 Need help on org-exp-blocks and dot Bryan Emrys
2011-01-20 19:12 ` Eric Schulte
2011-01-20 21:21   ` Bryan Emrys
2011-01-20 21:28     ` Erik Iverson
2011-01-20 21:33       ` Bryan Emrys
2011-01-20 21:38         ` Bryan Emrys
2011-01-20 21:41           ` Erik Iverson
2011-01-20 21:51             ` Eric Schulte
2011-01-20 21:57               ` Bryan Emrys

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