From mboxrd@z Thu Jan 1 00:00:00 1970 From: 42 147 Subject: Re: saving state of buffer Date: Thu, 21 Mar 2013 05:05:11 -0400 Message-ID: References: <878v5inpfd.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec554dcaaccfede04d86ba2c3 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIbQz-0005Sh-IN for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 05:05:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIbQu-0004pO-M7 for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 05:05:17 -0400 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:46150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIbQu-0004oY-EH for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 05:05:12 -0400 Received: by mail-la0-f47.google.com with SMTP id fj20so4645126lab.20 for ; Thu, 21 Mar 2013 02:05:11 -0700 (PDT) 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: Carsten Dominik , "Loyall, David" Cc: Org Mode --bcaec554dcaaccfede04d86ba2c3 Content-Type: text/plain; charset=ISO-8859-1 Thanks David, but what Carsten suggested completely resolved my problem (it applies not just to bookmarks; it fully preserves my buffer's folded state after adding Christoph's code to my .emacs). But I should also thank you for finding the words I struggled to find ("folded state"). I feel honored that royalty stepped into the discussion. Herzlichen Dank, 42 2013/3/21 Carsten Dominik > > On 20.3.2013, at 19:28, 42 147 wrote: > > > (require 'saveplace) > > (setq-default save-place t) > > > works for me. It just opens the place where I had the point, nothing > > more, but that's what I need most. > > This is more convenient than Emacs bookmarks, but still breaks org-mode to > a certain extent: all non top-level headlines below point are hidden. At > least for me. > > > Org-mode has very precise control for situations when a jump into > invisible text happens, for example by isearch or by bookmark-jump or > saveplace. Take a look at the variable org-show-siblings and set a special > context for bookmark-jump, that should do it. This will work for both > saveplace and bookmarks. > > You can do this with customize, or just like this: > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > There are companion variables, they are all in the customization group > org-reveal-context. > > - Carsten > --bcaec554dcaaccfede04d86ba2c3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks David, but what Carsten suggested completely resolved my problem (it=
applies not just to bookmarks; it fully preserves my buffer's folde= d state
after adding Christoph's code to my .emacs). But I should al= so thank you
for finding the words I struggled to find ("folded state").
I feel honored that royalty stepped into the discussion.

Herzliche= n Dank,

42


2013/3/21 Carsten D= ominik <carsten.dominik@gmail.com>

On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com> wrote:
> (require 'saveplace)
> (setq-default save-place t)

> works for me. It just opens the place where I had the point, nothing=
=20
> more, but that's what I need most.

This is mor= e convenient than Emacs bookmarks, but still breaks org-mode to
a certai= n extent: all non top-level headlines below point are hidden. At
least f= or me.

Org-mode has very precise cont= rol for situations when a jump into invisible text happens, for example by = isearch or by bookmark-jump or saveplace. =A0Take a look at the variable or= g-show-siblings and set a special context for bookmark-jump, that should do= it. =A0This will work for both saveplace and bookmarks.

You can do this with customize, or just like this:

(setq=A0org-show-siblings '((default) (isearch t) = (bookmark-jump . t)))

There are companion variable= s, they are all in the customization group org-reveal-context.

- Carste= n

--bcaec554dcaaccfede04d86ba2c3--