emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] how does invisibility impact org?


From: John Kitchin
Subject: Re: [O] how does invisibility impact org?
Date: Tue, 26 Apr 2016 14:47:03 -0400

normally I would use narrowing, but I want to see all the verses in the document at once., so I was going to make all the other text temporarily invisible.

John

-----------------------------------
Professor John Kitchin 
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803

On Tue, Apr 26, 2016 at 2:36 PM, Rasmus <address@hidden> wrote:
John Kitchin <address@hidden> 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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]