           (set-buffer (find-file-noselect assembled-file))
           (setq cell (buffer-substring-no-properties (point-min) (point-max))))
       (setq cell (buffer-substring-no-properties start end)))
-    (ynb-send-block cell tex)))
+    cell))
+  
+(defun ynb-send-cell (&optional tex)
+  "Send input to process. Point must be in a cell."
+  (interactive)
+  (ynb-send-block (ynb-get-cell-contents) tex))
 
 (defun ynb-single-command-get-output (string tex)
   "Send a command to the Yacas process."


;;; @@ Yacas-Notebook functions for "yacas" cells

(defun ynb-send-cell (&optional tex)
  "Send input to process. Point must be in a cell."
  (interactive)
  (if (not (ynb-cell-p))
      (error "Not in Yacas cell"))
  (let ((home-buffer (current-buffer))

                (forward-line 1)
                (if (and ask (not (y-or-n-p "Update this cell? ")))
                    t
                  (if tex
                      (ynb-tex-update-cell)
                    (ynb-update-cell))))
            (widen) ; If user aborts evaluation at prompt
            ) ; unwind-protect
          ) ; if in a valid cell
