From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Adamsky Subject: Re: Archive subtrees hierarchical (keep the parent structure) Date: Tue, 05 Aug 2014 17:32:22 +0200 Message-ID: <87wqanx88p.fsf@voyager.localdomain> References: <87bns012a6.fsf@voyager.localdomain> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEgj0-0006pq-2e for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 11:32:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEgiu-0003jf-Rf for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 11:32:30 -0400 Received: from haktar.org ([46.38.251.222]:54062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEgiu-0003jH-LO for emacs-orgmode@gnu.org; Tue, 05 Aug 2014 11:32:24 -0400 In-reply-to: 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: emacs-orgmode@gnu.org Cc: Ken Mankoff Dear Ken, On Tuesday, Aug 05 2014, Ken Mankoff wrote: > This code looks useful and an improvement over the previous setup I was > using. https://lists.gnu.org/archive/html/emacs-orgmode/2014-05/msg01218.html > > Can you explain what else is needed for your code to work? Currently I > have at the moment, I just run the function org-archive-subtree-hierarchical interactively. > #+BEGIN_SRC emacs-lisp > (setq org-archive-location (concat org-directory "/archive/%s_archive::")) > #+END_SRC > > But I don't see things archived as subtrees with just this. Do I need > new/different configuration to work with your code? No, just run M-x org-archive-subtree-hierarchical. I tried the code with the latest org-mode version 8.3beta and with emacs -q and in both cases it works without problems. However, if you set the following variable to the new function, it should work with the default keybinding for org-archive: #+BEGIN_SRC emacs-lisp (setq org-archive-default-command 'org-archive-subtree-hierarchical) #+END_SRC If you have any trouble, please give me a note. Best -- Florian Adamsky http://florian.adamsky.it/