Function: gnuplot-send-region-to-gnuplot
gnuplot-send-region-to-gnuplot is an interactive and natively compiled
function defined in gnuplot.el.
Signature
(gnuplot-send-region-to-gnuplot &optional BEGIN END TEXT)
Documentation
Sends a selected region to the gnuplot program.
If BEGIN and END are not specified, point and mark are used. TEXT
indicates the type of text being sent to gnuplot. This will be
region unless explicitly set by a function calling this one. Other
typical values are of nil, line, buffer, or file. TEXT may be
useful for function in gnuplot-after-plot-hook.
Key Bindings
gnuplot-mode-map C-c C-r
Source Code
;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
(defun gnuplot-send-region-to-gnuplot (&optional begin end text)
"Sends a selected region to the gnuplot program.
If BEGIN and END are not specified, point and mark are used. TEXT
indicates the type of text being sent to gnuplot. This will be
`region' unless explicitly set by a function calling this one. Other
typical values are of nil, `line', `buffer', or `file'. TEXT may be
useful for function in `gnuplot-after-plot-hook'."
(interactive "r" gnuplot-mode)
(let (string (txt (or text 'region)))
(setq string (buffer-substring-no-properties begin end))
(unless (equal (substring string -1) "\n")
(setq string (concat string "\n")))
(gnuplot-send-string-to-gnuplot string txt)))