From b2a41f953efda8e90dcf5fc0da1910b9df5cdb9e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 30 Jul 2014 22:59:53 -0400 Subject: clean up emacs config --- .config/bash/rc.d/emacs.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.config/bash/rc.d') diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 165d71e..12fa9ad 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -10,7 +10,7 @@ if [[ $TERM == eterm* ]]; then # _emacs_run LISP _emacs_run() { - emacsclient -e "$*" 2>/dev/null + emacsclient -a false -e "$*" 2>/dev/null } # _emacs_quote UNQUOTED_STRING _emacs_quote() { @@ -94,5 +94,7 @@ if [[ $TERM == eterm* ]]; then _emacs_set_remote_dir _emacs_set_shell_DISPLAY } - PROMPT_COMMAND=_emacs_PROMPT_COMMAND + if _emacs_run '()' >/dev/null; then + PROMPT_COMMAND=_emacs_PROMPT_COMMAND + fi fi -- cgit v1.2.3-2-g168b From 6e8f41fe3b5902194641eee0dacd3816f0765ec8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:34:07 -0500 Subject: bash emacs integration: if DISPLAY=nil, unset it --- .config/bash/rc.d/emacs.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.config/bash/rc.d') diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 12fa9ad..c254ec7 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -85,6 +85,7 @@ if [[ $TERM == eterm* ]]; then # Set the shell's X11 display (emacs -> shell) _emacs_set_shell_DISPLAY() { export DISPLAY=$(_emacs_unquote "$(_emacs_run "(cdr (assoc 'display (frame-parameters)))")") + [[ $DISPLAY != nil ]] || unset DISPLAY } ## Do those things ##################################################### -- cgit v1.2.3-2-g168b From dd8c27a1c6562aeb8487b94f985d89408f5a3902 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:48:29 -0500 Subject: Bash: disable the pager when running in emacs --- .config/bash/rc.d/emacs.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.config/bash/rc.d') diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 12fa9ad..4a7b9b8 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -5,6 +5,7 @@ if [[ $TERM == eterm* ]]; then EDITOR=$SELECTED_EDITOR VISUAL=$SELECTED_EDITOR export SELECTED_EDITOR EDITOR VISUAL + export PAGER=cat ## Primatives for interacting with Emacs ############################### -- cgit v1.2.3-2-g168b