Function: allout-shift-in
allout-shift-in is an interactive and byte-compiled function defined
in allout.el.gz.
Signature
(allout-shift-in ARG)
Documentation
Increase depth of current heading and any items collapsed within it.
With a negative argument, the item is shifted out using
allout-shift-out, instead.
With an argument greater than one, shift-in the item but not its offspring, making the item into a sibling of its former children, and a child of sibling that formerly preceded it.
You are not allowed to shift the first offspring of a topic inwards, because that would yield a "containment discontinuity", where the depth difference between a topic and its immediate offspring is greater than one. The first topic in the file can be adjusted to any positive depth, however.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_ > allout-shift-in (arg)
(defun allout-shift-in (arg)
"Increase depth of current heading and any items collapsed within it.
With a negative argument, the item is shifted out using
`allout-shift-out', instead.
With an argument greater than one, shift-in the item but not its
offspring, making the item into a sibling of its former children,
and a child of sibling that formerly preceded it.
You are not allowed to shift the first offspring of a topic
inwards, because that would yield a \"containment
discontinuity\", where the depth difference between a topic and
its immediate offspring is greater than one. The first topic in
the file can be adjusted to any positive depth, however."
(interactive "p")
(if (< arg 0)
(allout-shift-out (* arg -1))
;; refuse to create a containment discontinuity:
(save-excursion
(allout-back-to-current-heading)
(if (not (bobp))
(let* ((current-depth allout-recent-depth)
(start-point (point))
(predecessor-depth (progn
(forward-char -1)
(allout-goto-prefix-doublechecked)
(if (< (point) start-point)
allout-recent-depth
0))))
(if (and (> predecessor-depth 0)
(> (1+ current-depth)
(1+ predecessor-depth)))
(error (concat "Disallowed shift deeper than"
" containing topic's children."))
(allout-back-to-current-heading)
(if (< allout-recent-depth (1+ current-depth))
(allout-show-children))))))
(let ((where (point)))
(allout-rebullet-topic 1 (and (> arg 1) 'sans-offspring))
(run-hook-with-args 'allout-structure-shifted-functions arg where))))