>>> 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.

Still failing on my side (when running tests non-interactively from
command line). To fix the problem, please use the approach from

            (transient-mark-mode 1)
            (push-mark (point) t t)

Instead of (set-mark-command nil)

> +          ;; Map positions to columns for white-space padding.
> +          (setq pads (mapcar (lambda (p) (save-excursion
> +                                           (goto-char p)
> +                                           (current-column)))
> +                             pads))

This will break when the region does not start near the beginning of
line or does not end there:

#+begin_src emacs-lisp
  <mark>'(1 2 3)
  '(1 2 <point>3)

Also, the indentation of source code inside src block should not be used
to indent the whole block. This is because it may be additionally
indented according to `org-edit-src-content-indentation'. If you want to
preserve the original indentation, just use
`org-current-text-indentation' at the beginning of the src block.

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <>.
Support Org development at <>,
or support my work at <>

Reply via email to