alternatively, fall back to org-mark-element. I am not sure what
differences in what you are trying to achieve and this are, but this should
cover all org elements:

(defun org-kill-element ()
  (interactive)
  (org-mark-element)
  (call-interactively #'kill-region))

John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Fri, Aug 13, 2021 at 9:45 PM Ihor Radchenko <yanta...@gmail.com> wrote:

> Rodrigo Morales <moralesrodrigo1...@gmail.com> writes:
>
> >           (t
> >            (error "The element at point couldn't be copied.")))
>
> I would fall back to region between :begin and :end of the element.
>
> Also, it might be helpful to print a short message about what element
> have just been copied.
>
> Best,
> Ihor
>
>

Reply via email to