[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Archive subtree with parent structure
From: |
Bastien |
Subject: |
Re: [O] Archive subtree with parent structure |
Date: |
Fri, 18 Apr 2014 13:36:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Hi Florian,
Florian Lindner <address@hidden> writes:
> is it possible to org-archive-subtree a subtree and keep the entire
> parent structure? e.g.
>
> * A
> ** AA
> ** AB
> ** AC
>
>
> AB will be archived to:
>
> * A
> ** AB
No, but each subtree can contain an :ARCHIVE: property that will help
you come close to this.
For example:
* A
:PROPERTIES:
:ARCHIVE: basement_archive::* A
:END
** AA
** AB
** AC
then C-c $ on AA AB and AC will archive them under the * A subtree
of the basement_archive file.
> Another question, just out of interest: Why is there
> org-archive-subtree-default at all? According to documentation and
> source it just calls the function in org-archive-default-command:
>
> (defun org-archive-subtree-default ()
> "Archive the current subtree with the default command.
> This command is set with the variable `org-archive-default-command'."
> (interactive)
> (call-interactively org-archive-default-command))
>
> Isn't the emacs way to rather just set org-archive-subtree to another
> function or rebind the key?
The reasoning here is that the user wants to customize
`org-archive-default-command' and still use C-c C-x C-a to archive.
It would not be practical to force him create new keybindings.
HTH,
--
Bastien