Function: gnuplot-mode

gnuplot-mode is an interactive and natively compiled function defined in gnuplot.el.

Signature

(gnuplot-mode)

Documentation

Major mode for editing and executing GNUPLOT scripts.

This was written with version 4.6 of gnuplot in mind, but should work with newer and older versions.

Report bugs at https://github.com/emacs-gnuplot/gnuplot/issues

                            ------O------

Gnuplot-mode includes two different systems for keyword completion and documentation lookup: a newer one, gnuplot-context-sensitive-mode(var)/gnuplot-context-sensitive-mode(fun) , which is enabled by default, and a older one which extracts keywords from gnuplot's Info file. Both systems allow looking up documentation in the Info file. With the context-sensitive mode active, gnuplot-mode can also provide Eldoc syntax hints as you type.

                            ------O------

There are several known shortcomings of gnuplot-mode, version 0.5g and up. Many of the shortcomings involve the graphical interface
(refered to as the GUI) to setting arguments to plot options. Here is
a list:

 1. Currently there is no way for gnuplot-mode to know if information
     sent to gnuplot was correctly plotted.
 2. "plot", "splot", and "fit" are handled in the GUI, but are
     a bit flaky. Their arguments may not be read correctly from
     existing text, and continuation lines (common for plot and splot)
     are not supported.
 3. The GUI does not know how to read from continuation lines.
 4. Comma separated position arguments to plot options are
     unsupported in the GUI. Colon separated datafile modifiers (used
     for plot, splot, and fit) are not supported either. Arguments
     not yet supported by the GUI generate messages printed in grey
     text.
 5. The GUI handling of "hidden3d" is flaky and "cntrparam" is
     unsupported.

In addition to any hooks its parent mode prog-mode might have run, this mode runs the hook gnuplot-mode-hook, as the final or penultimate step during initialization.

C-M-i completion-at-point
C-M-q prog-indent-sexp
C-M-x gnuplot-send-line-to-gnuplot
C-c C-b gnuplot-send-buffer-to-gnuplot
C-c C-d gnuplot-info-lookup-symbol
C-c C-e gnuplot-show-comint-buffer
C-c C-f gnuplot-send-file-to-gnuplot
C-c C-j gnuplot-forward-script-line
C-c C-k gnuplot-kill-comint-buffer
C-c C-l gnuplot-send-line-to-gnuplot
C-c C-n gnuplot-negate-option
C-c C-o gnuplot-gui-set-options-and-insert
C-c C-r gnuplot-send-region-to-gnuplot
C-c C-v gnuplot-send-line-and-forward
C-c C-z gnuplot-customize
C-c TAB gnuplot-insert-filename
M-q prog-fill-reindent-defun
S-<mouse-2> gnuplot-gui-set-options-and-insert
} gnuplot-electric-insert

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
;;; --- autoloaded functions: gnuplot-mode and gnuplot-make-buffer

;;;###autoload
(define-derived-mode gnuplot-mode prog-mode "Gnuplot"
  "Major mode for editing and executing GNUPLOT scripts.
This was written with version 4.6 of gnuplot in mind, but should
work with newer and older versions.

Report bugs at https://github.com/emacs-gnuplot/gnuplot/issues

                            ------O------

Gnuplot-mode includes two different systems for keyword completion and
documentation lookup: a newer one, `gnuplot-context-sensitive-mode' ,
which is enabled by default, and a older one which extracts keywords
from gnuplot's Info file.  Both systems allow looking up documentation
in the Info file.  With the context-sensitive mode active,
`gnuplot-mode' can also provide Eldoc syntax hints as you type.

                            ------O------

There are several known shortcomings of `gnuplot-mode', version 0.5g
and up.  Many of the shortcomings involve the graphical interface
\(refered to as the GUI) to setting arguments to plot options.  Here is
a list:

 1.  Currently there is no way for `gnuplot-mode' to know if information
     sent to gnuplot was correctly plotted.
 2.  \"plot\", \"splot\", and \"fit\" are handled in the GUI, but are
     a bit flaky.  Their arguments may not be read correctly from
     existing text, and continuation lines (common for plot and splot)
     are not supported.
 3.  The GUI does not know how to read from continuation lines.
 4.  Comma separated position arguments to plot options are
     unsupported in the GUI.  Colon separated datafile modifiers (used
     for plot, splot, and fit) are not supported either.  Arguments
     not yet supported by the GUI generate messages printed in grey
     text.
 5.  The GUI handling of \"hidden3d\" is flaky and \"cntrparam\" is
     unsupported."
  (setq-local comment-start "# "
              comment-end ""
              comment-column 32
              comment-start-skip "#[ \t]*"
              indent-line-function #'gnuplot-indent-line
              beginning-of-defun-function #'gnuplot--beginning-of-defun
              end-of-defun-function #'gnuplot--end-of-continuation
              syntax-propertize-function #'gnuplot--syntax-propertize
              font-lock-defaults gnuplot-font-lock-defaults
              font-lock-multiline t
              parse-sexp-lookup-properties t
              comint-process-echoes gnuplot-echo-command-line-flag)
  (add-hook 'completion-at-point-functions #'gnuplot-completion-at-point-info-look nil t)
  (add-hook 'syntax-propertize-extend-region-functions
            #'gnuplot--syntax-propertize-extend-region nil t)
  (setq gnuplot--comint-recent-buffer (current-buffer))
  (gnuplot--setup-insertions-menu))