emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-archive-subtree keeping inherited tags
@ 2011-01-26 14:16 Osamu OKANO
  2011-01-28 13:47 ` Osamu OKANO
  0 siblings, 1 reply; 7+ messages in thread
From: Osamu OKANO @ 2011-01-26 14:16 UTC (permalink / raw)
  To: emacs-orgmode

Hi !
I'd like to org-archive-subtree keeping inherited tags.
Can I do like blow?
===~/org/action.org===================================
 #+FILETAGS: Action
 * office :@office:
 ** DONE I'd like to archive this subtree keeping inherited tags
 *** DONE step1
 *** DONE step2
 *** DONE step3
===~/org/action.org_archive===========================
 Archived entries from file  ~/org/action.org
 * DONE I'd like to archive this subtree keeping inherited tags :Action:@office:
 :PROPERTIES:
 :ARCHIVE_TIME: 2011-01-25 tue 19:00
 :ARCHIVE_FILE: ~/org/action.org
 :ARCHIVE_OLPATH: office
 :ARCHIVE_TODO: DONE
 :ARCHIVE_ITAGS: Action @office
 :END:
 ** DONE step1
 ** DONE step2
 ** DONE step3
================================================
Regards.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: org-archive-subtree keeping inherited tags
  2011-01-26 14:16 org-archive-subtree keeping inherited tags Osamu OKANO
@ 2011-01-28 13:47 ` Osamu OKANO
  2011-01-28 18:20   ` Carsten Dominik
  2011-02-01 11:17   ` Bastien
  0 siblings, 2 replies; 7+ messages in thread
From: Osamu OKANO @ 2011-01-28 13:47 UTC (permalink / raw)
  To: emacs-orgmode

Hi.

On Wed, Jan 26, 2011 at 11:16 PM, Osamu OKANO <okano.osamu@gmail.com> wrote:
> Hi !
> I'd like to org-archive-subtree keeping inherited tags.
> Can I do like blow?
I have found the solution by defadvice.
(defadvice org-archive-subtree
  (before add-inherited-tags-before-org-archive-subtree activate)
    "add inherited tags before org-archive-subtree"
    (org-set-tags-to (org-get-tags-at)))

Regards.

> ===~/org/action.org===================================
>  #+FILETAGS: Action
>  * office :@office:
>  ** DONE I'd like to archive this subtree keeping inherited tags
>  *** DONE step1
>  *** DONE step2
>  *** DONE step3
> ===~/org/action.org_archive===========================
>  Archived entries from file  ~/org/action.org
>  * DONE I'd like to archive this subtree keeping inherited tags :Action:@office:
>  :PROPERTIES:
>  :ARCHIVE_TIME: 2011-01-25 tue 19:00
>  :ARCHIVE_FILE: ~/org/action.org
>  :ARCHIVE_OLPATH: office
>  :ARCHIVE_TODO: DONE
>  :ARCHIVE_ITAGS: Action @office
>  :END:
>  ** DONE step1
>  ** DONE step2
>  ** DONE step3
> ================================================
> Regards.
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: org-archive-subtree keeping inherited tags
  2011-01-28 13:47 ` Osamu OKANO
@ 2011-01-28 18:20   ` Carsten Dominik
  2011-02-01 11:17   ` Bastien
  1 sibling, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2011-01-28 18:20 UTC (permalink / raw)
  To: Osamu OKANO; +Cc: emacs-orgmode


On Jan 28, 2011, at 2:47 PM, Osamu OKANO wrote:

> Hi.
>
> On Wed, Jan 26, 2011 at 11:16 PM, Osamu OKANO  
> <okano.osamu@gmail.com> wrote:
>> Hi !
>> I'd like to org-archive-subtree keeping inherited tags.
>> Can I do like blow?
> I have found the solution by defadvice.
> (defadvice org-archive-subtree
>  (before add-inherited-tags-before-org-archive-subtree activate)
>    "add inherited tags before org-archive-subtree"
>    (org-set-tags-to (org-get-tags-at)))

This is a pretty smart move!

- Carsten

>
> Regards.
>
>> ===~/org/action.org===================================
>>  #+FILETAGS: Action
>>  * office :@office:
>>  ** DONE I'd like to archive this subtree keeping inherited tags
>>  *** DONE step1
>>  *** DONE step2
>>  *** DONE step3
>> ===~/org/action.org_archive===========================
>>  Archived entries from file  ~/org/action.org
>>  * DONE I'd like to archive this subtree keeping inherited  
>> tags :Action:@office:
>>  :PROPERTIES:
>>  :ARCHIVE_TIME: 2011-01-25 tue 19:00
>>  :ARCHIVE_FILE: ~/org/action.org
>>  :ARCHIVE_OLPATH: office
>>  :ARCHIVE_TODO: DONE
>>  :ARCHIVE_ITAGS: Action @office
>>  :END:
>>  ** DONE step1
>>  ** DONE step2
>>  ** DONE step3
>> ================================================
>> Regards.
>>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: org-archive-subtree keeping inherited tags
  2011-01-28 13:47 ` Osamu OKANO
  2011-01-28 18:20   ` Carsten Dominik
@ 2011-02-01 11:17   ` Bastien
  2011-02-01 11:20     ` Carsten Dominik
  1 sibling, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-01 11:17 UTC (permalink / raw)
  To: Osamu OKANO; +Cc: emacs-orgmode

Osamu OKANO <okano.osamu@gmail.com> writes:

>> I'd like to org-archive-subtree keeping inherited tags.
>> Can I do like blow?
> I have found the solution by defadvice.
> (defadvice org-archive-subtree
>   (before add-inherited-tags-before-org-archive-subtree activate)
>     "add inherited tags before org-archive-subtree"
>     (org-set-tags-to (org-get-tags-at)))

Thanks for this hack, I added it to Worg/org-hacks.org

  http://orgmode.org/worg/org-hacks.html

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: org-archive-subtree keeping inherited tags
  2011-02-01 11:17   ` Bastien
