Carsten Dominik <carsten.dominik <at> gmail.com> writes: > > On 25.4.2013, at 07:32, Oleksandr Gavenko <gavenkoa <at> gmail.com> wrote: > > > I use tags only on top level items in org-file. > > > > And want move all items marked by specific tag to different org-file. > > > > I expect that this command kill items with selected tag to kill-ring in one > > step (so single undo command return original buffer content). > > > > Seems there are no such command build-in command... > > no, but you could easily make one using the function org-map-entries. >
I finish with very hackie code (based on knowledge of internal implementation of org-scan-tags): (defun my-org-kill-by-tag (tag) (interactive (list (read-input "Enter tag: "))) (kill-new "") (org-scan-tags (lambda () (let ( (last-command 'kill-region) ) (org-cut-subtree))) '(member tag tags-list) nil) ) You can replace 'org-cut-subtree' by 'org-copy-subtree' if don't want remove org entries...