From 52ff09d90ed53a246fc91764a56995363bfbbb4b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 17 Aug 2016 14:58:39 -0700 Subject: [PATCH] Clean up try-call-process --- dotfiles/emacs.d/README.org | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index f077f5a4..79c2879c 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -125,16 +125,12 @@ The following implementation uses eshell's ~eshell-search-path~ to find the bina #+END_SRC This makes it so that we always try to call-process instead of shell-command-to-sting. It may cause undesireable behavior. #+BEGIN_SRC emacs-lisp -(defvar imalison:shell-command-count 0) -(defvar imalison:call-process-count 0) (defun imalison:try-call-process (command) - (incf imalison:shell-command-count) (let ((call-process-args (imalison:get-call-process-args-from-shell-command command))) (if call-process-args - (progn (incf imalison:call-process-count) - (apply 'imalison:call-process-to-string call-process-args)) - (message "failed with: %s" command)))) + + (apply 'imalison:call-process-to-string call-process-args)))) (advice-add 'shell-command-to-string :before-until 'imalison:try-call-process) #+END_SRC