@ 2011-02-01 11:20     ` Carsten Dominik
  2011-02-01 16:34       ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2011-02-01 11:20 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Osamu OKANO


On Feb 1, 2011, at 12:17 PM, Bastien wrote:

> Osamu OKANO <okano.osamu@gmail.com> writes:
>
>>> I'd like to org-archive-subtree keeping inherited tags.
>>> Can I do like blow?
>> I have found the solution by defadvice.
>> (defadvice org-archive-subtree
>>  (before add-inherited-tags-before-org-archive-subtree activate)
>>    "add inherited tags before org-archive-subtree"
>>    (org-set-tags-to (org-get-tags-at)))
>
> Thanks for this hack, I added it to Worg/org-hacks.org
>
>  http://orgmode.org/worg/org-hacks.html

It might be useful to consider making this as part of the normal  
archiving procedure, when archiving to a different file.  Maybe  
subject to a variable - but I do like the idea to be able to look at  
archived entries with all tags in place.  Since in the Archive,  
entries are usually all siblings, there is no useful inheritance.  
Explicitly copying the tags into each archived entry is a good way to  
go to retain searchability of tags...

Cheers

- Carsten

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: org-archive-subtree keeping inherited tags
  2011-02-01 11:20     ` Carsten Dominik
@ 2011-02-01 16:34       ` Bastien
  2011-02-01 16:42         ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-01 16:34 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Osamu OKANO

Carsten Dominik <carsten.dominik@gmail.com> writes:

> It might be useful to consider making this as part of the normal archiving
> procedure, when archiving to a different file.  Maybe subject to a variable
> - but I do like the idea to be able to look at archived entries with all
> tags in place.  Since in the Archive, entries are usually all siblings,
> there is no useful inheritance. Explicitly copying the tags into each
> archived entry is a good way to go to retain searchability of tags...

I've now implemented this.

You can customize `org-archive-subtree-add-inherited-tags' which
defaults to 'infile so that infile subtree archiving will append
inherited tags to the archived subtree.  

If `org-archive-save-context-info' contains the itags symbol, 
inherited tags will aslo be added to the ARCHIVE_ITAGS property.

Thanks for this idea!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: org-archive-subtree keeping inherited tags
  2011-02-01 16:34       ` Bastien
@ 2011-02-01 16:42         ` Carsten Dominik
  0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2011-02-01 16:42 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Osamu OKANO


On Feb 1, 2011, at 5:34 PM, Bastien wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> It might be useful to consider making this as part of the normal  
>> archiving
>> procedure, when archiving to a different file.  Maybe subject to a  
>> variable
>> - but I do like the idea to be able to look at archived entries  
>> with all
>> tags in place.  Since in the Archive, entries are usually all  
>> siblings,
>> there is no useful inheritance. Explicitly copying the tags into each
>> archived entry is a good way to go to retain searchability of tags...
>
> I've now implemented this.
>
> You can customize `org-archive-subtree-add-inherited-tags' which
> defaults to 'infile so that infile subtree archiving will append
> inherited tags to the archived subtree.
>
> If `org-archive-save-context-info' contains the itags symbol,
> inherited tags will aslo be added to the ARCHIVE_ITAGS property.
>
> Thanks for this idea!

Great.

- Carsten

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-01 16:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 14:16 org-archive-subtree keeping inherited tags Osamu OKANO
2011-01-28 13:47 ` Osamu OKANO
2011-01-28 18:20   ` Carsten Dominik
2011-02-01 11:17   ` Bastien
2011-02-01 11:20     ` Carsten Dominik
2011-02-01 16:34       ` Bastien
2011-02-01 16:42         ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).