From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.help Subject: Re: Is there a save-outline-visibility excursion or so? Date: Wed, 22 May 2013 14:48:00 +0530 Message-ID: <87sj1ffk53.fsf@gmail.com> References: <877gircr8b.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369214316 18645 80.91.229.3 (22 May 2013 09:18:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 09:18:36 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Thorsten Jolitz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 22 11:18:35 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uf5Br-0007Mh-2x for geh-help-gnu-emacs@m.gmane.org; Wed, 22 May 2013 11:18:35 +0200 Original-Received: from localhost ([::1]:44314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf5Bq-0003GB-Ge for geh-help-gnu-emacs@m.gmane.org; Wed, 22 May 2013 05:18:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf5Bb-0003Fs-HP for help-gnu-emacs@gnu.org; Wed, 22 May 2013 05:18:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf5BW-0006wx-OG for help-gnu-emacs@gnu.org; Wed, 22 May 2013 05:18:19 -0400 Original-Received: from mail-pb0-x229.google.com ([2607:f8b0:400e:c01::229]:37650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf5BW-0006vM-Hm for help-gnu-emacs@gnu.org; Wed, 22 May 2013 05:18:14 -0400 Original-Received: by mail-pb0-f41.google.com with SMTP id xb12so1512530pbc.14 for ; Wed, 22 May 2013 02:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=03AnjIDyrYgoBkMOJda6pYt9jHv8PTFXeSA0Q3KMPLk=; b=CxV4SKTqoepOqsYZE+8IPUQuCVfBRK8dI5EmoGl93Cae/ssl3zKxD0pP/qXOeO9EMe 0V1bD+uVb71g3QmoKlIwyBgo6e12vDidH3/xdCRT9z3NrAMO2XSfLsZkJoPPUMFIBZYS qsrnUQxc3c20A3uD1wagG2DQuAXVH13iO/am8ovqz6aCT4X3BEQnhkbjL7OomD44+yRy eCFg/Caulg6jLP2wt3FgQ/jY2oR7s0QjtLfSsYfCUfjbxrxCvV2vLyeFc1JKkLy2gAMK QSemjbcmxOfE2k5TLR4wulMXokvU2xYbDLFGNtIzoarhFaY5B8AVYxqN+hVXkb68+abf Vy4Q== X-Received: by 10.68.222.74 with SMTP id qk10mr6867824pbc.58.1369214293381; Wed, 22 May 2013 02:18:13 -0700 (PDT) Original-Received: from debian-6.05 ([101.63.165.74]) by mx.google.com with ESMTPSA id v7sm6480777pbq.32.2013.05.22.02.18.09 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 22 May 2013 02:18:12 -0700 (PDT) In-Reply-To: <877gircr8b.fsf@gmail.com> (Thorsten Jolitz's message of "Wed, 22 May 2013 11:13:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90975 Archived-At: C-h f save-restriction You will find plenty of examples in Orgmode codebase. Thorsten Jolitz writes: > Hi List, > > I wonder if there is something like a 'save-excursion' for outline > visibility around? A kind of 'save-outline-visibility' function/macro > that would enable to change visibility state of an outlined buffer, do > some actions that depend on that visibility state in a program, and go > back to that exact state of folded and unfolded subtrees afterwards. > > I'm not talking about global visibility cycling, more about something > similar to what window managers do - go from one complicated visibility > state to another (maybe simple) state (like show-all or hide-all), but > be able to go back to that complicated state with exactly the same > subtrees folded or unfolded like before.