All Projects → mkmcc → gnuplot-mode

mkmcc / gnuplot-mode

Licence: GPL-3.0 license
An emacs major mode for editing gnuplot scripts.

Programming Languages

emacs lisp
2029 projects
Gnuplot
187 projects

Projects that are alternatives of or similar to gnuplot-mode

Emacs Solaire Mode
If only certain buffers could be so grossly incandescent.
Stars: ✭ 129 (+344.83%)
Mutual labels:  emacs-packages
Evil Snipe
2-char searching ala vim-sneak & vim-seek, for evil-mode
Stars: ✭ 196 (+575.86%)
Mutual labels:  emacs-packages
emacs-jest
A package to run jest inside emacs
Stars: ✭ 74 (+155.17%)
Mutual labels:  emacs-packages
Elpa
Emacs China ELPA 镜像
Stars: ✭ 137 (+372.41%)
Mutual labels:  emacs-packages
Emacs Vdiff
Like vimdiff for Emacs
Stars: ✭ 165 (+468.97%)
Mutual labels:  emacs-packages
Uncledavesemacs
My personal ~/.emacs.d
Stars: ✭ 204 (+603.45%)
Mutual labels:  emacs-packages
Emacs Which Key
Emacs package that displays available keybindings in popup
Stars: ✭ 1,136 (+3817.24%)
Mutual labels:  emacs-packages
cask-package-toolset.el
🛠 Toolsettize your emacs package! 🛠
Stars: ✭ 30 (+3.45%)
Mutual labels:  emacs-packages
Super Save
Save Emacs buffers when they lose focus
Stars: ✭ 184 (+534.48%)
Mutual labels:  emacs-packages
dired-rsync
Support for rsync from Emacs dired buffers
Stars: ✭ 93 (+220.69%)
Mutual labels:  emacs-packages
Mode Icons
Show icons instead of mode names
Stars: ✭ 140 (+382.76%)
Mutual labels:  emacs-packages
Org Msg
OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
Stars: ✭ 153 (+427.59%)
Mutual labels:  emacs-packages
Academic Phrases
Bypass that mental block when writing your papers.
Stars: ✭ 244 (+741.38%)
Mutual labels:  emacs-packages
Emacs Gdscript Mode
An Emacs package to get GDScript support and syntax highlighting.
Stars: ✭ 132 (+355.17%)
Mutual labels:  emacs-packages
emacs2nix
Automatically generate Nix expressions for Emacs packages
Stars: ✭ 23 (-20.69%)
Mutual labels:  emacs-packages
Org Pandoc Import
Save yourself from non-org formats, thanks to pandoc
Stars: ✭ 111 (+282.76%)
Mutual labels:  emacs-packages
Evil Multiedit
Multiple cursors for evil-mode, based on iedit
Stars: ✭ 200 (+589.66%)
Mutual labels:  emacs-packages
dired-toggle
Show dired as sidebar and will not create new buffers when changing directory
Stars: ✭ 23 (-20.69%)
Mutual labels:  emacs-packages
epkg
Browse the Emacsmirror package database
Stars: ✭ 45 (+55.17%)
Mutual labels:  emacs-packages
load-bash-alias
Convert bash aliases into eshell ones
Stars: ✭ 16 (-44.83%)
Mutual labels:  emacs-packages

#+TITLE gnuplot-mode

Introduction

Gnuplot is an extremely useful program – it’s fast, easy to use and great for getting a look at your data before starting a more sophisticated analysis. You can run gnuplot interactively at a command prompt, but I generally find it easier to write a plot script instead.

In order to edit these scripts a little more comfortably, I wrote this major mode for emacs. It offers syntax hilighting and basic indentation, as well as a command to plot the file. You can run the plot command either directly (by M-x gnuplot-run-buffer), or with the (customizable) shortcut C-c C-c.

Here is a screenshot showing the basic syntax hilighting. Note that it warns you about spaces at the ends of lines, which cause gnuplot to crash, but are otherwise hard to spot.

images/gnuplot-syntax-hilight.png

The mode runs gnuplot entirely in the background. If gnuplot reports an error, it creates a buffer called ”gnuplot errors” and brings it to the front to show you what happened.

images/gnuplot-errors.png

This uses the emacs compile system, so commands like next-error and previous-error will work as expected.

You can also send commands to gnuplot using C-c C-b (send buffer to gnuplot) or C-c C-r (send region to gnuplot), but the error reporting isn’t as helpful with these functions.

This mode was inspired by the one written by Bruce Ravel (available here), but I think it’s much simpler to use – it runs gnuplot non-interactively, and only has one command to remember.

Installation

If you like, you can download the file here. Once this file is somewhere visible to emacs, you can add the following to your .emacs to make it work.

;; make sure file is visible to emacs (if needed)
(add-to-list 'load-path "/path/to/your/lisp/files")

;; load the file
(require 'gnuplot-mode)

;; specify the gnuplot executable (if other than /usr/bin/gnuplot)
(setq gnuplot-program "/sw/bin/gnuplot")

;; automatically open files ending with .gp or .gnuplot in gnuplot mode
(setq auto-mode-alist 
(append '(("\\.\\(gp\\|gnuplot\\)$" . gnuplot-mode)) auto-mode-alist))

Better yet, use MELPA! If you add MELPA to your package archives using the following, you can install gnuplot mode with a simple M-x package-install gnuplot-mode.

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)

I hope you find this useful. Please let me know if you encounter any problems with the mode, or if you have any suggestions for improving it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].