oh-my-fish/plugins/emacs/functions/__launch_emacs.fish
Kelvin Smith c501d0f2c6 Add emacs plugin (even more updated)
Incorporate changes after code review of #408
2015-04-01 10:23:00 +05:30

10 lines
262 B
Fish

function __launch_emacs
set -l x (emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null)
if test -z "$x" -o "$x" = nil
emacsclient $argv --alternate-editor '' --create-frame
else
emacsclient $argv --alternate-editor ''
end
end