From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: saving state of buffer Date: Thu, 21 Mar 2013 07:58:51 +0100 Message-ID: References: <878v5inpfd.fsf@bzg.ath.cx> Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_48604A1D-1289-405A-AEB1-EB208B7CFBF8" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIZSm-0002lO-P1 for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 02:59:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIZSh-0002sL-2L for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 02:59:00 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:65110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIZSg-0002s7-OJ for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 02:58:54 -0400 Received: by mail-wi0-f171.google.com with SMTP id hn17so6155525wib.10 for ; Wed, 20 Mar 2013 23:58:53 -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: 42 147 Cc: Org Mode --Apple-Mail=_48604A1D-1289-405A-AEB1-EB208B7CFBF8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 20.3.2013, at 19:28, 42 147 wrote: > > (require 'saveplace) > > (setq-default save-place t) >=20 > > works for me. It just opens the place where I had the point, nothing=20= > > more, but that's what I need most. >=20 > 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= --Apple-Mail=_48604A1D-1289-405A-AEB1-EB208B7CFBF8 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
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 
> 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 c ompanion variables, they are all in the customization group org-reveal-context.

- Carsten
--Apple-Mail=_48604A1D-1289-405A-AEB1-EB208B7CFBF8--