Hi Florian, * On 2014-08-05 at 11:32, Florian Adamsky 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 > > 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.
You are correct that M-x org-archive-subtree-hierarchical works just fine. But I can't get it to work with the default keybinding as you show above. C-c C-x C-s is my (the?) default keybinding for archiving trees/subtrees. Is this the correct keybinding? When I describe that with C-h k C-c C-x C-s I see: > C-c C-x C-s runs the command org-advertized-archive-subtree, which is > an alias for `org-archive-subtree' in `org.el'. > > It is bound to C-c C-x C-s, <menu-bar> <Org> <Archive> <Move Subtree > to Archive file>. > > (org-advertized-archive-subtree &optional FIND-DONE) So I have tried mapping all of those to call the new function: (setq org-archive-default-command 'org-archive-subtree-hierarchical) (setq org-archive-subtree 'org-archive-subtree-hierarchical) (setq org-advertized-archive-subtree 'org-archive-subtree-hierarchical) But it still doesn't work. I can bind org-archive-subtree-hierarchical directly to C-c C-x C-s, which will work. Is that the correct solution? Thanks, -k.