From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Save-excursion that works with org visibility? Date: Sat, 13 May 2017 21:05:44 -0400 Message-ID: <87inl4qmc7.fsf@kyleam.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9hyn-0007N3-Gq for emacs-orgmode@gnu.org; Sat, 13 May 2017 21:05:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9hyk-0000f6-BR for emacs-orgmode@gnu.org; Sat, 13 May 2017 21:05:49 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:65114 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d9hyj-0000dw-UF for emacs-orgmode@gnu.org; Sat, 13 May 2017 21:05:46 -0400 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" To: Nikolay Kudryavtsev , emacs-orgmode@gnu.org Nikolay Kudryavtsev writes: > Is there any way to modify node visibility and then revert those > changes? In particular I'm interested in doing and then reverting > (org-content). If you pass a non-nil value for the INVISIBLE-OK argument of outline-up-heading, I think that your function should work without the org-content call. Also, it might be worth replacing outline-up-heading with org-up-heading-safe, which should be faster. -- Kyle