summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eshell-conf.el31
1 files changed, 22 insertions, 9 deletions
diff --git a/eshell-conf.el b/eshell-conf.el
index 6911901..f2e1d3c 100644
--- a/eshell-conf.el
+++ b/eshell-conf.el
@@ -800,16 +800,21 @@ The file names should not include any extension."
(lambda (arg)
(cond
((memq ?* (mapcar #'identity arg))
- (let* ((inhibit-message t)
- (splitted (split-string arg "*"))
+ (let* ((splitted (split-string arg "*"))
(matching-re
(format "%s.*%s\\.gv"
(car splitted)
(apply #'concat (cdr splitted))))
(source-files
- (directory-files root-dir t matching-re t)))
+ (directory-files root-dir t matching-re t))
+ (len (length source-files))
+ (count 0)
+ (reporter (make-progress-reporter "gv" 0 len ))
+ inhibit-message)
(mapc
(lambda (file)
+ (progress-reporter-update reporter count)
+ (setq count (1+ count))
(let ((output-file-name
(expand-file-name
(concat
@@ -821,14 +826,22 @@ The file names should not include any extension."
(delete-char 2)
(cond (verticalp (insert ?T ?B))
((insert ?L ?R)))
- (write-region nil nil file))
- (eshell-command-result
- (format
- "dot -T%s \"%s\" -o \"%s\""
+ (write-region nil nil file nil 'silent))
+ (make-process
+ :name "gv"
+ :command
+ (list
+ "dot"
+ "-T"
image-format
file
- output-file-name))))
- source-files)))
+ "-o"
+ output-file-name)
+ :buffer nil
+ :filter #'ignore
+ :sentinel #'ignore)))
+ source-files)
+ (progress-reporter-done reporter)))
(t
(let* ((arg (file-name-base arg))
(out-file-name (format "%s.%s" arg image-format))