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:
parent
466c63d99f
commit
5ea93a6762
1 changed files with 3 additions and 3 deletions
|
@ -209,9 +209,9 @@ an eye out for LABEL."
|
||||||
"Get the list of labels and their information."
|
"Get the list of labels and their information."
|
||||||
(let ((result '()))
|
(let ((result '()))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(shell-command (concat dispass-labels-executable
|
(insert (shell-command-to-string
|
||||||
" -l --script")
|
(concat dispass-labels-executable " -l --script")))
|
||||||
(current-buffer))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward
|
(while (re-search-forward
|
||||||
"^\\(\\(?:\\sw\\|\\s_\\)+\\) +\\([0-9]+\\) +\\(\\(?:\\sw\\|\\s_\\)+\\)"
|
"^\\(\\(?:\\sw\\|\\s_\\)+\\) +\\([0-9]+\\) +\\(\\(?:\\sw\\|\\s_\\)+\\)"
|
||||||
nil t)
|
nil t)
|
||||||
|
|
Loading…
Reference in a new issue