Function: allout-copy-exposed-to-buffer

allout-copy-exposed-to-buffer is an interactive and byte-compiled function defined in allout.el.gz.

Signature

(allout-copy-exposed-to-buffer &optional ARG TOBUF FORMAT)

Documentation

Duplicate exposed portions of current outline to another buffer.

Other buffer has current buffers name with " exposed" appended to it.

With repeat count, copy the exposed parts of only the current topic.

Optional second arg TOBUF is target buffer name.

Optional third arg FORMAT, if non-nil, symbolically designates an alternate presentation format for the outline:

 flat - Convert topic header prefixes to numeric
section.subsection... identifiers.
 indent - Convert header prefixes to all white space, except for
distinctive bullets.
 indent-flat - The best of both - only the first of each level has
the full path, the rest have only the section number
of the leaf, preceded by the right amount of indentation.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-copy-exposed-to-buffer (&optional arg tobuf format)
(defun allout-copy-exposed-to-buffer (&optional arg tobuf format)
  "Duplicate exposed portions of current outline to another buffer.

Other buffer has current buffers name with \" exposed\" appended to it.

With repeat count, copy the exposed parts of only the current topic.

Optional second arg TOBUF is target buffer name.

Optional third arg FORMAT, if non-nil, symbolically designates an
alternate presentation format for the outline:

 `flat'   - Convert topic header prefixes to numeric
	    section.subsection... identifiers.
 `indent' - Convert header prefixes to all white space, except for
	    distinctive bullets.
 `indent-flat' - The best of both - only the first of each level has
		 the full path, the rest have only the section number
		 of the leaf, preceded by the right amount of indentation."

  (interactive "P")
  (if (not tobuf)
      (setq tobuf (get-buffer-create (concat "*" (buffer-name) " exposed*"))))
  (let* ((start-pt (point))
	 (beg (if arg (allout-back-to-current-heading) (point-min)))
	 (end (if arg (allout-end-of-current-subtree) (point-max)))
	 (buf (current-buffer))
	 ) ;; (start-list ())
    (if (eq format 'flat)
	(setq format (if arg (save-excursion
				   (goto-char beg)
				   (allout-topic-flat-index))
			   '(1))))
    (with-current-buffer tobuf (erase-buffer))
    (allout-process-exposed 'allout-insert-listified
			     beg
			     end
			     (current-buffer)
			     tobuf
			     format nil) ;; start-list
    (goto-char (point-min))
    (pop-to-buffer buf)
    (goto-char start-pt)))