From 60a3675d3eb6b22545f0f382f4ff8ab862a0d697 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 14 Jan 2018 10:09:44 +0100 Subject: [PATCH] =?UTF-8?q?[Misc]=20Use=20=E2=80=98with-editor=E2=80=99=20?= =?UTF-8?q?in=20eshell=20and=20shell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.el | 8 ++++++-- site-lisp/db-eshell.el | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 4e488c0..807d55c 100644 --- a/init.el +++ b/init.el @@ -1030,15 +1030,19 @@ Certificates are assumed to be of the form *.crt." (add-hook 'compilation-filter-hook #'endless/colorize-compilation))) (use-package shell - :defer t + :commands (shell) :config (progn (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) - (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m))) + (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m) + (add-hook 'shell-mode-hook 'with-editor-export-editor))) (use-package eshell :commands (eshell) :config (use-package db-eshell)) +(use-package with-editor + :commands (with-editor-export-editor)) + ;; * Lisp diff --git a/site-lisp/db-eshell.el b/site-lisp/db-eshell.el index 46ae5ea..73d504a 100644 --- a/site-lisp/db-eshell.el +++ b/site-lisp/db-eshell.el @@ -54,6 +54,9 @@ (lambda () (add-hook 'eshell-output-filter-functions 'eshell-truncate-buffer))) +(add-hook 'eshell-mode-hook + 'with-editor-export-editor) + ;; Git Completion ;; https://tsdh.wordpress.com/2013/05/31/eshell-completion-for-git-bzr-and-hg/