# How to save a desktop with narrowed indirect buffers?

I am unable to figure out a way to save my narrowed indirect buffer window, and restore it as it was.

Say I have a frame with several windows containing several indirect buffers, each narrowed to a different subtree (org mode) or region. What I want to achieve is to save the layout including the frame, all window, and all narrowed indirect buffers as well as their positions.

I installed desktop+, and used desktop-save-mode. Later I also used bookmark+, which provides commands such as bmkp-set-desktop-bookmark, and bmkp-desktop-jump. Both give unsatisfactory results when it comes to narrowed indirect buffers: The windows with indirect buffers will only show the complete file/buffer, instead of the narrowed one when I reopen and restore after C-x C-c.

I noticed that bookmark+ does provide a way to save regions and late allow you to jump to an clone indirect buffer with that region (along with narrow indirect package installed). However, it does not provide solutions at the desktop or even file level.

It's easy if you want to reproduce the results. Set desktop-save-mode to t in your init.el. Then open a file, split the window and create a narrowed indirect buffer (the easiest way is use an org-file, and narrow to a subtree using C-c C-x b. Exit emacs C-x C-c, then reopen it. You'll see your indirect buffer shows the full copy instead of the narrowed subtree in your previous desktop.

I really appreciate if someone can help me figure it out.

• OK, I moved the comment to an answer. – Drew Jan 5 '17 at 22:42

You could try a sequence bookmark that first restores the desktop (using a desktop bookmark) and then restores a particular narrowing (using a region bookmark and, say, bmkp-region-jump-narrow-indirect-other-window).