comparison lisp/allout.el @ 74381:cba6f2b24720

Ken Manheimer <ken.manheimer@gmail.com>: (allout-ascend): Add an optional argument to preserve original position of point when unsuccessful. Also, fix a docstring error. (allout-yank-processing): Fix depth shift of multiple-topic so yanks work again, using allout-ascend's new option. (allout-setup-mode-map): Extracted from allout-mode to initialize allout-mode-map. Call it on file load, so the mode docstring substitutions work even if allout mode has not yet been invoked. (allout-mode): Use new allout-setup-mode-map to track any keybinding customizations since the map was last processed. Also, refine the docstring so it's ship-shape for release. (allout-default-layout, allout-beginning-of-line-cycles) (allout-distinctive-bullets-string, allout-use-mode-specific-leader) (allout-encrypt-unencrypted-on-saves, allout-inhibit-auto-fill) (allout-version, allout-layout, allout-infer-body-reindent) (allout-infer-header-lead-and-primary-bullet, allout-view-change-hook) (allout-init, allout-mode, allout-next-heading, allout-chart-subtree) (allout-previous-heading, allout-goto-prefix-doublechecked) (allout-current-bullet-pos, allout-next-sibling-leap) (allout-pre-command-business, allout-encrypted-type-prefix) (allout-make-topic-prefix, allout-open-topic, allout-rebullet-heading) (allout-rebullet-topic, allout-rebullet-topic-grunt) (allout-flag-region, allout-expose-topic, allout-expose-topic) (allout-old-expose-topic, allout-listify-exposed) (allout-process-exposed, allout-latex-verb-quote) (allout-latex-verbatim-quote-curr-line, allout-adjust-file-variable) (allout-toggle-current-subtree-encryption) (allout-toggle-subtree-encryption, allout-bullet-isearch): Remove extraneous open-paren and close paren string escapes.
author Kim F. Storm <storm@cua.dk>
date Sun, 03 Dec 2006 21:37:33 +0000
parents cce8c092567f
children e97d916ee47b f1d13e615070
comparison
equal deleted inserted replaced
74380:354d073c5833 74381:cba6f2b24720
160 number, but do not force already opened subtopics to be closed. 160 number, but do not force already opened subtopics to be closed.
161 - 0 means to close topic - hide all subitems. 161 - 0 means to close topic - hide all subitems.
162 : - repeat spec - apply the preceeding element to all siblings at 162 : - repeat spec - apply the preceeding element to all siblings at
163 current level, *up to* those siblings that would be covered by specs 163 current level, *up to* those siblings that would be covered by specs
164 following the `:' on the list. Ie, apply to all topics at level but 164 following the `:' on the list. Ie, apply to all topics at level but
165 trailing ones accounted for by trailing specs. \(Only the first of 165 trailing ones accounted for by trailing specs. (Only the first of
166 multiple colons at the same level is honored - later ones are ignored.) 166 multiple colons at the same level is honored - later ones are ignored.)
167 * - completely exposes the topic, including bodies 167 * - completely exposes the topic, including bodies
168 + - exposes all subtopics, but not the bodies 168 + - exposes all subtopics, but not the bodies
169 - - exposes the body of the corresponding topic, but not subtopics 169 - - exposes the body of the corresponding topic, but not subtopics
170 list - a nested layout spec, to be applied intricately to its 170 list - a nested layout spec, to be applied intricately to its
228 - if the cursor is on the first column of a non-headline body line: 228 - if the cursor is on the first column of a non-headline body line:
229 then it goes to the start of the headline within the item body 229 then it goes to the start of the headline within the item body
230 - if the cursor is on the headline and not the start of the headline: 230 - if the cursor is on the headline and not the start of the headline:
231 then it goes to the start of the headline 231 then it goes to the start of the headline
232 - if the cursor is on the start of the headline: 232 - if the cursor is on the start of the headline:
233 then it goes to the bullet character \(for hotspot navigation\) 233 then it goes to the bullet character (for hotspot navigation)
234 - if the cursor is on the bullet character: 234 - if the cursor is on the bullet character:
235 then it goes to the first column of that line \(the headline\) 235 then it goes to the first column of that line (the headline)
236 - if the cursor is on the first column of the headline: 236 - if the cursor is on the first column of the headline:
237 then it goes to the start of the headline within the item body. 237 then it goes to the start of the headline within the item body.
238 238
239 In this fashion, you can use the beginning-of-line command to do 239 In this fashion, you can use the beginning-of-line command to do
240 its normal job and then, when repeated, advance through the 240 its normal job and then, when repeated, advance through the
322 (defcustom allout-distinctive-bullets-string "*+-=>()[{}&!?#%\"X@$~_\\:;^" 322 (defcustom allout-distinctive-bullets-string "*+-=>()[{}&!?#%\"X@$~_\\:;^"
323 "*Persistent outline header bullets used to distinguish special topics. 323 "*Persistent outline header bullets used to distinguish special topics.
324 324
325 These bullets are used to distinguish topics from the run-of-the-mill 325 These bullets are used to distinguish topics from the run-of-the-mill
326 ones. They are not used in the standard topic headers created by 326 ones. They are not used in the standard topic headers created by
327 the topic-opening, shifting, and rebulleting \(eg, on topic shift, 327 the topic-opening, shifting, and rebulleting (eg, on topic shift,
328 topic paste, blanket rebulleting) routines, but are offered among the 328 topic paste, blanket rebulleting) routines, but are offered among the
329 choices for rebulleting. They are not altered by the above automatic 329 choices for rebulleting. They are not altered by the above automatic
330 rebulleting, so they can be used to characterize topics, eg: 330 rebulleting, so they can be used to characterize topics, eg:
331 331
332 `?' question topics 332 `?' question topics
333 `\(' parenthetic comment \(with a matching close paren inside) 333 `(' parenthetic comment (with a matching close paren inside)
334 `[' meta-note \(with a matching close ] inside) 334 `[' meta-note (with a matching close ] inside)
335 `\"' a quotation 335 `\"' a quotation
336 `=' value settings 336 `=' value settings
337 `~' \"more or less\" 337 `~' \"more or less\"
338 `^' see above 338 `^' see above
339 339
365 365
366 String values are used as literals, not regular expressions, so 366 String values are used as literals, not regular expressions, so
367 do not escape any regulare-expression characters. 367 do not escape any regulare-expression characters.
368 368
369 Value t means to first check for assoc value in `allout-mode-leaders' 369 Value t means to first check for assoc value in `allout-mode-leaders'
370 alist, then use comment-start string, if any, then use default \(`.'). 370 alist, then use comment-start string, if any, then use default (`.').
371 \(See note about use of comment-start strings, below.) 371 \(See note about use of comment-start strings, below.)
372 372
373 Set to the symbol for either of `allout-mode-leaders' or 373 Set to the symbol for either of `allout-mode-leaders' or
374 `comment-start' to use only one of them, respectively. 374 `comment-start' to use only one of them, respectively.
375 375
376 Value nil means to always use the default \(`.') and leave 376 Value nil means to always use the default (`.') and leave
377 `allout-primary-bullet' unaltered. 377 `allout-primary-bullet' unaltered.
378 378
379 comment-start strings that do not end in spaces are tripled in 379 comment-start strings that do not end in spaces are tripled in
380 the header-prefix, and an `_' underscore is tacked on the end, to 380 the header-prefix, and an `_' underscore is tacked on the end, to
381 distinguish them from regular comment strings. comment-start 381 distinguish them from regular comment strings. comment-start
603 603
604 The idea is to prevent file-system exposure of any un-encrypted stuff, and 604 The idea is to prevent file-system exposure of any un-encrypted stuff, and
605 mostly covers both deliberate file writes and auto-saves. 605 mostly covers both deliberate file writes and auto-saves.
606 606
607 - Yes: encrypt all topics pending encryption, even if it's the one 607 - Yes: encrypt all topics pending encryption, even if it's the one
608 currently being edited. \(In that case, the currently edited topic 608 currently being edited. (In that case, the currently edited topic
609 will be automatically decrypted before any user interaction, so they 609 will be automatically decrypted before any user interaction, so they
610 can continue editing but the copy on the file system will be 610 can continue editing but the copy on the file system will be
611 encrypted.) 611 encrypted.)
612 Auto-saves will use the \"All except current topic\" mode if this 612 Auto-saves will use the \"All except current topic\" mode if this
613 one is selected, to avoid practical difficulties - see below. 613 one is selected, to avoid practical difficulties - see below.
617 passphrase in the middle of editing for, eg, autosaves. 617 passphrase in the middle of editing for, eg, autosaves.
618 This mode is used for auto-saves for both this option and \"Yes\". 618 This mode is used for auto-saves for both this option and \"Yes\".
619 - No: leave it to the user to encrypt any unencrypted topics. 619 - No: leave it to the user to encrypt any unencrypted topics.
620 620
621 For practical reasons, auto-saves always use the 'except-current policy 621 For practical reasons, auto-saves always use the 'except-current policy
622 when auto-encryption is enabled. \(Otherwise, spurious passphrase prompts 622 when auto-encryption is enabled. (Otherwise, spurious passphrase prompts
623 and unavoidable timing collisions are too disruptive.) If security for a 623 and unavoidable timing collisions are too disruptive.) If security for a
624 file requires that even the current topic is never auto-saved in the clear, 624 file requires that even the current topic is never auto-saved in the clear,
625 disable auto-saves for that file." 625 disable auto-saves for that file."
626 626
627 :type '(choice (const :tag "Yes" t) 627 :type '(choice (const :tag "Yes" t)
715 (defcustom allout-inhibit-auto-fill nil 715 (defcustom allout-inhibit-auto-fill nil
716 "*If non-nil, auto-fill will be inhibited in the allout buffers. 716 "*If non-nil, auto-fill will be inhibited in the allout buffers.
717 717
718 You can customize this setting to set it for all allout buffers, or set it 718 You can customize this setting to set it for all allout buffers, or set it
719 in individual buffers if you want to inhibit auto-fill only in particular 719 in individual buffers if you want to inhibit auto-fill only in particular
720 buffers. \(You could use a function on `allout-mode-hook' to inhibit 720 buffers. (You could use a function on `allout-mode-hook' to inhibit
721 auto-fill according, eg, to the major mode.\) 721 auto-fill according, eg, to the major mode.)
722 722
723 If you don't set this and auto-fill-mode is enabled, allout will use the 723 If you don't set this and auto-fill-mode is enabled, allout will use the
724 value that `normal-auto-fill-function', if any, when allout mode starts, or 724 value that `normal-auto-fill-function', if any, when allout mode starts, or
725 else allout's special hanging-indent maintaining auto-fill function, 725 else allout's special hanging-indent maintaining auto-fill function,
726 `allout-auto-fill'." 726 `allout-auto-fill'."
781 781
782 ;;;_ #1 Internal Outline Formatting and Configuration 782 ;;;_ #1 Internal Outline Formatting and Configuration
783 ;;;_ : Version 783 ;;;_ : Version
784 ;;;_ = allout-version 784 ;;;_ = allout-version
785 (defvar allout-version "2.2.1" 785 (defvar allout-version "2.2.1"
786 "Version of currently loaded outline package. \(allout.el)") 786 "Version of currently loaded outline package. (allout.el)")
787 ;;;_ > allout-version 787 ;;;_ > allout-version
788 (defun allout-version (&optional here) 788 (defun allout-version (&optional here)
789 "Return string describing the loaded outline version." 789 "Return string describing the loaded outline version."
790 (interactive "P") 790 (interactive "P")
791 (let ((msg (concat "Allout Outline Mode v " allout-version))) 791 (let ((msg (concat "Allout Outline Mode v " allout-version)))
798 (make-variable-buffer-local 'allout-mode) 798 (make-variable-buffer-local 'allout-mode)
799 ;;;_ = allout-layout nil 799 ;;;_ = allout-layout nil
800 (defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL - see docstring. 800 (defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL - see docstring.
801 "Buffer-specific setting for allout layout. 801 "Buffer-specific setting for allout layout.
802 802
803 In buffers where this is non-nil \(and if `allout-init' has been run, to 803 In buffers where this is non-nil (and if `allout-init' has been run, to
804 enable this behavior), `allout-mode' will be automatically activated. The 804 enable this behavior), `allout-mode' will be automatically activated. The
805 layout dictated by the value will be used to set the initial exposure when 805 layout dictated by the value will be used to set the initial exposure when
806 `allout-mode' is activated. 806 `allout-mode' is activated.
807 807
808 \*You should not setq-default this variable non-nil unless you want every 808 \*You should not setq-default this variable non-nil unless you want every
810 810
811 The value would typically be set by a file local variable. For 811 The value would typically be set by a file local variable. For
812 example, the following lines at the bottom of an Emacs Lisp file: 812 example, the following lines at the bottom of an Emacs Lisp file:
813 813
814 ;;;Local variables: 814 ;;;Local variables:
815 ;;;allout-layout: \(0 : -1 -1 0) 815 ;;;allout-layout: (0 : -1 -1 0)
816 ;;;End: 816 ;;;End:
817 817
818 dictate activation of `allout-mode' mode when the file is visited 818 dictate activation of `allout-mode' mode when the file is visited
819 \(presuming allout-init was already run), followed by the 819 \(presuming allout-init was already run), followed by the
820 equivalent of `\(allout-expose-topic 0 : -1 -1 0)'. \(This is 820 equivalent of `(allout-expose-topic 0 : -1 -1 0)'. (This is
821 the layout used for the allout.el source file.) 821 the layout used for the allout.el source file.)
822 822
823 `allout-default-layout' describes the specification format. 823 `allout-default-layout' describes the specification format.
824 `allout-layout' can additionally have the value `t', in which 824 `allout-layout' can additionally have the value `t', in which
825 case the value of `allout-default-layout' is used.") 825 case the value of `allout-default-layout' is used.")
928 `comment-start' 928 `comment-start'
929 `allout-header-prefix' (default) 929 `allout-header-prefix' (default)
930 `allout-use-mode-specific-leader' 930 `allout-use-mode-specific-leader'
931 and `allout-mode-leaders'. 931 and `allout-mode-leaders'.
932 932
933 Apply this via \(re)activation of `allout-mode', rather than 933 Apply this via (re)activation of `allout-mode', rather than
934 invoking it directly." 934 invoking it directly."
935 (let* ((use-leader (and (boundp 'allout-use-mode-specific-leader) 935 (let* ((use-leader (and (boundp 'allout-use-mode-specific-leader)
936 (if (or (stringp allout-use-mode-specific-leader) 936 (if (or (stringp allout-use-mode-specific-leader)
937 (memq allout-use-mode-specific-leader 937 (memq allout-use-mode-specific-leader
938 '(allout-mode-leaders 938 '(allout-mode-leaders
975 'allout-infer-header-lead-and-primary-bullet) 975 'allout-infer-header-lead-and-primary-bullet)
976 ;;;_ > allout-infer-body-reindent () 976 ;;;_ > allout-infer-body-reindent ()
977 (defun allout-infer-body-reindent () 977 (defun allout-infer-body-reindent ()
978 "Determine proper setting for `allout-reindent-bodies'. 978 "Determine proper setting for `allout-reindent-bodies'.
979 979
980 Depends on default setting of `allout-reindent-bodies' \(which see) 980 Depends on default setting of `allout-reindent-bodies' (which see)
981 and presence of setting for `comment-start', to tell whether the 981 and presence of setting for `comment-start', to tell whether the
982 file is programming code." 982 file is programming code."
983 (if (and allout-reindent-bodies 983 (if (and allout-reindent-bodies
984 comment-start 984 comment-start
985 (not (eq 'force allout-reindent-bodies))) 985 (not (eq 'force allout-reindent-bodies)))
1293 ;;;_ = allout-exposure-category 1293 ;;;_ = allout-exposure-category
1294 (defvar allout-exposure-category nil 1294 (defvar allout-exposure-category nil
1295 "Symbol for use as allout invisible-text overlay category.") 1295 "Symbol for use as allout invisible-text overlay category.")
1296 ;;;_ x allout-view-change-hook 1296 ;;;_ x allout-view-change-hook
1297 (defvar allout-view-change-hook nil 1297 (defvar allout-view-change-hook nil
1298 "*\(Deprecated\) A hook run after allout outline exposure changes. 1298 "*(Deprecated) A hook run after allout outline exposure changes.
1299 1299
1300 Switch to using `allout-exposure-change-hook' instead. Both hooks are 1300 Switch to using `allout-exposure-change-hook' instead. Both hooks are
1301 currently respected, but the other conveys the details of the exposure 1301 currently respected, but the other conveys the details of the exposure
1302 change via explicit parameters, and this one will eventually be disabled in 1302 change via explicit parameters, and this one will eventually be disabled in
1303 a subsequent allout version.") 1303 a subsequent allout version.")
1529 (defun allout-init (&optional mode) 1529 (defun allout-init (&optional mode)
1530 "Prime `allout-mode' to enable/disable auto-activation, wrt `allout-layout'. 1530 "Prime `allout-mode' to enable/disable auto-activation, wrt `allout-layout'.
1531 1531
1532 MODE is one of the following symbols: 1532 MODE is one of the following symbols:
1533 1533
1534 - nil \(or no argument) deactivate auto-activation/layout; 1534 - nil (or no argument) deactivate auto-activation/layout;
1535 - `activate', enable auto-activation only; 1535 - `activate', enable auto-activation only;
1536 - `ask', enable auto-activation, and enable auto-layout but with 1536 - `ask', enable auto-activation, and enable auto-layout but with
1537 confirmation for layout operation solicited from user each time; 1537 confirmation for layout operation solicited from user each time;
1538 - `report', just report and return the current auto-activation state; 1538 - `report', just report and return the current auto-activation state;
1539 - anything else \(eg, t) for auto-activation and auto-layout, without 1539 - anything else (eg, t) for auto-activation and auto-layout, without
1540 any confirmation check. 1540 any confirmation check.
1541 1541
1542 Use this function to setup your Emacs session for automatic activation 1542 Use this function to setup your Emacs session for automatic activation
1543 of allout outline mode, contingent to the buffer-specific setting of 1543 of allout outline mode, contingent to the buffer-specific setting of
1544 the `allout-layout' variable. (See `allout-layout' and 1544 the `allout-layout' variable. (See `allout-layout' and
1596 ;; Return the current mode setting: 1596 ;; Return the current mode setting:
1597 (allout-init mode)) 1597 (allout-init mode))
1598 ((eq mode 'ask) 1598 ((eq mode 'ask)
1599 (message 1599 (message
1600 (concat "Outline mode auto-activation and " 1600 (concat "Outline mode auto-activation and "
1601 "-layout \(upon confirmation) enabled.")) 1601 "-layout (upon confirmation) enabled."))
1602 'ask) 1602 'ask)
1603 ((message 1603 ((message
1604 "Outline mode auto-activation and -layout enabled.") 1604 "Outline mode auto-activation and -layout enabled.")
1605 'full))))))) 1605 'full)))))))
1606 ;;;_ > allout-setup-menubar () 1606 ;;;_ > allout-setup-menubar ()
1647 symbol. Allout outline mode always runs as a minor mode. 1647 symbol. Allout outline mode always runs as a minor mode.
1648 1648
1649 Allout outline mode provides extensive outline oriented formatting and 1649 Allout outline mode provides extensive outline oriented formatting and
1650 manipulation. It enables structural editing of outlines, as well as 1650 manipulation. It enables structural editing of outlines, as well as
1651 navigation and exposure. It also is specifically aimed at 1651 navigation and exposure. It also is specifically aimed at
1652 accommodating syntax-sensitive text like programming languages. \(For 1652 accommodating syntax-sensitive text like programming languages. (For
1653 an example, see the allout code itself, which is organized as an allout 1653 an example, see the allout code itself, which is organized as an allout
1654 outline.) 1654 outline.)
1655 1655
1656 In addition to outline navigation and exposure, allout includes: 1656 In addition to typical outline navigation and exposure, allout includes:
1657 1657
1658 - topic-oriented repositioning, promotion/demotion, cut, and paste 1658 - topic-oriented authoring, including keystroke-based topic creation,
1659 - integral outline exposure-layout 1659 repositioning, promotion/demotion, cut, and paste
1660 - incremental search with dynamic exposure and reconcealment of hidden text 1660 - incremental search with dynamic exposure and reconcealment of hidden text
1661 - automatic topic-number maintenance 1661 - adjustable format, so programming code can be developed in outline-structure
1662 - easy topic encryption and decryption 1662 - easy topic encryption and decryption
1663 - \"Hot-spot\" operation, for single-keystroke maneuvering and 1663 - \"Hot-spot\" operation, for single-keystroke maneuvering and exposure control
1664 exposure control. \(See the allout-mode docstring.) 1664 - integral outline layout, for automatic initial exposure when visiting a file
1665 - independent extensibility, using comprehensive exposure and authoring hooks
1665 1666
1666 and many other features. 1667 and many other features.
1667 1668
1668 Below is a description of the bindings, and then explanation of 1669 Below is a description of the key bindings, and then explanation of
1669 special `allout-mode' features and terminology. See also the outline 1670 special `allout-mode' features and terminology. See also the outline
1670 menubar additions for quick reference to many of the features, and see 1671 menubar additions for quick reference to many of the features, and see
1671 the docstring of the function `allout-init' for instructions on 1672 the docstring of the function `allout-init' for instructions on
1672 priming your emacs session for automatic activation of `allout-mode'. 1673 priming your emacs session for automatic activation of `allout-mode'.
1673 1674
1674 1675 The bindings are dictated by the customizable `allout-keybindings-list'
1675 The bindings are dictated by the `allout-keybindings-list' and 1676 variable. We recommend customizing `allout-command-prefix' to use just
1676 `allout-command-prefix' variables. 1677 `\\C-c' as the command prefix, if the allout bindings don't conflict with
1677 1678 any personal bindings you have on \\C-c. In any case, outline structure
1678 Navigation: Exposure Control: 1679 navigation and authoring is simplified by positioning the cursor on an
1679 ---------- ---------------- 1680 item's bullet character, the \"hot-spot\" - then you can invoke allout
1680 \\[allout-next-visible-heading] allout-next-visible-heading | \\[allout-hide-current-subtree] allout-hide-current-subtree 1681 commands with just the un-prefixed, un-control-shifted command letters.
1681 \\[allout-previous-visible-heading] allout-previous-visible-heading | \\[allout-show-children] allout-show-children 1682 This is described further in the HOT-SPOT Operation section.
1682 \\[allout-up-current-level] allout-up-current-level | \\[allout-show-current-subtree] allout-show-current-subtree 1683
1683 \\[allout-forward-current-level] allout-forward-current-level | \\[allout-show-current-entry] allout-show-current-entry 1684 Exposure Control:
1684 \\[allout-backward-current-level] allout-backward-current-level | \\[allout-show-all] allout-show-all 1685 ----------------
1685 \\[allout-end-of-entry] allout-end-of-entry 1686 \\[allout-hide-current-subtree] `allout-hide-current-subtree'
1686 \\[allout-beginning-of-current-entry] allout-beginning-of-current-entry, alternately, goes to hot-spot 1687 \\[allout-show-children] `allout-show-children'
1687 1688 \\[allout-show-current-subtree] `allout-show-current-subtree'
1688 Topic Header Production: 1689 \\[allout-show-current-entry] `allout-show-current-entry'
1689 ----------------------- 1690 \\[allout-show-all] `allout-show-all'
1690 \\[allout-open-sibtopic] allout-open-sibtopic Create a new sibling after current topic. 1691
1691 \\[allout-open-subtopic] allout-open-subtopic ... an offspring of current topic. 1692 Navigation:
1692 \\[allout-open-supertopic] allout-open-supertopic ... a sibling of the current topic's parent. 1693 ----------
1693 1694 \\[allout-next-visible-heading] `allout-next-visible-heading'
1694 Topic Level and Prefix Adjustment: 1695 \\[allout-previous-visible-heading] `allout-previous-visible-heading'
1695 --------------------------------- 1696 \\[allout-up-current-level] `allout-up-current-level'
1696 \\[allout-shift-in] allout-shift-in Shift current topic and all offspring deeper. 1697 \\[allout-forward-current-level] `allout-forward-current-level'
1697 \\[allout-shift-out] allout-shift-out ... less deep. 1698 \\[allout-backward-current-level] `allout-backward-current-level'
1698 \\[allout-rebullet-current-heading] allout-rebullet-current-heading Prompt for alternate bullet for 1699 \\[allout-end-of-entry] `allout-end-of-entry'
1699 current topic. 1700 \\[allout-beginning-of-current-entry] `allout-beginning-of-current-entry' (alternately, goes to hot-spot)
1700 \\[allout-rebullet-topic] allout-rebullet-topic Reconcile bullets of topic and its offspring 1701 \\[allout-beginning-of-line] `allout-beginning-of-line' - like regular beginning-of-line, but
1701 - distinctive bullets are not changed, others 1702 if immediately repeated cycles to the beginning of the current item
1702 alternated according to nesting depth. 1703 and then to the hot-spot (if `allout-beginning-of-line-cycles' is set).
1703 \\[allout-number-siblings] allout-number-siblings Number bullets of topic and siblings - the 1704
1704 offspring are not affected. With repeat 1705
1705 count, revoke numbering. 1706 Topic Header Production:
1706 1707 -----------------------
1707 Topic-oriented Killing and Yanking: 1708 \\[allout-open-sibtopic] `allout-open-sibtopic' Create a new sibling after current topic.
1708 ---------------------------------- 1709 \\[allout-open-subtopic] `allout-open-subtopic' ... an offspring of current topic.
1709 \\[allout-kill-topic] allout-kill-topic Kill current topic, including offspring. 1710 \\[allout-open-supertopic] `allout-open-supertopic' ... a sibling of the current topic's parent.
1710 \\[allout-copy-topic-as-kill] allout-copy-topic-as-kill Copy current topic, including offspring. 1711
1711 \\[allout-kill-line] allout-kill-line kill-line, attending to outline structure. 1712 Topic Level and Prefix Adjustment:
1712 \\[allout-copy-line-as-kill] allout-copy-line-as-kill Copy line but don't delete it. 1713 ---------------------------------
1713 \\[allout-yank] allout-yank Yank, adjusting depth of yanked topic to 1714 \\[allout-shift-in] `allout-shift-in' Shift current topic and all offspring deeper
1714 depth of heading if yanking into bare topic 1715 \\[allout-shift-out] `allout-shift-out' ... less deep
1715 heading (ie, prefix sans text). 1716 \\[allout-rebullet-current-heading] `allout-rebullet-current-heading' Prompt for alternate bullet for
1716 \\[allout-yank-pop] allout-yank-pop Is to allout-yank as yank-pop is to yank 1717 current topic
1717 1718 \\[allout-rebullet-topic] `allout-rebullet-topic' Reconcile bullets of topic and
1718 Topic-oriented Encryption: 1719 its' offspring - distinctive bullets are not changed, others
1719 ------------------------- 1720 are alternated according to nesting depth.
1720 \\[allout-toggle-current-subtree-encryption] allout-toggle-current-subtree-encryption Encrypt/Decrypt topic content 1721 \\[allout-number-siblings] `allout-number-siblings' Number bullets of topic and siblings -
1721 1722 the offspring are not affected.
1722 Misc commands: 1723 With repeat count, revoke numbering.
1723 ------------- 1724
1724 M-x outlineify-sticky Activate outline mode for current buffer, 1725 Topic-oriented Killing and Yanking:
1725 and establish a default file-var setting 1726 ----------------------------------
1726 for `allout-layout'. 1727 \\[allout-kill-topic] `allout-kill-topic' Kill current topic, including offspring.
1727 \\[allout-mark-topic] allout-mark-topic 1728 \\[allout-copy-topic-as-kill] `allout-copy-topic-as-kill' Copy current topic, including offspring.
1728 \\[allout-copy-exposed-to-buffer] allout-copy-exposed-to-buffer 1729 \\[allout-kill-line] `allout-kill-line' kill-line, attending to outline structure.
1729 Duplicate outline, sans concealed text, to 1730 \\[allout-copy-line-as-kill] `allout-copy-line-as-kill' Copy line but don't delete it.
1730 buffer with name derived from derived from that 1731 \\[allout-yank] `allout-yank' Yank, adjusting depth of yanked topic to
1731 of current buffer - \"*BUFFERNAME exposed*\". 1732 depth of heading if yanking into bare topic
1732 \\[allout-flatten-exposed-to-buffer] allout-flatten-exposed-to-buffer 1733 heading (ie, prefix sans text).
1733 Like above 'copy-exposed', but convert topic 1734 \\[allout-yank-pop] `allout-yank-pop' Is to allout-yank as yank-pop is to yank
1734 prefixes to section.subsection... numeric 1735
1735 format. 1736 Topic-oriented Encryption:
1736 \\[eval-expression] (allout-init t) Setup Emacs session for outline mode 1737 -------------------------
1737 auto-activation. 1738 \\[allout-toggle-current-subtree-encryption] `allout-toggle-current-subtree-encryption'
1739 Encrypt/Decrypt topic content
1740
1741 Misc commands:
1742 -------------
1743 M-x outlineify-sticky Activate outline mode for current buffer,
1744 and establish a default file-var setting
1745 for `allout-layout'.
1746 \\[allout-mark-topic] `allout-mark-topic'
1747 \\[allout-copy-exposed-to-buffer] `allout-copy-exposed-to-buffer'
1748 Duplicate outline, sans concealed text, to
1749 buffer with name derived from derived from that
1750 of current buffer - \"*BUFFERNAME exposed*\".
1751 \\[allout-flatten-exposed-to-buffer] `allout-flatten-exposed-to-buffer'
1752 Like above 'copy-exposed', but convert topic
1753 prefixes to section.subsection... numeric
1754 format.
1755 \\[eval-expression] (allout-init t) Setup Emacs session for outline mode
1756 auto-activation.
1738 1757
1739 Topic Encryption 1758 Topic Encryption
1740 1759
1741 Outline mode supports gpg encryption of topics, with support for 1760 Outline mode supports gpg encryption of topics, with support for
1742 symmetric and key-pair modes, passphrase timeout, passphrase 1761 symmetric and key-pair modes, passphrase timeout, passphrase
1743 consistency checking, user-provided hinting for symmetric key 1762 consistency checking, user-provided hinting for symmetric key
1744 mode, and auto-encryption of topics pending encryption on save. 1763 mode, and auto-encryption of topics pending encryption on save.
1745 \(Topics pending encryption are, by default, automatically 1764
1746 encrypted during file saves; if you're editing the contents of 1765 Topics pending encryption are, by default, automatically
1747 such a topic, it is automatically decrypted for continued 1766 encrypted during file saves. If the contents of the topic
1748 editing.) The aim is reliable topic privacy while preventing 1767 containing the cursor was encrypted for a save, it is
1749 accidents like neglected encryption before saves, forgetting 1768 automatically decrypted for continued editing.
1750 which passphrase was used, and other practical pitfalls. 1769
1751 1770 The aim of these measures is reliable topic privacy while
1752 See `allout-toggle-current-subtree-encryption' function docstring and 1771 preventing accidents like neglected encryption before saves,
1753 `allout-encrypt-unencrypted-on-saves' customization variable for details. 1772 forgetting which passphrase was used, and other practical
1754 1773 pitfalls.
1755 HOT-SPOT Operation 1774
1775 See `allout-toggle-current-subtree-encryption' function docstring
1776 and `allout-encrypt-unencrypted-on-saves' customization variable
1777 for details.
1778
1779 HOT-SPOT Operation
1756 1780
1757 Hot-spot operation provides a means for easy, single-keystroke outline 1781 Hot-spot operation provides a means for easy, single-keystroke outline
1758 navigation and exposure control. 1782 navigation and exposure control.
1759 1783
1760 When the text cursor is positioned directly on the bullet character of 1784 When the text cursor is positioned directly on the bullet character of
1763 would invoke the command typically bound to \"C-c<space>C-f\" 1787 would invoke the command typically bound to \"C-c<space>C-f\"
1764 \(\\[allout-forward-current-level] `allout-forward-current-level'). 1788 \(\\[allout-forward-current-level] `allout-forward-current-level').
1765 1789
1766 Thus, by positioning the cursor on a topic bullet, you can 1790 Thus, by positioning the cursor on a topic bullet, you can
1767 execute the outline navigation and manipulation commands with a 1791 execute the outline navigation and manipulation commands with a
1768 single keystroke. Regular navigation keys (eg, \\[forward-char], \\[next-line]) never get 1792 single keystroke. Regular navigation keys (eg, \\[forward-char], \\[next-line]) don't get
1769 this special translation, so you can use them to get out of the 1793 this special translation, so you can use them to get out of the
1770 hot-spot and back to normal operation. 1794 hot-spot and back to normal editing operation.
1771 1795
1772 Note that the command `allout-beginning-of-current-entry' \(\\[allout-beginning-of-current-entry]\) 1796 In allout-mode, the normal beginning-of-line command (\\[allout-beginning-of-line]]) is
1773 will move to the hot-spot when the cursor is already located at the 1797 replaced with one that makes it easy to get to the hot-spot. If you
1774 beginning of the current entry, so you usually can hit \\[allout-beginning-of-current-entry] 1798 repeat it immediately it cycles (if `allout-beginning-of-line-cycles'
1775 twice in a row to get to the hot-spot. 1799 is set) to the beginning of the item and then, if you hit it again
1776 1800 immediately, to the hot-spot. Similarly, `allout-beginning-of-current-entry'
1777 Terminology 1801 \(\\[allout-beginning-of-current-entry]) moves to the hot-spot when the cursor is already located
1802 at the beginning of the current entry.
1803
1804 Extending Allout
1805
1806 Allout exposure and authoring activites all have associated
1807 hooks, by which independent code can cooperate with allout
1808 without changes to the allout core. Here are key ones:
1809
1810 `allout-mode-hook'
1811 `allout-mode-deactivate-hook'
1812 `allout-exposure-change-hook'
1813 `allout-structure-added-hook'
1814 `allout-structure-deleted-hook'
1815 `allout-structure-shifted-hook'
1816
1817 Terminology
1778 1818
1779 Topic hierarchy constituents - TOPICS and SUBTOPICS: 1819 Topic hierarchy constituents - TOPICS and SUBTOPICS:
1780 1820
1781 TOPIC: A basic, coherent component of an Emacs outline. It can 1821 ITEM: A unitary outline element, including the HEADER and ENTRY text.
1782 contain and be contained by other topics. 1822 TOPIC: An ITEM and any ITEMs contained within it, ie having greater DEPTH
1783 CURRENT topic: 1823 and with no intervening items of lower DEPTH than the container.
1784 The visible topic most immediately containing the cursor. 1824 CURRENT ITEM:
1785 DEPTH: The degree of nesting of a topic; it increases with 1825 The visible ITEM most immediately containing the cursor.
1786 containment. Also called the: 1826 DEPTH: The degree of nesting of an ITEM; it increases with containment.
1787 LEVEL: The same as DEPTH. 1827 The DEPTH is determined by the HEADER PREFIX. The DEPTH is also
1828 called the:
1829 LEVEL: The same as DEPTH.
1788 1830
1789 ANCESTORS: 1831 ANCESTORS:
1790 The topics that contain a topic. 1832 Those ITEMs whose TOPICs contain an ITEM.
1791 PARENT: A topic's immediate ancestor. It has a depth one less than 1833 PARENT: An ITEM's immediate ANCESTOR. It has a DEPTH one less than that
1792 the topic. 1834 of the ITEM.
1793 OFFSPRING: 1835 OFFSPRING:
1794 The topics contained by a topic; 1836 The ITEMs contained within an ITEM's TOPIC.
1795 SUBTOPIC: 1837 SUBTOPIC:
1796 An immediate offspring of a topic; 1838 An OFFSPRING of its ANCESTOR TOPICs.
1797 CHILDREN: 1839 CHILD:
1798 The immediate offspring of a topic. 1840 An immediate SUBTOPIC of its PARENT.
1799 SIBLINGS: 1841 SIBLINGS:
1800 Topics having the same parent and depth. 1842 TOPICs having the same PARENT and DEPTH.
1801 1843
1802 Topic text constituents: 1844 Topic text constituents:
1803 1845
1804 HEADER: The first line of a topic, include the topic PREFIX and header 1846 HEADER: The first line of an ITEM, include the ITEM PREFIX and HEADER
1805 text. 1847 text.
1806 PREFIX: The leading text of a topic which distinguishes it from normal 1848 ENTRY: The text content of an ITEM, before any OFFSPRING, but including
1807 text. It has a strict form, which consists of a prefix-lead 1849 the HEADER text and distinct from the ITEM PREFIX.
1808 string, padding, and a bullet. The bullet may be followed by a 1850 BODY: Same as ENTRY.
1851 PREFIX: The leading text of an ITEM which distinguishes it from normal
1852 ENTRY text. Allout recognizes the outline structure according
1853 to the strict PREFIX format. It consists of a PREFIX-LEAD string,
1854 PREFIX-PADDING, and a BULLET. The BULLET might be followed by a
1809 number, indicating the ordinal number of the topic among its 1855 number, indicating the ordinal number of the topic among its
1810 siblings, a space, and then the header text. 1856 siblings, or an asterisk indicating encryption, plus an optional
1811 1857 space. After that is the ITEM HEADER text, which is not part of
1812 The relative length of the PREFIX determines the nesting depth 1858 the PREFIX.
1813 of the topic. 1859
1860 The relative length of the PREFIX determines the nesting DEPTH
1861 of the ITEM.
1814 PREFIX-LEAD: 1862 PREFIX-LEAD:
1815 The string at the beginning of a topic prefix, normally a `.'. 1863 The string at the beginning of a HEADER PREFIX, by default a `.'.
1816 It can be customized by changing the setting of 1864 It can be customized by changing the setting of
1817 `allout-header-prefix' and then reinitializing `allout-mode'. 1865 `allout-header-prefix' and then reinitializing `allout-mode'.
1818 1866
1819 By setting the prefix-lead to the comment-string of a 1867 When the PREFIX-LEAD is set to the comment-string of a
1820 programming language, you can embed outline structuring in 1868 programming language, outline structuring can be embedded in
1821 program code without interfering with the language processing 1869 program code without interfering with processing of the text
1822 of that code. See `allout-use-mode-specific-leader' 1870 (by emacs or the language processor) as program code. This
1823 docstring for more detail. 1871 setting happens automatically when allout mode is used in
1872 programming-mode buffers. See `allout-use-mode-specific-leader'
1873 docstring for more detail.
1824 PREFIX-PADDING: 1874 PREFIX-PADDING:
1825 Spaces or asterisks which separate the prefix-lead and the 1875 Spaces or asterisks which separate the PREFIX-LEAD and the
1826 bullet, determining the depth of the topic. 1876 bullet, determining the ITEM's DEPTH.
1827 BULLET: A character at the end of the topic prefix, it must be one of 1877 BULLET: A character at the end of the ITEM PREFIX, it must be one of
1828 the characters listed on `allout-plain-bullets-string' or 1878 the characters listed on `allout-plain-bullets-string' or
1829 `allout-distinctive-bullets-string'. (See the documentation 1879 `allout-distinctive-bullets-string'. (See the documentation
1830 for these variables for more details.) The default choice of 1880 for these variables for more details.) The default choice of
1831 bullet when generating topics varies in a cycle with the depth of 1881 BULLET when generating ITEMs varies in a cycle with the DEPTH of
1832 the topic. 1882 the ITEM.
1833 ENTRY: The text contained in a topic before any offspring.
1834 BODY: Same as ENTRY.
1835
1836 1883
1837 EXPOSURE: 1884 EXPOSURE:
1838 The state of a topic which determines the on-screen visibility 1885 The state of a TOPIC which determines the on-screen visibility
1839 of its offspring and contained text. 1886 of its OFFSPRING and contained ENTRY text.
1840 CONCEALED: 1887 CONCEALED:
1841 Topics and entry text whose display is inhibited. Contiguous 1888 TOPICs and ENTRY text whose EXPOSURE is inhibited. Concealed
1842 units of concealed text is represented by `...' ellipses. 1889 text is represented by \"...\" ellipses.
1843 1890
1844 Concealed topics are effectively collapsed within an ancestor. 1891 CONCEALED TOPICs are effectively collapsed within an ANCESTOR.
1845 CLOSED: A topic whose immediate offspring and body-text is concealed. 1892 CLOSED: A TOPIC whose immediate OFFSPRING and body-text is CONCEALED.
1846 OPEN: A topic that is not closed, though its offspring or body may be." 1893 OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
1847 ;;;_ . Code 1894 ;;;_ . Code
1848 (interactive "P") 1895 (interactive "P")
1849 1896
1850 (let* ((active (and (not (equal major-mode 'outline)) 1897 (let* ((active (and (not (equal major-mode 'outline))
1851 (allout-mode-p))) 1898 (allout-mode-p)))
1932 '(allout-encryption-ciphertext-rejection-regexps 1979 '(allout-encryption-ciphertext-rejection-regexps
1933 allout-bob-regexp 1980 allout-bob-regexp
1934 extend)) 1981 extend))
1935 1982
1936 ;; Produce map from current version of allout-keybindings-list: 1983 ;; Produce map from current version of allout-keybindings-list:
1937 (setq allout-mode-map 1984 (allout-setup-mode-map)
1938 (produce-allout-mode-map allout-keybindings-list))
1939 (substitute-key-definition 'beginning-of-line
1940 'allout-beginning-of-line
1941 allout-mode-map global-map)
1942 (substitute-key-definition 'move-beginning-of-line
1943 'allout-beginning-of-line
1944 allout-mode-map global-map)
1945 (substitute-key-definition 'end-of-line
1946 'allout-end-of-line
1947 allout-mode-map global-map)
1948 (substitute-key-definition 'move-end-of-line
1949 'allout-end-of-line
1950 allout-mode-map global-map)
1951 (produce-allout-mode-menubar-entries) 1985 (produce-allout-mode-menubar-entries)
1952 (fset 'allout-mode-map allout-mode-map)
1953 1986
1954 ;; Include on minor-mode-map-alist, if not already there: 1987 ;; Include on minor-mode-map-alist, if not already there:
1955 (if (not (member '(allout-mode . allout-mode-map) 1988 (if (not (member '(allout-mode . allout-mode-map)
1956 minor-mode-map-alist)) 1989 minor-mode-map-alist))
1957 (setq minor-mode-map-alist 1990 (setq minor-mode-map-alist
2037 (error (message "%s" (car (cdr err))) 2070 (error (message "%s" (car (cdr err)))
2038 (sit-for 1)))))) 2071 (sit-for 1))))))
2039 allout-mode 2072 allout-mode
2040 ) ; let* 2073 ) ; let*
2041 ) ; defun 2074 ) ; defun
2075
2076 (defun allout-setup-mode-map ()
2077 "Establish allout-mode bindings."
2078 (setq-default allout-mode-map
2079 (produce-allout-mode-map allout-keybindings-list))
2080 (setq allout-mode-map
2081 (produce-allout-mode-map allout-keybindings-list))
2082 (substitute-key-definition 'beginning-of-line
2083 'allout-beginning-of-line
2084 allout-mode-map global-map)
2085 (substitute-key-definition 'move-beginning-of-line
2086 'allout-beginning-of-line
2087 allout-mode-map global-map)
2088 (substitute-key-definition 'end-of-line
2089 'allout-end-of-line
2090 allout-mode-map global-map)
2091 (substitute-key-definition 'move-end-of-line
2092 'allout-end-of-line
2093 allout-mode-map global-map)
2094 (fset 'allout-mode-map allout-mode-map))
2095
2096 ;; ensure that allout-mode-map has some setting even if allout-mode hasn't
2097 ;; been invoked:
2098 (allout-setup-mode-map)
2099
2042 ;;;_ > allout-minor-mode 2100 ;;;_ > allout-minor-mode
2043 (defalias 'allout-minor-mode 'allout-mode) 2101 (defalias 'allout-minor-mode 'allout-mode)
2044 2102
2045 ;;;_ - Position Assessment 2103 ;;;_ - Position Assessment
2046 ;;;_ > allout-hidden-p (&optional pos) 2104 ;;;_ > allout-hidden-p (&optional pos)
2451 (allout-back-to-current-heading) 2509 (allout-back-to-current-heading)
2452 (allout-end-of-current-line)) 2510 (allout-end-of-current-line))
2453 (t (allout-end-of-entry)))))) 2511 (t (allout-end-of-entry))))))
2454 ;;;_ > allout-next-heading () 2512 ;;;_ > allout-next-heading ()
2455 (defsubst allout-next-heading () 2513 (defsubst allout-next-heading ()
2456 "Move to the heading for the topic \(possibly invisible) after this one. 2514 "Move to the heading for the topic (possibly invisible) after this one.
2457 2515
2458 Returns the location of the heading, or nil if none found. 2516 Returns the location of the heading, or nil if none found.
2459 2517
2460 We skip anomolous low-level topics, a la `allout-aberrant-container-p'." 2518 We skip anomolous low-level topics, a la `allout-aberrant-container-p'."
2461 (if (looking-at allout-regexp) 2519 (if (looking-at allout-regexp)
2474 ;; A throwaway non-macro that is defined after allout-next-heading 2532 ;; A throwaway non-macro that is defined after allout-next-heading
2475 ;; and usable by allout-mode. 2533 ;; and usable by allout-mode.
2476 (if (not (allout-goto-prefix-doublechecked)) (allout-next-heading))) 2534 (if (not (allout-goto-prefix-doublechecked)) (allout-next-heading)))
2477 ;;;_ > allout-previous-heading () 2535 ;;;_ > allout-previous-heading ()
2478 (defun allout-previous-heading () 2536 (defun allout-previous-heading ()
2479 "Move to the prior \(possibly invisible) heading line. 2537 "Move to the prior (possibly invisible) heading line.
2480 2538
2481 Return the location of the beginning of the heading, or nil if not found. 2539 Return the location of the beginning of the heading, or nil if not found.
2482 2540
2483 We skip anomolous low-level topics, a la `allout-aberrant-container-p'." 2541 We skip anomolous low-level topics, a la `allout-aberrant-container-p'."
2484 2542
2524 2582
2525 ;;;_ > allout-chart-subtree (&optional levels visible orig-depth prev-depth) 2583 ;;;_ > allout-chart-subtree (&optional levels visible orig-depth prev-depth)
2526 (defun allout-chart-subtree (&optional levels visible orig-depth prev-depth) 2584 (defun allout-chart-subtree (&optional levels visible orig-depth prev-depth)
2527 "Produce a location \"chart\" of subtopics of the containing topic. 2585 "Produce a location \"chart\" of subtopics of the containing topic.
2528 2586
2529 Optional argument LEVELS specifies a depth limit \(relative to start 2587 Optional argument LEVELS specifies a depth limit (relative to start
2530 depth) for the chart. Null LEVELS means no limit. 2588 depth) for the chart. Null LEVELS means no limit.
2531 2589
2532 When optional argument VISIBLE is non-nil, the chart includes 2590 When optional argument VISIBLE is non-nil, the chart includes
2533 only the visible subelements of the charted subjects. 2591 only the visible subelements of the charted subjects.
2534 2592
2661 (setq result (cons here result))) 2719 (setq result (cons here result)))
2662 (setq chart (cdr chart)))) 2720 (setq chart (cdr chart))))
2663 result)) 2721 result))
2664 ;;;_ X allout-chart-spec (chart spec &optional exposing) 2722 ;;;_ X allout-chart-spec (chart spec &optional exposing)
2665 ;; (defun allout-chart-spec (chart spec &optional exposing) 2723 ;; (defun allout-chart-spec (chart spec &optional exposing)
2666 ;; "Not yet \(if ever) implemented. 2724 ;; "Not yet (if ever) implemented.
2667 2725
2668 ;; Produce exposure directives given topic/subtree CHART and an exposure SPEC. 2726 ;; Produce exposure directives given topic/subtree CHART and an exposure SPEC.
2669 2727
2670 ;; Exposure spec indicates the locations to be exposed and the prescribed 2728 ;; Exposure spec indicates the locations to be exposed and the prescribed
2671 ;; exposure status. Optional arg EXPOSING is an integer, with 0 2729 ;; exposure status. Optional arg EXPOSING is an integer, with 0
2682 ;; point which is the negative of the number should be opened, 2740 ;; point which is the negative of the number should be opened,
2683 ;; including their entries. 2741 ;; including their entries.
2684 ;; - bare positive values indicate that this topic header should be 2742 ;; - bare positive values indicate that this topic header should be
2685 ;; opened. 2743 ;; opened.
2686 ;; - Lists signify the beginning and end points of regions that should 2744 ;; - Lists signify the beginning and end points of regions that should
2687 ;; be flagged, and the flag to employ. (For concealment: `\(\?r\)', and 2745 ;; be flagged, and the flag to employ. (For concealment: `(\?r)', and
2688 ;; exposure:" 2746 ;; exposure:"
2689 ;; (while spec 2747 ;; (while spec
2690 ;; (cond ((listp spec) 2748 ;; (cond ((listp spec)
2691 ;; ) 2749 ;; )
2692 ;; ) 2750 ;; )
2719 done))) 2777 done)))
2720 ;;;_ > allout-goto-prefix-doublechecked () 2778 ;;;_ > allout-goto-prefix-doublechecked ()
2721 (defun allout-goto-prefix-doublechecked () 2779 (defun allout-goto-prefix-doublechecked ()
2722 "Put point at beginning of immediately containing outline topic. 2780 "Put point at beginning of immediately containing outline topic.
2723 2781
2724 Like `allout-goto-prefix', but shallow topics \(according to 2782 Like `allout-goto-prefix', but shallow topics (according to
2725 `allout-doublecheck-at-and-shallower') are checked and 2783 `allout-doublecheck-at-and-shallower') are checked and
2726 disqualified for child containment discontinuity, according to 2784 disqualified for child containment discontinuity, according to
2727 `allout-aberrant-container-p'." 2785 `allout-aberrant-container-p'."
2728 (if (allout-goto-prefix) 2786 (if (allout-goto-prefix)
2729 (if (and (allout-do-doublecheck) 2787 (if (and (allout-do-doublecheck)
2747 (if (and (not (eolp)) (looking-at "\\s-")) (forward-char 1))) 2805 (if (and (not (eolp)) (looking-at "\\s-")) (forward-char 1)))
2748 ;; Reestablish where we are: 2806 ;; Reestablish where we are:
2749 (allout-current-depth))) 2807 (allout-current-depth)))
2750 ;;;_ > allout-current-bullet-pos () 2808 ;;;_ > allout-current-bullet-pos ()
2751 (defun allout-current-bullet-pos () 2809 (defun allout-current-bullet-pos ()
2752 "Return position of current \(visible) topic's bullet." 2810 "Return position of current (visible) topic's bullet."
2753 2811
2754 (if (not (allout-current-depth)) 2812 (if (not (allout-current-depth))
2755 nil 2813 nil
2756 (1- allout-recent-prefix-end))) 2814 (1- allout-recent-prefix-end)))
2757 ;;;_ > allout-back-to-current-heading () 2815 ;;;_ > allout-back-to-current-heading ()
2885 (setq last-ascended (allout-ascend)))) 2943 (setq last-ascended (allout-ascend))))
2886 (goto-char allout-recent-prefix-beginning) 2944 (goto-char allout-recent-prefix-beginning)
2887 (if (interactive-p) (allout-end-of-prefix)) 2945 (if (interactive-p) (allout-end-of-prefix))
2888 (and last-ascended allout-recent-depth)))) 2946 (and last-ascended allout-recent-depth))))
2889 ;;;_ > allout-ascend () 2947 ;;;_ > allout-ascend ()
2890 (defun allout-ascend () 2948 (defun allout-ascend (&optional dont-move-if-unsuccessful)
2891 "Ascend one level, returning t if successful, nil if not." 2949 "Ascend one level, returning resulting depth if successful, nil if not.
2950
2951 Point is left at the beginning of the level whether or not
2952 successful, unless optional DONT-MOVE-IF-UNSUCCESSFUL is set, in
2953 which case point is returned to its original starting location."
2954 (if dont-move-if-unsuccessful
2955 (setq dont-move-if-unsuccessful (point)))
2892 (prog1 2956 (prog1
2893 (if (allout-beginning-of-level) 2957 (if (allout-beginning-of-level)
2894 (let ((bolevel (point)) 2958 (let ((bolevel (point))
2895 (bolevel-depth allout-recent-depth)) 2959 (bolevel-depth allout-recent-depth))
2896 (allout-previous-heading) 2960 (allout-previous-heading)
2897 (if (< allout-recent-depth bolevel-depth) 2961 (cond ((< allout-recent-depth bolevel-depth)
2898 allout-recent-depth 2962 allout-recent-depth)
2899 ;; some topic after file's first is at lower depth than first: 2963 ((= allout-recent-depth bolevel-depth)
2900 (goto-char bolevel) 2964 (if dont-move-if-unsuccessful
2901 (allout-depth) 2965 (goto-char dont-move-if-unsuccessful))
2902 nil))) 2966 (allout-depth)
2967 nil)
2968 (t
2969 ;; some topic after very first is lower depth than first:
2970 (goto-char bolevel)
2971 (allout-depth)
2972 nil))))
2903 (if (interactive-p) (allout-end-of-prefix)))) 2973 (if (interactive-p) (allout-end-of-prefix))))
2904 ;;;_ > allout-descend-to-depth (depth) 2974 ;;;_ > allout-descend-to-depth (depth)
2905 (defun allout-descend-to-depth (depth) 2975 (defun allout-descend-to-depth (depth)
2906 "Descend to depth DEPTH within current topic. 2976 "Descend to depth DEPTH within current topic.
2907 2977
2988 3058
2989 Return the start point of the new topic if successful, nil otherwise. 3059 Return the start point of the new topic if successful, nil otherwise.
2990 3060
2991 Costs more than regular `allout-next-sibling' for short traversals: 3061 Costs more than regular `allout-next-sibling' for short traversals:
2992 3062
2993 - we have to check the prior \(next, if travelling backwards) 3063 - we have to check the prior (next, if travelling backwards)
2994 item to confirm connectivity with the prior topic, and 3064 item to confirm connectivity with the prior topic, and
2995 - if confirmed, we have to reestablish the allout-recent-* settings with 3065 - if confirmed, we have to reestablish the allout-recent-* settings with
2996 some extra navigation 3066 some extra navigation
2997 - if confirmation fails, we have to do more work to recover 3067 - if confirmation fails, we have to do more work to recover
2998 3068
3217 reinterpreted as the corresponding control-character in the 3287 reinterpreted as the corresponding control-character in the
3218 `allout-mode-map'. The `allout-mode' `post-command-hook' insures that 3288 `allout-mode-map'. The `allout-mode' `post-command-hook' insures that
3219 the cursor which has moved as a result of such reinterpretation is 3289 the cursor which has moved as a result of such reinterpretation is
3220 positioned on the bullet character of the destination topic. 3290 positioned on the bullet character of the destination topic.
3221 3291
3222 The upshot is that you can get easy, single \(ie, unmodified\) key 3292 The upshot is that you can get easy, single (ie, unmodified) key
3223 outline maneuvering operations by positioning the cursor on the bullet 3293 outline maneuvering operations by positioning the cursor on the bullet
3224 char. When in this mode you can use regular cursor-positioning 3294 char. When in this mode you can use regular cursor-positioning
3225 command/keystrokes to relocate the cursor off of a bullet character to 3295 command/keystrokes to relocate the cursor off of a bullet character to
3226 return to regular interpretation of self-insert characters." 3296 return to regular interpretation of self-insert characters."
3227 3297
3327 (if prefix 3397 (if prefix
3328 (allout-get-prefix-bullet prefix) 3398 (allout-get-prefix-bullet prefix)
3329 (allout-get-bullet))))) 3399 (allout-get-bullet)))))
3330 ;;;_ > allout-encrypted-type-prefix (&optional prefix) 3400 ;;;_ > allout-encrypted-type-prefix (&optional prefix)
3331 (defun allout-encrypted-type-prefix (&optional prefix) 3401 (defun allout-encrypted-type-prefix (&optional prefix)
3332 "True if current header prefix bullet is for an encrypted entry \(body)." 3402 "True if current header prefix bullet is for an encrypted entry (body)."
3333 (and allout-topic-encryption-bullet 3403 (and allout-topic-encryption-bullet
3334 (string= allout-topic-encryption-bullet 3404 (string= allout-topic-encryption-bullet
3335 (if prefix 3405 (if prefix
3336 (allout-get-prefix-bullet prefix) 3406 (allout-get-prefix-bullet prefix)
3337 (allout-get-bullet))))) 3407 (allout-get-bullet)))))
3378 Third arg DEPTH forces the topic prefix to that depth, regardless of 3448 Third arg DEPTH forces the topic prefix to that depth, regardless of
3379 the current topics' depth. 3449 the current topics' depth.
3380 3450
3381 If SOLICIT is non-nil, then the choice of bullet is solicited from 3451 If SOLICIT is non-nil, then the choice of bullet is solicited from
3382 user. If it's a character, then that character is offered as the 3452 user. If it's a character, then that character is offered as the
3383 default, otherwise the one suited to the context \(according to 3453 default, otherwise the one suited to the context (according to
3384 distinction or depth) is offered. \(This overrides other options, 3454 distinction or depth) is offered. (This overrides other options,
3385 including, eg, a distinctive PRIOR-BULLET.) If non-nil, then the 3455 including, eg, a distinctive PRIOR-BULLET.) If non-nil, then the
3386 context-specific bullet is used. 3456 context-specific bullet is used.
3387 3457
3388 Fifth arg, NUMBER-CONTROL, matters only if `allout-numbered-bullet' 3458 Fifth arg, NUMBER-CONTROL, matters only if `allout-numbered-bullet'
3389 is non-nil *and* soliciting was not explicitly invoked. Then 3459 is non-nil *and* soliciting was not explicitly invoked. Then
3503 is non-nil, or unless current line is completely empty - lacking even 3573 is non-nil, or unless current line is completely empty - lacking even
3504 whitespace - in which case open is done on the current line. 3574 whitespace - in which case open is done on the current line.
3505 3575
3506 When adding an offspring, it will be added immediately after the parent if 3576 When adding an offspring, it will be added immediately after the parent if
3507 the other offspring are exposed, or after the last child if the offspring 3577 the other offspring are exposed, or after the last child if the offspring
3508 are hidden. \(The intervening offspring will be exposed in the latter 3578 are hidden. (The intervening offspring will be exposed in the latter
3509 case.) 3579 case.)
3510 3580
3511 If OFFER-RECENT-BULLET is true, offer to use the bullet of the prior sibling. 3581 If OFFER-RECENT-BULLET is true, offer to use the bullet of the prior sibling.
3512 3582
3513 Nuances: 3583 Nuances:
3821 3891
3822 All args are optional. 3892 All args are optional.
3823 3893
3824 If SOLICIT is non-nil, then the choice of bullet is solicited from 3894 If SOLICIT is non-nil, then the choice of bullet is solicited from
3825 user. If it's a character, then that character is offered as the 3895 user. If it's a character, then that character is offered as the
3826 default, otherwise the one suited to the context \(according to 3896 default, otherwise the one suited to the context (according to
3827 distinction or depth) is offered. If non-nil, then the 3897 distinction or depth) is offered. If non-nil, then the
3828 context-specific bullet is just used. 3898 context-specific bullet is just used.
3829 3899
3830 Second arg DEPTH forces the topic prefix to that depth, regardless 3900 Second arg DEPTH forces the topic prefix to that depth, regardless
3831 of the topic's current depth. 3901 of the topic's current depth.
3919 "Rebullet the visible topic containing point and all contained subtopics. 3989 "Rebullet the visible topic containing point and all contained subtopics.
3920 3990
3921 Descends into invisible as well as visible topics, however. 3991 Descends into invisible as well as visible topics, however.
3922 3992
3923 When optional sans-offspring is non-nil, subtopics are not 3993 When optional sans-offspring is non-nil, subtopics are not
3924 shifted. \(Shifting a topic outwards without shifting its 3994 shifted. (Shifting a topic outwards without shifting its
3925 offspring is disallowed, since this would create a \"containment 3995 offspring is disallowed, since this would create a \"containment
3926 discontinuity\", where the depth difference between a topic and 3996 discontinuity\", where the depth difference between a topic and
3927 its immediate offspring is greater than one.) 3997 its immediate offspring is greater than one.)
3928 3998
3929 With repeat count, shift topic depth by that amount." 3999 With repeat count, shift topic depth by that amount."
3960 4030
3961 Several subsequent args are for internal recursive use by the function 4031 Several subsequent args are for internal recursive use by the function
3962 itself: STARTING-DEPTH, STARTING-POINT, and INDEX. 4032 itself: STARTING-DEPTH, STARTING-POINT, and INDEX.
3963 4033
3964 Finally, if optional SANS-OFFSPRING is non-nil then the offspring 4034 Finally, if optional SANS-OFFSPRING is non-nil then the offspring
3965 are not shifted. \(Shifting a topic outwards without shifting 4035 are not shifted. (Shifting a topic outwards without shifting
3966 its offspring is disallowed, since this would create a 4036 its offspring is disallowed, since this would create a
3967 \"containment discontinuity\", where the depth difference between 4037 \"containment discontinuity\", where the depth difference between
3968 a topic and its immediate offspring is greater than one..)" 4038 a topic and its immediate offspring is greater than one..)"
3969 4039
3970 ;; XXX the recursion here is peculiar, and in general the routine may 4040 ;; XXX the recursion here is peculiar, and in general the routine may
4443 ; last processed topic from 4513 ; last processed topic from
4444 ; the narrow region: 4514 ; the narrow region:
4445 (while more 4515 (while more
4446 (allout-back-to-current-heading) 4516 (allout-back-to-current-heading)
4447 ; go as high as we can in each bunch: 4517 ; go as high as we can in each bunch:
4448 (while (allout-ascend)) 4518 (while (allout-ascend t))
4449 (save-excursion 4519 (save-excursion
4450 (allout-unprotected 4520 (allout-unprotected
4451 (allout-rebullet-topic-grunt (- adjust-to-depth 4521 (allout-rebullet-topic-grunt (- adjust-to-depth
4452 subj-depth))) 4522 subj-depth)))
4453 (allout-depth)) 4523 (allout-depth))
4596 ;;;_ > allout-flag-region (from to flag) 4666 ;;;_ > allout-flag-region (from to flag)
4597 (defun allout-flag-region (from to flag) 4667 (defun allout-flag-region (from to flag)
4598 "Conceal text between FROM and TO if FLAG is non-nil, else reveal it. 4668 "Conceal text between FROM and TO if FLAG is non-nil, else reveal it.
4599 4669
4600 Exposure-change hook `allout-exposure-change-hook' is run with the same 4670 Exposure-change hook `allout-exposure-change-hook' is run with the same
4601 arguments as this function, after the exposure changes are made. \(The old 4671 arguments as this function, after the exposure changes are made. (The old
4602 `allout-view-change-hook' is being deprecated, and eventually will not be 4672 `allout-view-change-hook' is being deprecated, and eventually will not be
4603 invoked.\)" 4673 invoked.)"
4604 4674
4605 ;; We use outline invisibility spec. 4675 ;; We use outline invisibility spec.
4606 (remove-overlays from to 'category 'allout-exposure-category) 4676 (remove-overlays from to 'category 'allout-exposure-category)
4607 (when flag 4677 (when flag
4608 (let ((o (make-overlay from to))) 4678 (let ((o (make-overlay from to)))
4898 4968
4899 SPEC is either a number or a list. 4969 SPEC is either a number or a list.
4900 4970
4901 Successive specs on a list are applied to successive sibling topics. 4971 Successive specs on a list are applied to successive sibling topics.
4902 4972
4903 A simple spec \(either a number, one of a few symbols, or the null 4973 A simple spec (either a number, one of a few symbols, or the null
4904 list) dictates the exposure for the corresponding topic. 4974 list) dictates the exposure for the corresponding topic.
4905 4975
4906 Non-null lists recursively designate exposure specs for respective 4976 Non-null lists recursively designate exposure specs for respective
4907 subtopics of the current topic. 4977 subtopics of the current topic.
4908 4978
4921 - 0 means to close topic - hide all offspring. 4991 - 0 means to close topic - hide all offspring.
4922 : - `repeat' 4992 : - `repeat'
4923 apply prior element to all siblings at current level, *up to* 4993 apply prior element to all siblings at current level, *up to*
4924 those siblings that would be covered by specs following the `:' 4994 those siblings that would be covered by specs following the `:'
4925 on the list. Ie, apply to all topics at level but the last 4995 on the list. Ie, apply to all topics at level but the last
4926 ones. \(Only first of multiple colons at same level is 4996 ones. (Only first of multiple colons at same level is
4927 respected - subsequent ones are discarded.) 4997 respected - subsequent ones are discarded.)
4928 * - completely opens the topic, including bodies. 4998 * - completely opens the topic, including bodies.
4929 + - shows all the sub headers, but not the bodies 4999 + - shows all the sub headers, but not the bodies
4930 - - exposes the body of the corresponding topic. 5000 - - exposes the body of the corresponding topic.
4931 5001
5004 ((allout-next-sibling depth)))) 5074 ((allout-next-sibling depth))))
5005 max-pos))) 5075 max-pos)))
5006 ;;;_ > allout-old-expose-topic (spec &rest followers) 5076 ;;;_ > allout-old-expose-topic (spec &rest followers)
5007 (defun allout-old-expose-topic (spec &rest followers) 5077 (defun allout-old-expose-topic (spec &rest followers)
5008 5078
5009 "Deprecated. Use `allout-expose-topic' \(with different schema 5079 "Deprecated. Use `allout-expose-topic' (with different schema
5010 format) instead. 5080 format) instead.
5011 5081
5012 Dictate wholesale exposure scheme for current topic, according to SPEC. 5082 Dictate wholesale exposure scheme for current topic, according to SPEC.
5013 5083
5014 SPEC is either a number or a list. Optional successive args 5084 SPEC is either a number or a list. Optional successive args
5201 optional arg, FORMAT, designates an alternate presentation form for 5271 optional arg, FORMAT, designates an alternate presentation form for
5202 the prefix: 5272 the prefix:
5203 5273
5204 list - Present prefix as numeric section.subsection..., starting with 5274 list - Present prefix as numeric section.subsection..., starting with
5205 section indicated by the list, innermost nesting first. 5275 section indicated by the list, innermost nesting first.
5206 `indent' \(symbol) - Convert header prefixes to all white space, 5276 `indent' (symbol) - Convert header prefixes to all white space,
5207 except for distinctive bullets. 5277 except for distinctive bullets.
5208 5278
5209 The elements of the list produced are lists that represents a topic 5279 The elements of the list produced are lists that represents a topic
5210 header and body. The elements of that list are: 5280 header and body. The elements of that list are:
5211 5281
5330 `flat' - Present prefix as numeric section.subsection..., starting with 5400 `flat' - Present prefix as numeric section.subsection..., starting with
5331 section indicated by the start-num, innermost nesting first. 5401 section indicated by the start-num, innermost nesting first.
5332 X`flat-indented' - Prefix is like `flat' for first topic at each 5402 X`flat-indented' - Prefix is like `flat' for first topic at each
5333 X level, but subsequent topics have only leaf topic 5403 X level, but subsequent topics have only leaf topic
5334 X number, padded with blanks to line up with first. 5404 X number, padded with blanks to line up with first.
5335 `indent' \(symbol) - Convert header prefixes to all white space, 5405 `indent' (symbol) - Convert header prefixes to all white space,
5336 except for distinctive bullets. 5406 except for distinctive bullets.
5337 5407
5338 Defaults: 5408 Defaults:
5339 FUNCTION: `allout-insert-listified' 5409 FUNCTION: `allout-insert-listified'
5340 FROM: region start, if region active, else start of buffer 5410 FROM: region start, if region active, else start of buffer
5482 5552
5483 ;;;_ - LaTeX formatting 5553 ;;;_ - LaTeX formatting
5484 ;;;_ > allout-latex-verb-quote (string &optional flow) 5554 ;;;_ > allout-latex-verb-quote (string &optional flow)
5485 (defun allout-latex-verb-quote (string &optional flow) 5555 (defun allout-latex-verb-quote (string &optional flow)
5486 "Return copy of STRING for literal reproduction across LaTeX processing. 5556 "Return copy of STRING for literal reproduction across LaTeX processing.
5487 Expresses the original characters \(including carriage returns) of the 5557 Expresses the original characters (including carriage returns) of the
5488 string across LaTeX processing." 5558 string across LaTeX processing."
5489 (mapconcat (function 5559 (mapconcat (function
5490 (lambda (char) 5560 (lambda (char)
5491 (cond ((memq char '(?\\ ?$ ?% ?# ?& ?{ ?} ?_ ?^ ?- ?*)) 5561 (cond ((memq char '(?\\ ?$ ?% ?# ?& ?{ ?} ?_ ?^ ?- ?*))
5492 (concat "\\char" (number-to-string char) "{}")) 5562 (concat "\\char" (number-to-string char) "{}"))
5494 (t (char-to-string char))))) 5564 (t (char-to-string char)))))
5495 string 5565 string
5496 "")) 5566 ""))
5497 ;;;_ > allout-latex-verbatim-quote-curr-line () 5567 ;;;_ > allout-latex-verbatim-quote-curr-line ()
5498 (defun allout-latex-verbatim-quote-curr-line () 5568 (defun allout-latex-verbatim-quote-curr-line ()
5499 "Express line for exact \(literal) representation across LaTeX processing. 5569 "Express line for exact (literal) representation across LaTeX processing.
5500 5570
5501 Adjust line contents so it is unaltered \(from the original line) 5571 Adjust line contents so it is unaltered (from the original line)
5502 across LaTeX processing, within the context of a `verbatim' 5572 across LaTeX processing, within the context of a `verbatim'
5503 environment. Leaves point at the end of the line." 5573 environment. Leaves point at the end of the line."
5504 (let ((inhibit-field-text-motion t)) 5574 (let ((inhibit-field-text-motion t))
5505 (beginning-of-line) 5575 (beginning-of-line)
5506 (let ((beg (point)) 5576 (let ((beg (point))
5671 ;;;_ > allout-toggle-current-subtree-encryption (&optional fetch-pass) 5741 ;;;_ > allout-toggle-current-subtree-encryption (&optional fetch-pass)
5672 (defun allout-toggle-current-subtree-encryption (&optional fetch-pass) 5742 (defun allout-toggle-current-subtree-encryption (&optional fetch-pass)
5673 "Encrypt clear or decrypt encoded text of visibly-containing topic's contents. 5743 "Encrypt clear or decrypt encoded text of visibly-containing topic's contents.
5674 5744
5675 Optional FETCH-PASS universal argument provokes key-pair encryption with 5745 Optional FETCH-PASS universal argument provokes key-pair encryption with
5676 single universal argument. With doubled universal argument \(value = 16), 5746 single universal argument. With doubled universal argument (value = 16),
5677 it forces prompting for the passphrase regardless of availability from the 5747 it forces prompting for the passphrase regardless of availability from the
5678 passphrase cache. With no universal argument, the appropriate passphrase 5748 passphrase cache. With no universal argument, the appropriate passphrase
5679 is obtained from the cache, if available, else from the user. 5749 is obtained from the cache, if available, else from the user.
5680 5750
5681 Currently only GnuPG encryption is supported. 5751 Currently only GnuPG encryption is supported.
5682 5752
5683 \**NOTE WELL** that the encrypted text must be ascii-armored. For gnupg 5753 \**NOTE WELL** that the encrypted text must be ascii-armored. For gnupg
5684 encryption, include the option ``armor'' in your ~/.gnupg/gpg.conf file. 5754 encryption, include the option ``armor'' in your ~/.gnupg/gpg.conf file.
5685 5755
5686 Both symmetric-key and key-pair encryption is implemented. Symmetric is 5756 Both symmetric-key and key-pair encryption is implemented. Symmetric is
5687 the default, use a single \(x4) universal argument for keypair mode. 5757 the default, use a single (x4) universal argument for keypair mode.
5688 5758
5689 Encrypted topic's bullet is set to a `~' to signal that the contents of the 5759 Encrypted topic's bullet is set to a `~' to signal that the contents of the
5690 topic \(body and subtopics, but not heading) is pending encryption or 5760 topic (body and subtopics, but not heading) is pending encryption or
5691 encrypted. `*' asterisk immediately after the bullet signals that the body 5761 encrypted. `*' asterisk immediately after the bullet signals that the body
5692 is encrypted, its' absence means the topic is meant to be encrypted but is 5762 is encrypted, its' absence means the topic is meant to be encrypted but is
5693 not. When a file with topics pending encryption is saved, topics pending 5763 not. When a file with topics pending encryption is saved, topics pending
5694 encryption are encrypted. See allout-encrypt-unencrypted-on-saves for 5764 encryption are encrypted. See allout-encrypt-unencrypted-on-saves for
5695 auto-encryption specifics. 5765 auto-encryption specifics.
5696 5766
5697 \**NOTE WELL** that automatic encryption that happens during saves will 5767 \**NOTE WELL** that automatic encryption that happens during saves will
5698 default to symmetric encryption - you must manually \(re)encrypt key-pair 5768 default to symmetric encryption - you must manually (re)encrypt key-pair
5699 encrypted topics if you want them to continue to use the key-pair cipher. 5769 encrypted topics if you want them to continue to use the key-pair cipher.
5700 5770
5701 Level-one topics, with prefix consisting solely of an `*' asterisk, cannot be 5771 Level-one topics, with prefix consisting solely of an `*' asterisk, cannot be
5702 encrypted. If you want to encrypt the contents of a top-level topic, use 5772 encrypted. If you want to encrypt the contents of a top-level topic, use
5703 \\[allout-shift-in] to increase its depth. 5773 \\[allout-shift-in] to increase its depth.
5706 5776
5707 The encryption passphrase is solicited if not currently available in the 5777 The encryption passphrase is solicited if not currently available in the
5708 passphrase cache from a recent encryption action. 5778 passphrase cache from a recent encryption action.
5709 5779
5710 The solicited passphrase is retained for reuse in a buffer-specific cache 5780 The solicited passphrase is retained for reuse in a buffer-specific cache
5711 for some set period of time \(default, 60 seconds), after which the string 5781 for some set period of time (default, 60 seconds), after which the string
5712 is nulled. The passphrase cache timeout is customized by setting 5782 is nulled. The passphrase cache timeout is customized by setting
5713 `pgg-passphrase-cache-expiry'. 5783 `pgg-passphrase-cache-expiry'.
5714 5784
5715 Symmetric Passphrase Hinting and Verification 5785 Symmetric Passphrase Hinting and Verification
5716 5786
5729 verifier across Emacs sessions. 5799 verifier across Emacs sessions.
5730 5800
5731 Similarly, `allout-passphrase-hint-string' stores a user-provided reminder 5801 Similarly, `allout-passphrase-hint-string' stores a user-provided reminder
5732 about their passphrase, and `allout-passphrase-hint-handling' specifies 5802 about their passphrase, and `allout-passphrase-hint-handling' specifies
5733 when the hint is presented, or if passphrase hints are disabled. If 5803 when the hint is presented, or if passphrase hints are disabled. If
5734 enabled \(see the `allout-passphrase-hint-handling' docstring for details), 5804 enabled (see the `allout-passphrase-hint-handling' docstring for details),
5735 the hint string is stored in the local-variables section of the file, and 5805 the hint string is stored in the local-variables section of the file, and
5736 solicited whenever the passphrase is changed." 5806 solicited whenever the passphrase is changed."
5737 (interactive "P") 5807 (interactive "P")
5738 (save-excursion 5808 (save-excursion
5739 (allout-back-to-current-heading) 5809 (allout-back-to-current-heading)
5740 (allout-toggle-subtree-encryption fetch-pass) 5810 (allout-toggle-subtree-encryption fetch-pass)
5741 ) 5811 )
5742 ) 5812 )
5743 ;;;_ > allout-toggle-subtree-encryption (&optional fetch-pass) 5813 ;;;_ > allout-toggle-subtree-encryption (&optional fetch-pass)
5744 (defun allout-toggle-subtree-encryption (&optional fetch-pass) 5814 (defun allout-toggle-subtree-encryption (&optional fetch-pass)
5745 "Encrypt clear text or decrypt encoded topic contents \(body and subtopics.) 5815 "Encrypt clear text or decrypt encoded topic contents (body and subtopics.)
5746 5816
5747 Optional FETCH-PASS universal argument provokes key-pair encryption with 5817 Optional FETCH-PASS universal argument provokes key-pair encryption with
5748 single universal argument. With doubled universal argument \(value = 16), 5818 single universal argument. With doubled universal argument (value = 16),
5749 it forces prompting for the passphrase regardless of availability from the 5819 it forces prompting for the passphrase regardless of availability from the
5750 passphrase cache. With no universal argument, the appropriate passphrase 5820 passphrase cache. With no universal argument, the appropriate passphrase
5751 is obtained from the cache, if available, else from the user. 5821 is obtained from the cache, if available, else from the user.
5752 5822
5753 Currently only GnuPG encryption is supported. 5823 Currently only GnuPG encryption is supported.
6487 `allout-enable-file-variable-adjustment' are nil. 6557 `allout-enable-file-variable-adjustment' are nil.
6488 6558
6489 When enabled, an entry for the variable is created if not already present, 6559 When enabled, an entry for the variable is created if not already present,
6490 or changed if established with a different value. The section for the file 6560 or changed if established with a different value. The section for the file
6491 variables, itself, is created if not already present. When created, the 6561 variables, itself, is created if not already present. When created, the
6492 section lines \(including the section line) exist as second-level topics in 6562 section lines (including the section line) exist as second-level topics in
6493 a top-level topic at the end of the file. 6563 a top-level topic at the end of the file.
6494 6564
6495 `enable-local-variables' must be true for any of this to happen." 6565 `enable-local-variables' must be true for any of this to happen."
6496 (if (not (and enable-local-variables 6566 (if (not (and enable-local-variables
6497 allout-enable-file-variable-adjustment)) 6567 allout-enable-file-variable-adjustment))
6816 (assq prop buffer-invisibility-spec)))))) 6886 (assq prop buffer-invisibility-spec))))))
6817 6887
6818 ;;;_ #10 Unfinished 6888 ;;;_ #10 Unfinished
6819 ;;;_ > allout-bullet-isearch (&optional bullet) 6889 ;;;_ > allout-bullet-isearch (&optional bullet)
6820 (defun allout-bullet-isearch (&optional bullet) 6890 (defun allout-bullet-isearch (&optional bullet)
6821 "Isearch \(regexp) for topic with bullet BULLET." 6891 "Isearch (regexp) for topic with bullet BULLET."
6822 (interactive) 6892 (interactive)
6823 (if (not bullet) 6893 (if (not bullet)
6824 (setq bullet (solicit-char-in-string 6894 (setq bullet (solicit-char-in-string
6825 "ISearch for topic with bullet: " 6895 "ISearch for topic with bullet: "
6826 (regexp-sans-escapes allout-bullets-string)))) 6896 (regexp-sans-escapes allout-bullets-string))))