bump .emacs.d made ec alias for operning files in existing emacs frame.
This commit is contained in:
parent
9b5bcafd7c
commit
d3aaeb420f
@ -1 +1 @@
|
||||
Subproject commit 28d5418644923134432ec8cbf943c12aeae341e7
|
||||
Subproject commit c46c2aa8f5606ee6941ab4842b1ab56492666cfd
|
@ -1,14 +1,15 @@
|
||||
alias emacs='cemacs'
|
||||
alias cemacs='_emacs -c -n'
|
||||
alias temacs='_emacs -t'
|
||||
alias ec='_emacs -n '
|
||||
|
||||
function _emacs {
|
||||
local directory="$(git rev-parse --show-toplevel 2> /dev/null || pwd)"
|
||||
local server_name="$(_dot_directory $directory)"
|
||||
test -z "$(ps aux | grep -v grep | grep -i "emacs -nw --daemon=.*$server_name$")" && echo "Starting emacs with server name \'$server_name'" && \emacs --daemon="$server_name"
|
||||
test -z "$(ps aux | grep -v grep | grep -i "emacs -nw --daemon=.*$server_name$")" && echo "Starting emacs with server name '$server_name'" && \emacs --daemon="$server_name"
|
||||
emacsclient $* --server-file="$server_name"
|
||||
}
|
||||
|
||||
function _dot_directory {
|
||||
echo $1 | sed "s:/:.:g"
|
||||
echo $1 | sed "s:/:.:g"
|
||||
}
|
||||
|
@ -290,10 +290,6 @@ function reload_root_agent {
|
||||
as_user 'root' "/bin/launchctl load '$1'"
|
||||
}
|
||||
|
||||
function ec {
|
||||
emacsclient -n $1 > /dev/null
|
||||
}
|
||||
|
||||
function enable_access_for_assistive_devices {
|
||||
local bundle_identifier=$(/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' "$1/Contents/Info.plist")
|
||||
local where_clause="where service='kTCCServiceAccessibility' and client='$bundle_identifier'"
|
||||
|
Loading…
Reference in New Issue
Block a user