Function: gnuplot-plot-from-comint

gnuplot-plot-from-comint is an interactive and natively compiled function defined in gnuplot.el.

Signature

(gnuplot-plot-from-comint)

Documentation

Send the contents of a script to gnuplot from the process buffer.

This inserts the contents of the most recently used gnuplot script into the process buffer and sends those lines to gnuplot. It does this by copying the script line by line.

Key Bindings

gnuplot-comint-mode-map C-M-p

Source Code

;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
(defun gnuplot-plot-from-comint ()
  "Send the contents of a script to gnuplot from the process buffer.
This inserts the contents of the most recently used gnuplot script
into the process buffer and sends those lines to gnuplot.  It does
this by copying the script line by line."
  (interactive nil gnuplot-comint-mode)
  (unless (buffer-live-p gnuplot--comint-recent-buffer)
    (error "Script buffer has been deleted"))
  (let (string list (buffer (current-buffer)))
    (set-buffer gnuplot--comint-recent-buffer)
    (setq string (buffer-substring-no-properties (point-min) (point-max))
          string (concat string "\n")
          list   (gnuplot--split-string string))
    (set-buffer buffer)
    (while list
      (insert (car list))
      (comint-send-input)
      (sleep-for gnuplot-delay)
      (setq list (cdr list)))
    (comint-send-input)))