aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-12-03 22:51:15 +0100
committerGravatar Tom Willemsen2012-12-03 22:51:15 +0100
commit5ea93a6762d7f47b8c176e945305af6658af9395 (patch)
tree43ddeafa8646649e803b513cbb7c9d1390421ec2
parent466c63d99f34afea14e9fc32f583680621170cc4 (diff)
downloaddispass.el-5ea93a6762d7f47b8c176e945305af6658af9395.tar.gz
dispass.el-5ea93a6762d7f47b8c176e945305af6658af9395.zip
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.
-rw-r--r--dispass.el6
1 files 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)