[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] org-babel-demarcate-block: split using element API
From: |
gerard . vermeulen |
Subject: |
Re: [PATCH] org-babel-demarcate-block: split using element API |
Date: |
Sun, 14 Jan 2024 19:18:23 +0000 |
On 14.01.2024 13:16, Ihor Radchenko wrote:
gerard.vermeulen@posteo.net writes:
[...]
I tried make test and the tests are still failing with this new patch:
1 unexpected results:
FAILED test-ob/demarcate-block ((should (string= region-text
(org-trim (nth 1 info)))) :form (string= "mark this line as region"
"") :value nil :explanation (arrays-of-different-length 24 0 "mark
this line as region" "" first-mismatch-at 0))
This is a tough lesson: the tests pass always on my system.
I think the failure you see is related to a problem marking a region
in my test code (wish: support in `org-test-with-temp-text' for
"<mark>" besides "<point>", but maybe that depends on ERT), else
the problem would have shown up while testing the patch interactively.
I think that I have improved my region marking code by using "<point>"
in the temp-text as a start. Then, I only have to find where to set
mark,
and eventually exchange point and mark.
The test code now checks (mark) in the 3 places where a region is
marked.
This looks superfluous if the code is really robust, but at least it
checks
whether the region marking is (or was) the problem.
New patch attached.
Some of the scaffolding (should ...) forms could be removed if
the 5 sub-test in test-ob/demarcate-block would be 5 separated
ERT tests. I prefer to continue like this and do eventual refactoring
later.
Regards -- Gerard
0001-org-babel-demarcate-block-split-using-element-API.patch
Description: Binary data
- Re: [PATCH] org-babel-demarcate-block: split using element API, (continued)
- Re: [PATCH] org-babel-demarcate-block: split using element API, Ihor Radchenko, 2024/01/08
- Re: [PATCH] org-babel-demarcate-block: split using element API, gerard . vermeulen, 2024/01/08
- Re: [PATCH] org-babel-demarcate-block: split using element API, gerard . vermeulen, 2024/01/09
- Re: [PATCH] org-babel-demarcate-block: split using element API, gerard . vermeulen, 2024/01/09
- Re: [PATCH] org-babel-demarcate-block: split using element API, Ihor Radchenko, 2024/01/09
- Re: [PATCH] org-babel-demarcate-block: split using element API, gerard . vermeulen, 2024/01/13
- Re: [PATCH] org-babel-demarcate-block: split using element API, Ihor Radchenko, 2024/01/13
- Re: [PATCH] org-babel-demarcate-block: split using element API, gerard . vermeulen, 2024/01/13
- Re: [PATCH] org-babel-demarcate-block: split using element API, gerard . vermeulen, 2024/01/14
- Re: [PATCH] org-babel-demarcate-block: split using element API, Ihor Radchenko, 2024/01/14
- Re: [PATCH] org-babel-demarcate-block: split using element API,
gerard . vermeulen <=
- Re: [PATCH] org-babel-demarcate-block: split using element API, gerard . vermeulen, 2024/01/15
- Re: [PATCH] org-babel-demarcate-block: split using element API, Ihor Radchenko, 2024/01/16