Fri Dec 5 18:18:08 EST 2014

Emacs side

To get faster updates, probably every edit action in an emacs buffer
should synchronously trigger sending out parametesr.  Why not parse
the s-expression in emacs directly?  Not really that hard..

(thing-at-point 'sentence) returns a function


;; RAI
(defun my-send-nums ()
  (let* ((cmds '())
         (str (thing-at-point 'sentence))
         (expr (read str)))
    (labels ((gather (it)
                ((listp it)
                 (mapc #'gather it))
                ((numberp it) 
                 (let ((cmd (format "p%d %f;\n" (length cmds) it)))
                   (push cmd cmds))))))
      (gather expr)
      (message (apply #'concat (reverse cmds))))))