[emacs-berlin] Delete an entry from a list of orgmode tasks
Dr. Michael Hailer
dr.hailer at proton.me
Fri Aug 14 08:41:45 UTC 2026
(defun my/org-delete-subtree ()
"Delete the current Org subtree without adding it to the kill ring."
(interactive)
(org-back-to-heading t)
(when (yes-or-no-p
(format "Subtree \"%s\" wirklich löschen? "
(org-get-heading t t t t)))
(let ((beg (point))
(end (save-excursion
(org-end-of-subtree t t))))
(delete-region beg end))))
Best regards
Michael
-------- Original Message --------
On Thursday, 08/13/26 at 15:22 jman <emacs-berlin at city17.xyz> wrote:
hello everyone, quick question.
I can add and refile a new task with `org-capture` but there I didn't find a command to do delete a
task entirely
All I could find is `org-cut-subtree` which cuts the entry into the clipboard. It does almost what I
want, minus the clipboard part.
Am I missing anything? Should I code my own small utility? Example:
(defun my/org-delete-subtree ()
"Like org-cut-subtree but delete instead of putting into kill ring."
(interactive)
;; cut the entry
(org-cut-subtree 1)
;; remove it from the clipboard
(pop kill-ring))
Thanks!
_______________________________________________
emacs-berlin mailing list
emacs-berlin at emacs-berlin.org
https://mailb.org/mailman/listinfo/emacs-berlin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publickey - dr.hailer at proton.me - 0x0D521D34.asc
Type: application/pgp-keys
Size: 655 bytes
Desc: not available
URL: <http://mailb.org/pipermail/emacs-berlin/attachments/20260814/c3a8a7dd/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 343 bytes
Desc: OpenPGP digital signature
URL: <http://mailb.org/pipermail/emacs-berlin/attachments/20260814/c3a8a7dd/attachment.sig>
More information about the emacs-berlin
mailing list