Processing 2 major-mode for Emacs
Emacs Lisp Makefile
Switch branches/tags
Nothing to show
Latest commit a57415e Dec 12, 2015 @ptrv Merge pull request #14 from ptrv/revert-13-revert-12-patch-1
Revert "Revert "Delete Flycheck syntax checker""
Failed to load latest commit information.
snippets/processing-mode Fix typo in @public snippet Apr 26, 2014
.gitignore Ignore elc files. Nov 21, 2012
Makefile Use table for key bindings explanation Oct 15, 2015
processing-company.el Use also company-dabbrev-code for completion Feb 18, 2015
processing-mode.el Add function to copy buffer or region to clipboard htmlized Feb 17, 2015
processing-snippets-pkg.el Add makefile and pkg file Jul 18, 2013
processing-snippets.el Add project url to header Jul 18, 2013

Emacs major-mode for Processing 2.0


Based on Rudolf Olah's version and modification by Bunny Blake.

The snippets are taken from Sublime Text 2's Processing plugin and converted to yasnippet snippets.


The easiest way is to install the ELPA package from MELPA with M-x package-install RET processing-mode. All dependencies are automatically installed.

Manual installation

To install processing-mode manually, clone the repository:

git clone

In your .emacs file, add this:

(add-to-list 'load-path "/path/to/processing2-emacs/")
(autoload 'processing-mode "processing-mode" "Processing mode" t)
(add-to-list 'auto-mode-alist '("\\.pde$" . processing-mode))

Add the following to set up processing snippets for yasnippet:

(autoload 'processing-snippets-initialize "processing-snippets" nil nil nil)
(eval-after-load 'yasnippet '(processing-snippets-initialize))


Set variables in .emacs or with customize-group RET processing RET (this works only after processing-mode has been loaded):

(setq processing-location "/path/to/processing-java")
(setq processing-application-dir "/path/to/processing-application-dir")
(setq processing-sketchbook-dir "/path/to/processing-sketchbook-dir")

For example, on Mac the default settings are the following:

(setq processing-location "/usr/bin/processing-java")
(setq processing-application-dir "/Applications/")
(setq processing-sketchbook-dir "~/Documents/Processing")

Usually when you run a processing sketch, the build files are generated in a sub-directory called output in the current sketch directory. It is also possible to set the processing-output-dir to another directory:

(setq processing-output-dir "/tmp")

Optionally it is also possible to set up basic Auto-Complete support to have keyword completion.

(defun processing-mode-init ()
  (make-local-variable 'ac-sources)
  (setq ac-sources '(ac-source-dictionary ac-source-yasnippet))
  (make-local-variable 'ac-user-dictionary)
  (setq ac-user-dictionary (append processing-functions

(add-to-list 'ac-modes 'processing-mode)
(add-hook 'processing-mode-hook 'processing-mode-init)


The key-bindings are:

Key bindings Description
C-c C-p r Run a sketch.
C-c C-p b Compile a sketch into .class files.
C-c C-p p Run a sketch full screen.
C-c C-p e Export sketch.
C-c C-p d Find in reference.
C-c C-p f Find or create sketch.
C-c C-p s Search in Processing forum.