Carsten Dominik <carsten.dominik <at> gmail.com> writes: > On 25 apr. 2013, at 10:56, Oleksandr Gavenko <gavenkoa <at> gmail.com> wrote: > > > > (defun my-org-kill-by-tag (tag) > > (interactive (list (completing-read "Enter tag: " (org-get-buffer-tags)))) > > (kill-new "") > > (org-scan-tags > > (lambda () > > (let ( (last-command 'kill-region) ) > > (org-cut-subtree))) > > '(member tag tags-list) > > nil) ) > > > > Is it possible to include "correct" implementation (seems that I can't able > > implement one) to org-mode? > > I thought your version did work? Does it not? >
Yes. It works. But implementation relay on internals of 'org-cut-subtree' and applied only to single file and without any checks (I try call on non-org buffer - it doesn't do anything - so seems it is safe). Also it doesn't follow any org-mode coding conventions... Also 'org-scan-tags' have 'todo-only' argument which may be interesting for possible users of my-org-kill-by-tag.... > > I want this feature in order to simplify precess of moving entries from job > > org-file to home org-file by marking entries with tag :HOME:...