From 6d8757c148a022dddd512ec24307790269fb2394 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 16:13:56 -0700 Subject: [PATCH] [Emacs] Respace Non-Forking Shell Command --- dotfiles/emacs.d/README.org | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 71e77468..7d4b8f2c 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -131,9 +131,13 @@ Sets environment variables by starting a shell. (exec-path-from-shell-initialize))))) #+END_SRC ** Non-Forking Shell Command To String -Emacs' built in ~shell-command-to-string~ function has the downside that it forks a new shell process every time it is executed. This means that any shell startup cost is incurred when this function is called. +Emacs' built in ~shell-command-to-string~ function has the downside that it +forks a new shell process every time it is executed. This means that any shell +startup cost is incurred when this function is called. -The following implementation uses eshell's ~eshell-search-path~ to find the binary (which is the only reason ~shell-comand-to-string~ is typically used anyway), but it avoids incurring any shell-startup cost. +The following implementation uses eshell's ~eshell-search-path~ to find the +binary (which is the only reason ~shell-comand-to-string~ is typically used +anyway), but it avoids incurring any shell-startup cost. This was originally inspired by [[https://github.com/bbatsov/projectile/issues/1044][this issue]]. #+BEGIN_SRC emacs-lisp