Add shellrc to zshenv. Get rid of bad which alias. Make emacs_open

support waiting. Fix editor command.
This commit is contained in:
Ivan Malison 2014-11-19 16:48:16 -08:00
parent 2b6029548c
commit ab8f081be2
4 changed files with 9 additions and 7 deletions

@ -1 +1 @@
Subproject commit 37df87cf386d3645b2a88ee40d2451d1063423ba
Subproject commit bdd1bd0e3bc2f989e268147e0569540028d2ba34

View File

@ -32,3 +32,7 @@ add_to_back_of_path "/usr/local/sbin"
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
function shellrc {
zsh -c "source ~/.zshrc && ""$@"
}

View File

@ -7,7 +7,6 @@ alias prj='cd ~/Projects'
alias t27='tox -e py27 -- '
alias tvenv='tox -e venv -- '
alias reload_tmux='tmux source-file ~/.tmux.conf'
alias which='type'
alias ssh='ssh -A '
# enables the sudoing of aliases.

View File

@ -1,4 +1,4 @@
alias e='emacs_open'
alias e='emacs_open -n '
alias emacs='_emacs -c -n '
is_osx && alias emacs='cocoa_emacs'
alias terminal_emacs='_emacs -t'
@ -40,7 +40,7 @@ function _current_dot_directory {
function existing_emacs {
# Return any existing emacs server file or the one that should
# be created if it doesn't exist.
local server_file="$(\ls ~/.emacs.d/server | head -n1)"
local server_file="$(emacs_get_running_instances | head -n1)"
[ -z "$server_file" ] && server_file="$(_emacs_server_file)"
echo $server_file
}
@ -64,11 +64,10 @@ function emacs_open {
fi
local server_file="$(emacs_get_running_instances | head -n1)"
emacs_make_frame_if_none_exists $server_file
[ ! -z "$@" ] && emacsclient "$@" -n --server-file="$server_file"
[ ! -z "$@" ] && emacsclient "$@" --server-file="$server_file"
focus_emacs
}
# Make emacs the default editor.
export EDITOR="$(which emacsclient) -n -s "
export ALTERNATE_EDITOR=""
export EDITOR="zsh -c 'source ~/.zshrc && emacs_open '"'"$@"'
export VISUAL="$EDITOR"