emacs: make emacs/EDITOR work

This commit is contained in:
2020-07-12 12:56:39 -07:00
parent 836cf1b841
commit 438d51182f
2 changed files with 11 additions and 6 deletions

View File

@@ -229,11 +229,6 @@ Install magit, the emacs porcelain for git.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package magit (use-package magit
:custom (magit-bury-buffer-function 'magit-mode-quit-window)) :custom (magit-bury-buffer-function 'magit-mode-quit-window))
(use-package with-editor
:init (add-hook 'shell-mode-hook 'with-editor-export-editor)
(add-hook 'term-exec-hook 'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor))
#+END_SRC #+END_SRC
*** Terminals (=multi-Term=) *** Terminals (=multi-Term=)

View File

@@ -7,7 +7,17 @@ noerr() {
} }
alias gh='git-home' alias gh='git-home'
alias emacs='emacsclient -a="" -c'
alias highlight='grep -U999999 --color=always' alias highlight='grep -U999999 --color=always'
export PATH=$PATH:$HOME/.mgr_config/bin export PATH=$PATH:$HOME/.mgr_config/bin
if [[ -z "$INSIDE_EMACS" ]]; then
EMACS="emacsclient -a="" -c"
alias emacs="$EMACS"
else
EMACS="emacsclient"
alias emacs="$EMACS -n"
fi
export EDITOR="$EMACS"
export VISUAL="$EMACS"