Dear Florian,

I just found this code you wrote and it is exactly what I wanted for my archiving.  But I found one little issue.  I discovered that this interacts with the setting  org-yank-adjusted-subtrees because it calls org-yank.  With 
(setq org-yank-justed-subtrees t), the archived subtree is not pasted in as a child of the created hierarchy, but ends up as a sibling because org-yank calls org-paste-subtree.

My current workaround is to set  org-yank-adjusted-subtrees nil, but perhaps there is a clean way to turn off this setting in org-yank so that org-paste-subtree is not called in this particular case regardless of the value of org-yank-adjusted-subtrees?

- Dylan Schwilk

On Tue, Aug 5, 2014 at 1:00 PM, Ken Mankoff <mankoff@gmail.com> wrote:
Yes that works perfectly. Not sure why I had memorized a different keystroke. Thank you!



On Tue, Aug 5, 2014 at 1:46 PM, Florian Adamsky <fa-orgmode@haktar.org> wrote:
Dear Ken,

On Tuesday, Aug 05 2014, Ken Mankoff <mankoff@gmail.com> wrote:

> 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?

according to the documentation the default keybinding to archive the
current entry is C-c C-x C-a. Could you try that instead?

[...]

Best
--
Florian Adamsky
http://florian.adamsky.it/