diff --git a/config/emacs/aliases.zsh b/config/emacs/aliases.zsh index 8c4f00a9..13931848 100644 --- a/config/emacs/aliases.zsh +++ b/config/emacs/aliases.zsh @@ -1,4 +1,6 @@ #!/usr/bin/env zsh -alias e='emacsclient -n' -ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; } +e() { pgrep emacs && emacsclient -n "$@" || emacs -nw "$@" } +ediff() { emacs -nw --eval "(ediff-files \"$1\" \"$2\")"; } +eman() { emacs -nw --eval "(switch-to-buffer (man \"$1\"))"; } +ekill() { emacsclient --eval '(kill-emacs)'; }