emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Kill all items with specific tag to kill-ring.


From: Oleksandr Gavenko
Subject: Re: [O] Kill all items with specific tag to kill-ring.
Date: Thu, 25 Apr 2013 11:06:05 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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:...




reply via email to

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