Skip to content

Instantly share code, notes, and snippets.

@re5et
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save re5et/4f4a53cad0070fc28392 to your computer and use it in GitHub Desktop.
Save re5et/4f4a53cad0070fc28392 to your computer and use it in GitHub Desktop.
EDITOR=edit
#! /bin/bash
emacsclient -e "(external-edit \"$1\")" > /dev/null
export EDITOR=edit
(defun external-edit (file-name)
(let ((frame (selected-frame)))
(with-selected-window
(first (window-list frame))
(find-file file-name)
(raise-frame frame))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment