Function: gnuplot-save-and-plot-from-comint

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

Signature

(gnuplot-save-and-plot-from-comint)

Documentation

Send a current script to gnuplot from the process buffer.

This sends the most recently used gnuplot script to gnuplot using the
"load" command. This function first saves the script buffer to a
file, prompting for a filename if one is not associated with the script buffer. Then it sends a load command to gnuplot using the name of the file visited by the script buffer.

Key Bindings

gnuplot-comint-mode-map C-M-f

Source Code

;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
(defun gnuplot-save-and-plot-from-comint ()
  "Send a current script to gnuplot from the process buffer.
This sends the most recently used gnuplot script to gnuplot using the
\"load\" command.  This function first saves the script buffer to a
file, prompting for a filename if one is not associated with the script
buffer.  Then it sends a load command to gnuplot using the name of the
file visited by the script buffer."
  (interactive nil gnuplot-comint-mode)
  (unless (buffer-live-p gnuplot--comint-recent-buffer)
    (error "Script buffer has been deleted"))
  (let (fname)
    (with-current-buffer gnuplot--comint-recent-buffer
      (save-buffer)
      (setq fname (buffer-file-name)))
    (goto-char (point-max))
    (insert (format "load '%s'" fname))
    (comint-send-input)))