<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’ve been using an embedded lisp program for some time to produce Dot charts using org.  The code has saved me hours of fiddle time and is much easier to use than writing dot code due to the tabular format of the input data.  But with the arrival of org 9.0, the code no longer works.  I’ve read what I could find, but haven’t been able to get this into the right format for org 9.  Can someone please help?  I’ve got some experience with coding (not elisp), but don’t find the manual to be very helpful in this instance.  I believe the problem is the way the code is being called, not the lisp source code itself.  But can’t be sure.<div class=""><br class=""></div><div class="">Cutting and pasting the text below into an org document under version 8 works well.  In org 9 I get a backtrace complaining about (void-variable params), which I can provide if it would help with the troubles-shooting.</div><div class=""><br class=""></div><div class="">Thanks in advance for your time.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Here’s the text to make the org doc - cut and paste everything below into an org doc and then put cursor on the #+call line and hit C-c twice.:</div><div class=""><br class=""></div><div class=""><div class="">This code uses Dot's dot program to generate this chart.</div><div class="">Mark up the tables below to describe the nodes and connections you</div><div class="">want for this flowchart.  Do a query replace for "flowchart.png" with</div><div class="">the name of the file you want to create. Do a query replace for the text "NAMI Dues Flowchart" using the new title. Then hit C-c C-c to create the new flowchart.  You can see it by clicking on the link created immediately below the call line. Change the horiz value from 'nil to 't to switch from vertical to horizontal orientation of the flow chart.</div><div class=""><br class=""></div><div class="">#+name: nodetable</div><div class="">| node  | label                      | shape     | fillcolor  |</div><div class="">|-------+----------------------------+-----------+------------|</div><div class="">| start | Start                      | oval      | yellow     |</div><div class="">| which | Which Membership?          | diamond   | aliceblue  |</div><div class="">| open  | Open Door Membership - $35 | box       | aquamarine |</div><div class="">| stnd  | Standard Membership - $3   | box       | crimson    |</div><div class="">| nno   | Nami National Dues - $1    | ellipsoid | grey       |</div><div class="">| sno   | NAMI State Dues - $1       | ellipsoid | grey       |</div><div class="">| nmo   | NAMI Midland - $1          | ellipsoid | grey       |</div><div class="">| nns   | NAMI National Dues - $10   | ellipsoid | grey       |</div><div class="">| sns   | NAMI State Dues - $12.50   | ellipsoid | grey       |</div><div class="">| nms   | NAMI Midland Dues - $12.50 | ellipsoid | grey       |</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">#+name: connectortable</div><div class="">| from  | to    | label | color | linestyle |</div><div class="">|-------+-------+-------+-------+-----------|</div><div class="">| start | which |       | grey  |           |</div><div class="">| which | open  |       |       | dashed    |</div><div class="">| open  | nno   |       |       | dashed    |</div><div class="">| open  | sno   |       |       | dashed    |</div><div class="">| open  | nmo   |       |       | dashed    |</div><div class="">| stnd  | nns   |       |       |           |</div><div class="">| stnd  | sns   |       |       |           |</div><div class="">| stnd  | nms   |       |       |           |</div><div class=""><br class=""></div><div class="">#+call: hutchdotdigraph[:file ~/documents/emacsdocs/NAMIDuesflowchart.png](nodes=nodetable[1:-1],graph=connectortable[1:-1],horiz='nil) :results file</div><div class=""><br class=""></div><div class="">#+RESULTS:</div><div class="">[[file:~/documents/emacsdocs/NAMIDuesflowchart.png]]</div><div class=""><br class=""></div><div class="">#+name: hutchdotdigraph</div><div class="">#+HEADER: :var nodes=nodetable[2:-1] graph=connectortable[2:-1] horiz='nil</div><div class="">#+BEGIN_SRC emacs-lisp :file ~/documents/emacsdocs/hutchdotout.png :colnames yes :exports results :cmd dot</div><div class="">;(defun hutchdot ()</div><div class="">;  " Run code to produce dot grphs from tables following the graph-from-tables code tutorial"</div><div class="">(org-babel-execute:dot</div><div class="">(concat</div><div class="">"graph {\n"</div><div class="">;"//rankdir=LR;\n"</div><div class="">"label=\"NAMI Dues Flowchart\";\n"</div><div class="">"labelloc=t;\n"</div><div class="">(when horiz "rankdir=LR;\n")</div><div class="">(mapconcat</div><div class="">(lambda (x)</div><div class="">(format "%s [label=\"%s\" shape = %s style=\"filled\" fillcolor=\"%s\"]"</div><div class=""><br class=""></div><div class="">(car x)</div><div class="">(nth 1 x)</div><div class="">(if (string="" (nth 2 x)) "box" (nth 2 x))</div><div class="">(if (string="" (nth 3 x)) "none" (nth 3 x))</div><div class="">)) nodes "\n")</div><div class="">"\n"</div><div class="">(mapconcat</div><div class="">(lambda (x)</div><div class="">(format "%s -- %s [label=\"%s\" color=\"%s\" style=\"%s\"]"</div><div class="">(car x) (nth 1 x) (nth 2 x) (nth 3 x) (nth 4 x))) graph "\n")</div><div class="">"}\n") params)</div><div class=""><br class=""></div><div class="">#+END_SRC</div></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><span class="Apple-style-span" style="border-collapse: separate; font-family: Georgia; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-spacing: 0px;"><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; widows: 2; border-spacing: 0px;"><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><span class="Apple-style-span" style="border-collapse: separate; font-size: 14px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-spacing: 0px;"><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class="" style="margin: 0px; font-size: 18px; line-height: normal; font-family: 'Snell Roundhand';"><b class="">      John Hutcheson</b></div></div></div></span></div></span></div></span></div></div></body></html>