Function: allout-show-to-offshoot

allout-show-to-offshoot is an interactive and byte-compiled function defined in allout.el.gz.

Signature

(allout-show-to-offshoot)

Documentation

Like allout-show-entry, but reveals all concealed ancestors, as well.

Useful for coherently exposing to a random point in a hidden region.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-show-to-offshoot ()
(defun allout-show-to-offshoot ()
  "Like `allout-show-entry', but reveals all concealed ancestors, as well.

Useful for coherently exposing to a random point in a hidden region."
  (interactive)
  (save-excursion
    (let ((inhibit-field-text-motion t)
          (orig-pt (point))
	  (orig-pref (allout-goto-prefix-doublechecked))
	  (last-at (point))
	  (bag-it 0))
      (while (or (> bag-it 1) (allout-hidden-p))
        (while (allout-hidden-p)
          (move-beginning-of-line 1)
          (if (allout-hidden-p) (forward-char -1)))
	(if (= last-at (setq last-at (point)))
	    ;; Oops, we're not making any progress!  Show the current topic
	    ;; completely, and try one more time here, if we haven't already.
	    (progn (beginning-of-line)
		   (allout-show-current-subtree)
		   (goto-char orig-pt)
		   (setq bag-it (1+ bag-it))
                   (if (> bag-it 1)
                       (error "allout-show-to-offshoot: %s"
                              "Stumped by aberrant nesting")))
          (if (> bag-it 0) (setq bag-it 0))
          (allout-show-children)
          (goto-char orig-pref)))
      (goto-char orig-pt)))
  (if (allout-hidden-p)
      (allout-show-entry)))