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.
This commit is contained in:
Tom Willemsen 2012-12-03 22:51:15 +01:00
parent 466c63d99f
commit 5ea93a6762

View file

@ -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)