From 90182069d2aa62062161305b111ec868c42059e9 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 13 Apr 2022 17:09:05 -0500 Subject: Emacs stuff --- bash/aliases.bash | 3 +++ bash/bashrc | 1 + bash/vterm-emacs.bash | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 bash/vterm-emacs.bash diff --git a/bash/aliases.bash b/bash/aliases.bash index f2d6776..03361fa 100644 --- a/bash/aliases.bash +++ b/bash/aliases.bash @@ -24,3 +24,6 @@ alias lake='make PREFIX=~/usr' # bash meta alias rebash='source ~/.bash_profile' + +# Debugging +alias emacs_goddamnit='pushd ~/.emacs.d;emacs --debug-init;popd' diff --git a/bash/bashrc b/bash/bashrc index 854fe7e..a1bfade 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -10,6 +10,7 @@ BASH_SOURCE_FIRST=( BASH_SOURCE_LAST=( blesh + vterm-emacs ) for f in "${BASH_SOURCE_FIRST[@]}"; do diff --git a/bash/vterm-emacs.bash b/bash/vterm-emacs.bash new file mode 100644 index 0000000..88d3e09 --- /dev/null +++ b/bash/vterm-emacs.bash @@ -0,0 +1,23 @@ +# shell-side configuration for Emacs vterm module +# https://github.com/akermu/emacs-libvterm#shell-side-configuration +# Make sure this is the last file loaded by ~/.bashrc! + +# Load the requisite code from the vterm install directory +if [[ "$INSIDE_EMACS" = 'vterm' ]] \ + && [[ -n ${EMACS_VTERM_PATH} ]] \ + && [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then + source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh +fi + +# Extra commands for `vterm-eval-cmds' + +find_file() { + vterm_cmd find-file "$(realpath "${@:-.}")" +} + +say() { + vterm_cmd message "%s" "$*" +} + + + -- cgit 1.4.1-21-gabe81