Function: allout-shift-out
allout-shift-out is an interactive and byte-compiled function defined
in allout.el.gz.
Signature
(allout-shift-out ARG)
Documentation
Decrease depth of current heading and any topics collapsed within it.
This will make the item a sibling of its former container.
With a negative argument, the item is shifted in using
allout-shift-in, instead.
With an argument greater than one, shift-out the item's offspring but not the item itself, making the former children siblings of the item.
With an argument greater than 1, the item's offspring are shifted out without shifting the item. This will make the immediate subtopics into siblings of the item.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_ > allout-shift-out (arg)
(defun allout-shift-out (arg)
"Decrease depth of current heading and any topics collapsed within it.
This will make the item a sibling of its former container.
With a negative argument, the item is shifted in using
`allout-shift-in', instead.
With an argument greater than one, shift-out the item's offspring
but not the item itself, making the former children siblings of
the item.
With an argument greater than 1, the item's offspring are shifted
out without shifting the item. This will make the immediate
subtopics into siblings of the item."
(interactive "p")
(if (< arg 0)
(allout-shift-in (* arg -1))
;; Get proper exposure in this area:
(save-excursion (if (allout-ascend)
(allout-show-children)))
;; Show collapsed children if there's a successor which will become
;; their sibling:
(if (and (allout-current-topic-collapsed-p)
(save-excursion (allout-next-sibling)))
(allout-show-children))
(let ((where (and (allout-depth) allout-recent-prefix-beginning)))
(save-excursion
(if (> arg 1)
;; Shift the offspring but not the topic:
(let ((children-chart (allout-chart-subtree 1)))
(if (listp (car children-chart))
;; whoops:
(setq children-chart (flatten-tree children-chart)))
(save-excursion
(dolist (child-point children-chart)
(goto-char child-point)
(allout-shift-out 1))))
(allout-rebullet-topic (* arg -1))))
(run-hook-with-args 'allout-structure-shifted-functions (* arg -1) where))))