diff options
author | Tom Willemsen | 2012-12-03 22:51:15 +0100 |
---|---|---|
committer | Tom Willemsen | 2012-12-03 22:51:15 +0100 |
commit | 5ea93a6762d7f47b8c176e945305af6658af9395 (patch) | |
tree | 43ddeafa8646649e803b513cbb7c9d1390421ec2 | |
parent | 466c63d99f34afea14e9fc32f583680621170cc4 (diff) | |
download | dispass.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.el | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |