emacs-orgmode
[Top][All Lists]
Advanced

[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: Tue, 09 Jan 2024 10:50:00 +0000

On 09.01.2024 08:49, gerard.vermeulen@posteo.net wrote:
[...]
Anyhow, I have removed the comment and I have replaced check below it with
+          (set-mark (point)) ;; To simplify the next (unless ...):
+          (unless (and (>= (point) body-beg) (<= (mark) body-end))
+ (user-error "Select within the source block body to split it")) which also protects against having point in body and mark on or below #+end_src

It occurred to me to that I only should set mark to point when the region is
not active.  I will add checking for `user-error's to the ERT test.

Attached you'll find a new patch fixing the three wrong lines in the previous
and now the ERT test checks also for `user-error's.

Regards -- Gerard

Attachment: 0001-org-babel-demarcate-block-split-using-element-API.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]