aboutsummaryrefslogtreecommitdiffstats
path: root/_zsh/emacs.zsh
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-04-30 15:13:55 +0800
committerAaron LI <aaronly.me@gmail.com>2016-04-30 15:13:55 +0800
commitc381c0c531a78ff4b1a1907c10da4ff54a112f0a (patch)
treeb194beb791c36b31fd1f3333d2f20f07462fe516 /_zsh/emacs.zsh
parent3d6f015f851398d0ce1e509cd6fd88e74c7626f6 (diff)
downloaddotfiles-c381c0c531a78ff4b1a1907c10da4ff54a112f0a.tar.bz2
_zsh: simplify initialization; order by perfix
Diffstat (limited to '_zsh/emacs.zsh')
-rw-r--r--_zsh/emacs.zsh39
1 files changed, 0 insertions, 39 deletions
diff --git a/_zsh/emacs.zsh b/_zsh/emacs.zsh
deleted file mode 100644
index b1ace40..0000000
--- a/_zsh/emacs.zsh
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# zsh/emacs.zsh
-#
-# Credits:
-# https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/emacs
-#
-# 2016-02-21
-#
-
-function _emacsclient() {
- # Get list of available X windows.
- X=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null`
-
- if [ -z "$X" ] || [ "$X" = "nil" ]; then
- # Create one if there is no X window yet.
- command emacsclient --alternate-editor "" --create-frame "$@"
- else
- # Prevent creating another X frame if there is at least one present.
- command emacsclient --alternate-editor "" "$@"
- fi
-}
-
-alias emacs='_emacsclient -t'
-alias e=emacs
-# Same as 'M-x eval' but outside of Emacs
-alias eeval='_emacsclient --eval'
-# Create a new X frame
-alias eframe='_emacsclient --create-frame --no-wait'
-# mu4e
-alias mu4e='eframe -e "(mu4e)" -F "((width . 100) (height . 40))"'
-
-# Write to stdout the path to the file opened in the current buffer
-function efile() {
- local cmd="(buffer-file-name (window-buffer))"
- _emacsclient --eval "$cmd" | tr -d '"'
-}
-
-
-# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #