Skip to content

Instantly share code, notes, and snippets.

@avdi
Created April 23, 2010 14:04
Show Gist options
  • Save avdi/376568 to your computer and use it in GitHub Desktop.
Save avdi/376568 to your computer and use it in GitHub Desktop.
export EDITOR="/home/avdi/share/bin/emacs-newwindow"
#!/usr/bin/env bash
# Useful options:
# -c: Create a new window
# -a: alternate editor. Empty string tells it to start emacs in daemon mode.
# -n: No-wait; exit emacsclient immediately after sending file to emacs
exec /usr/bin/emacsclient.emacs-snapshot -c -a "" $*
;;;;; Start either gnuserv or emacsserver for external access
(if (and (or
(eq 'windows-nt system-type)
(featurep 'xemacs))
(locate-library "gnuserv")
(locate-file "gnuserv" exec-path '(".exe" "")))
(progn (require 'gnuserv)
(gnuserv-start))
(when (not (eq 'windows-nt system-type)) (server-start)))
;; Start up edit-server for Google Chrome Emacs integration
(if (and (daemonp) (locate-library "edit-server"))
(progn
(require 'edit-server)
(edit-server-start)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment