From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Archive subtree with parent structure Date: Fri, 18 Apr 2014 13:36:18 +0200 Message-ID: <87a9bij2dp.fsf@bzg.ath.cx> References: <0f28107b197f2b89ae13fc5acf0e3607@xgm.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wb75n-0003mX-DB for emacs-orgmode@gnu.org; Fri, 18 Apr 2014 07:36:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wb75h-0005CS-Dx for emacs-orgmode@gnu.org; Fri, 18 Apr 2014 07:36:27 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:38993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wb75h-0005BP-79 for emacs-orgmode@gnu.org; Fri, 18 Apr 2014 07:36:21 -0400 Received: by mail-wg0-f41.google.com with SMTP id n12so434844wgh.24 for ; Fri, 18 Apr 2014 04:36:20 -0700 (PDT) In-Reply-To: <0f28107b197f2b89ae13fc5acf0e3607@xgm.de> (Florian Lindner's message of "Tue, 15 Apr 2014 16:49:12 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Florian Lindner Cc: emacs-orgmode@gnu.org Hi Florian, Florian Lindner 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