Difference between revisions of "Compile with Emacs"
From Apache OpenOffice Wiki
(3 intermediate revisions by one other user not shown) | |||
Line 12: | Line 12: | ||
in ~/bin. Just run oobuild with compile-command as you would 'make -k' normally. | in ~/bin. Just run oobuild with compile-command as you would 'make -k' normally. | ||
+ | |||
+ | If you, like some of us, are not blessed with an US-ASCII keyboard, you might want to remap <code>C-x `</code> <code>(next-error)</code> to something else: | ||
+ | |||
+ | <pre> | ||
+ | ;; Make the sequence "C-x #" execute the `next-error' command, which | ||
+ | ;; makes that a tad more accessible from a german keyboard (original | ||
+ | ;; sequence is "C-x `"). | ||
+ | (global-set-key "\C-x#" 'next-error) | ||
+ | ;; or even one of the Fn keys, if you're so inclined | ||
+ | ;(global-set-key 'f5 'next-error) | ||
+ | |||
+ | ;; And while we're at it, why not make F12 be "compile"? | ||
+ | (global-set-key 'f12 'compile) | ||
+ | </pre> | ||
+ | |||
+ | Now, edit, press F12 to compile, watch it break, and jump through all error places with <code>C-x #</code>. | ||
+ | |||
+ | I didn't have this shell script, so I wrote (well, pieced together from various sources) a Lisp version of it previously. It's intermingled with other OOo emacs settings here: http://cvs.gnome.org/viewcvs/ooo-build/emacs.el?view=markup I should transfer the juicy bits to this page... | ||
[[Category:Developer_Tools]] | [[Category:Developer_Tools]] |
Latest revision as of 12:25, 14 December 2006
If you want to compile from within (X)Emacs, it's useful to have this script (that sources the env before running dmake) installed:
#!/bin/bash path=`pwd` env="LinuxIntelEnv.Set.sh" while ! test -f "$path/$env"; do path=`dirname $path` done . $path/$env perl $SOLARENV/bin/build.pl -i debug=true
in ~/bin. Just run oobuild with compile-command as you would 'make -k' normally.
If you, like some of us, are not blessed with an US-ASCII keyboard, you might want to remap C-x `
(next-error)
to something else:
;; Make the sequence "C-x #" execute the `next-error' command, which ;; makes that a tad more accessible from a german keyboard (original ;; sequence is "C-x `"). (global-set-key "\C-x#" 'next-error) ;; or even one of the Fn keys, if you're so inclined ;(global-set-key 'f5 'next-error) ;; And while we're at it, why not make F12 be "compile"? (global-set-key 'f12 'compile)
Now, edit, press F12 to compile, watch it break, and jump through all error places with C-x #
.
I didn't have this shell script, so I wrote (well, pieced together from various sources) a Lisp version of it previously. It's intermingled with other OOo emacs settings here: http://cvs.gnome.org/viewcvs/ooo-build/emacs.el?view=markup I should transfer the juicy bits to this page...