diff options
| author | Martin Edström <meedstrom@runbox.eu> | 2026-01-23 11:22:49 +0100 |
|---|---|---|
| committer | Martin Edström <meedstrom@runbox.eu> | 2026-01-23 11:23:28 +0100 |
| commit | 6a0f62cf08eefdaec332c3c32d81c4c234a7daa5 (patch) | |
| tree | ea58c780fdb566b4d0e7e3a677f78949365b696d | |
| parent | 71ff52040452edd091587990947d98e4b8ae660d (diff) | |
Fix
| -rw-r--r-- | el-job-ng.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/el-job-ng.el b/el-job-ng.el index 98abc59..8d5d6fa 100644 --- a/el-job-ng.el +++ b/el-job-ng.el @@ -213,11 +213,9 @@ ID can also be passed to these helpers: (setq id (or id (abs (random)))) (let ((job (with-memoization (gethash id el-job-ng--jobs) (make-instance 'el-job-ng-job :id id)))) + (el-job-ng-kill-keep-bufs id) (oset job callback callback) (with-slots (process-outputs stderr benchmarks do-bench) job - ;; Cancel any currently-running job with same ID - (while-let ((proc (car (pop process-outputs)))) - (delete-process proc)) ;; https://github.com/meedstrom/org-node/issues/98 (with-temp-buffer (let* ((print-length nil) @@ -446,8 +444,10 @@ Otherwise, a keyboard quit would let it continue in the background." (and job (oref job stderr)))) (defun el-job-ng-processes (id) + "Get the list of process objects for ID, dead or alive." (let ((job (el-job-ng-get-job id))) - (and job (mapcar #'car (oref job process-outputs))))) + (and job (seq-filter #'processp + (mapcar #'car (oref job process-outputs)))))) (defun el-job-ng-get-job (id-or-process) (if (processp id-or-process) |
