[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Async evaluation in ob-shell
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] Async evaluation in ob-shell |
Date: |
Mon, 20 Feb 2023 11:24:52 +0000 |
Matt <matt@excalamus.com> writes:
> + (advice-add
> + 'ob-shell-async-chunk-callback
> + :filter-return
> + (lambda (&rest r)
> + (let ((result (car r)))
> + (should (string= result "1\n2\n")) ; expect value
> + result))
> + `((name . ,session-name)))
> ...
> + (catch 'too-long
> + (while (string-match test-ob-shell/uuid-regex
> (buffer-string))
> + (progn
> + (sleep-for 0.01)
> + (when (time-less-p wait-time (current-time))
> + (throw 'too-long (ert-fail "Took too long to get
> result from callback")))))
> + t)))
Why not simply doing the `should' test when the
`test-ob-shell/uuid-regex' match fails? Instead of returning `t'. Then,
we will not need to use advise.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: [PATCH] Async evaluation in ob-shell, (continued)
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/07
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/08
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/09
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/10
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/11
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/12
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/15
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/15
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/17
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/19
- Re: [PATCH] Async evaluation in ob-shell,
Ihor Radchenko <=
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/20
- Re: [PATCH] Async evaluation in ob-shell, Ihor Radchenko, 2023/02/22
Re: [PATCH] Async evaluation in ob-shell, jackkamm, 2023/02/11
- Re: [PATCH] Async evaluation in ob-shell, Matt, 2023/02/12
- Re: [PATCH] Async evaluation in ob-shell, Jack Kamm, 2023/02/12
- [BUG] shell sessions started outside of Babel broken, Matt, 2023/02/13
- Re: [BUG] shell sessions started outside of Babel broken, Jack Kamm, 2023/02/15
- Re: [BUG] shell sessions started outside of Babel broken, Ihor Radchenko, 2023/02/16
- Re: [BUG] shell sessions started outside of Babel broken, Jack Kamm, 2023/02/19
- Re: [BUG] shell sessions started outside of Babel broken, Ihor Radchenko, 2023/02/20