From 5ea93a6762d7f47b8c176e945305af6658af9395 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 3 Dec 2012 22:51:15 +0100 Subject: Don't open a window when calling dispass The way `shell-command' was being used would open a new window every time `dispass-get-labels' would get called, so now use `shell-command-to-string' in combination with `insert' in order to prevent that from happening. --- dispass.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dispass.el b/dispass.el index 8640f41..4b67c10 100644 --- a/dispass.el +++ b/dispass.el @@ -209,9 +209,9 @@ an eye out for LABEL." "Get the list of labels and their information." (let ((result '())) (with-temp-buffer - (shell-command (concat dispass-labels-executable - " -l --script") - (current-buffer)) + (insert (shell-command-to-string + (concat dispass-labels-executable " -l --script"))) + (goto-char (point-min)) (while (re-search-forward "^\\(\\(?:\\sw\\|\\s_\\)+\\) +\\([0-9]+\\) +\\(\\(?:\\sw\\|\\s_\\)+\\)" nil t) -- cgit v1.2.3-54-g00ecf