forked from colonelpanic/dotfiles
Fix emacs_open for osx, will be broken in linux.
This commit is contained in:
parent
9f756c17d9
commit
ed708fc875
2
dotfiles/emacs.d/.gitignore
vendored
2
dotfiles/emacs.d/.gitignore
vendored
@ -23,3 +23,5 @@ skewer-cache
|
|||||||
jabber-avatar-cache
|
jabber-avatar-cache
|
||||||
this-machine.el
|
this-machine.el
|
||||||
recentf
|
recentf
|
||||||
|
persp-confs/
|
||||||
|
.tern-port
|
@ -57,7 +57,7 @@ function focus_emacs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function emacs_get_running_instances {
|
function emacs_get_running_instances {
|
||||||
pgrep emacs | xargs ps -o command -p | egrep -o " --daemon=(.*)" | awk -F= '{print $2}' | sed 's/\^J3,4\^J//'
|
pgrep -i emacs | xargs ps -o command -p | egrep -o " --daemon=(.*)" | awk -F= '{print $2}' | sed 's/\^J3,4\^J//'
|
||||||
}
|
}
|
||||||
|
|
||||||
function emacs_open {
|
function emacs_open {
|
||||||
@ -66,6 +66,7 @@ function emacs_open {
|
|||||||
fi
|
fi
|
||||||
local server_file="$(emacs_get_running_instances | head -n1)"
|
local server_file="$(emacs_get_running_instances | head -n1)"
|
||||||
emacs_make_frame_if_none_exists $server_file
|
emacs_make_frame_if_none_exists $server_file
|
||||||
|
echo "$server_file"
|
||||||
[ ! -z "$*" ] && emacsclient "$@" --server-file="$server_file"
|
[ ! -z "$*" ] && emacsclient "$@" --server-file="$server_file"
|
||||||
focus_emacs
|
focus_emacs
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,9 @@ def macvim(ctx):
|
|||||||
ctx.run("brew install {0}".format(macvim_install))
|
ctx.run("brew install {0}".format(macvim_install))
|
||||||
ctx.run("vim +BundleInstall! +q +q")
|
ctx.run("vim +BundleInstall! +q +q")
|
||||||
|
|
||||||
|
@ctask
|
||||||
|
def setup_dbus(ctx):
|
||||||
|
ctx.run("ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents")
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def osx_config(ctx):
|
def osx_config(ctx):
|
||||||
|
Loading…
Reference in New Issue
Block a user