Commit 6ff0e2db00261b8fb66820297a0b3cb7b4b72b44

Now runs processing from within the sketch directory. Unfortunately this introduces a minor bug
README
(12 / 0)
  
11Processing mode for Emacs.
22Written by Rudolf Olah.
33
4== About & Usage ==
5
46This mode is a derivative of the java-mode. It adds key-bindings for
57running/compiling Processing sketches and it also highlights keywords
68found in the Processing language, such as ``setup'', ``draw'', and
1818install the YASnippet package found here:
1919
2020 http://code.google.com/p/yasnippet/
21
22== Bugs ==
23
24* Compilation...there is a bug in the compilation because the
25 Commander class of Processing does not accept the ``--preferences''
26 option. The workaround is to copy your ``preferences.txt'' from your
27 home directory (in Linux it can be found in ``~/.processing/'') to
28 the sketch directory. You will have to create a sub-directory called
29 ``lib'' in the sketch directory which is where the
30 ``preferences.txt'' file will reside. Sym-linking also works.
  
5757must be set to one of \"windows\", \"macosx\", or \"linux\". If
5858no platform is selected, the default platform that Emacs is
5959running on will be selected."
60 (cd (expand-file-name processing-location))
61 (compile (concat "./java/bin/java -classpath \""
62 (apply 'make-java-classpath
63 '("./java/lib/rt.jar"
64 "./java/lib/tools.jar"
65 "./lib/antlr.jar" "./lib/core.jar"
66 "./lib/ecj.jar" "./lib/jna.jar"
67 "./lib/pde.jar"))
68 "\" processing.app.Commander"
69 " --sketch=\"" (expand-file-name sketch-dir)
70 "\" --output=\"" (expand-file-name output-dir)
71 "\" --" cmd
72 (if (string= cmd "export-application")
73 (concat " --platform="
74 (if platform platform (processing-platform)))))))
60 ;;(cd (expand-file-name processing-location))
61 (compile (concat processing-location "java/bin/java -classpath \""
62 (apply 'make-java-classpath
63 (mapcar (lambda (x) (expand-file-name (concat processing-location x)))
64 '("java/lib/rt.jar"
65 "java/lib/tools.jar"
66 "lib/antlr.jar" "lib/core.jar"
67 "lib/ecj.jar" "lib/jna.jar"
68 "lib/pde.jar")))
69 "\" processing.app.Commander"
70 " --sketch=\"" (expand-file-name sketch-dir)
71 "\" --output=\"" (expand-file-name output-dir)
72 ;; Remove this comment when Processing implements the --preferences=??? command-line option.
73 ;;"\" --preferences=\"" (expand-file-name "~/.processing/preferences.txt")
74 "\" --" cmd
75 (if (string= cmd "export-application")
76 (concat " --platform="
77 (if platform platform (processing-platform)))))))
7578
7679(defun processing-sketch-compile (&optional cmd)
7780 "Runs the Processing Commander application with the current
103103(define-key processing-mode-map "\C-c\C-r" 'processing-sketch-compile)
104104(define-key processing-mode-map "\C-c\C-p" 'processing-sketch-present)
105105(define-key processing-mode-map "\C-c\C-b" 'processing-sketch-build)
106
107;; Regular expressions
108;; For compilation
109;;(pushnew compilation-error-regexp-alist
110;; '(processing "^\\(?:[[:alpha:]]\\)"))
106111
107112;; Font-lock, keywords
108113(defconst processing-font-lock-keywords-1