From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: how does invisibility impact org? Date: Tue, 26 Apr 2016 20:36:26 +0200 Message-ID: <87h9eop68l.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1av7qu-0004j0-5a for emacs-orgmode@gnu.org; Tue, 26 Apr 2016 14:36:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1av7qq-0004Lg-2N for emacs-orgmode@gnu.org; Tue, 26 Apr 2016 14:36:52 -0400 Received: from plane.gmane.org ([80.91.229.3]:33593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1av7qp-0004LZ-St for emacs-orgmode@gnu.org; Tue, 26 Apr 2016 14:36:48 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1av7qo-0000aY-Tz for emacs-orgmode@gnu.org; Tue, 26 Apr 2016 20:36:46 +0200 Received: from 46.166.138.163 ([46.166.138.163]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Apr 2016 20:36:46 +0200 Received: from rasmus by 46.166.138.163 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Apr 2016 20:36:46 +0200 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: emacs-orgmode@gnu.org John Kitchin writes: > Hi, I am trying to use this code to make parts of an org-file that are > not a verse block invisible. That part works fine, and I can also unhide > it. However, after that, I get errors like Isn't this the job of narrowing and widening? Though I guess this could only show one verse block at the time. I.e. use something like this: (defun narrow-to-next-verse () (interactive) (widen) (let ((next-elm (search-forward-regexp "^#\\+BEGIN_VERSE" nil t))) (when next-elm (widen) (goto-char next-elm) (org-narrow-to-element) (goto-char (point-min)) (forward-line)))) Rasmus -- Hooray!