comparison lisp/mh-e/mh-seq.el @ 66661:f7b261d0f8e8

* mh-customize.el (mh-refile-preserves-sequences-flag) (mh-tick-seq, mh-update-sequences-after-mh-show-flag): Sync docstrings with manual. * mh-e.el (mh-update-sequences): Sync docstrings with manual. * mh-seq.el (mh-delete-seq, mh-list-sequences, mh-narrow-to-seq) (mh-widen, mh-toggle-tick, mh-narrow-to-tick): Sync docstrings with manual.
author Bill Wohler <wohler@newt.com>
date Thu, 03 Nov 2005 19:59:38 +0000
parents 88d998016498
children 2ae99b10dd40
comparison
equal deleted inserted replaced
66660:b5ed69925019 66661:f7b261d0f8e8
138 (make-variable-buffer-local 'mh-thread-duplicates) 138 (make-variable-buffer-local 'mh-thread-duplicates)
139 (make-variable-buffer-local 'mh-thread-history) 139 (make-variable-buffer-local 'mh-thread-history)
140 140
141 ;;;###mh-autoload 141 ;;;###mh-autoload
142 (defun mh-delete-seq (sequence) 142 (defun mh-delete-seq (sequence)
143 "Delete the SEQUENCE." 143 "Delete SEQUENCE.
144
145 You are prompted for the sequence to delete. Note that this deletes only the
146 sequence, not the messages in the sequence. If you want to delete the
147 messages, use \"\\[universal-argument] \\[mh-delete-msg]\"."
144 (interactive (list (mh-read-seq-default "Delete" t))) 148 (interactive (list (mh-read-seq-default "Delete" t)))
145 (let ((msg-list (mh-seq-to-msgs sequence)) 149 (let ((msg-list (mh-seq-to-msgs sequence))
146 (internal-flag (mh-internal-seq sequence)) 150 (internal-flag (mh-internal-seq sequence))
147 (folders-changed (list mh-current-folder))) 151 (folders-changed (list mh-current-folder)))
148 (mh-iterate-on-range msg sequence 152 (mh-iterate-on-range msg sequence
159 ;; Avoid compiler warnings 163 ;; Avoid compiler warnings
160 (defvar view-exit-action) 164 (defvar view-exit-action)
161 165
162 ;;;###mh-autoload 166 ;;;###mh-autoload
163 (defun mh-list-sequences () 167 (defun mh-list-sequences ()
164 "List the sequences defined in the folder being visited." 168 "List all sequences in folder.
169 The list appears in a buffer named \"*MH-E Sequences*\"."
165 (interactive) 170 (interactive)
166 (let ((folder mh-current-folder) 171 (let ((folder mh-current-folder)
167 (temp-buffer mh-sequences-buffer) 172 (temp-buffer mh-sequences-buffer)
168 (seq-list mh-seq-list) 173 (seq-list mh-seq-list)
169 (max-len 0)) 174 (max-len 0))
226 231
227 (make-variable-buffer-local 'mh-non-seq-mode-line-annotation) 232 (make-variable-buffer-local 'mh-non-seq-mode-line-annotation)
228 233
229 ;;;###mh-autoload 234 ;;;###mh-autoload
230 (defun mh-narrow-to-seq (sequence) 235 (defun mh-narrow-to-seq (sequence)
231 "Restrict display of this folder to just messages in SEQUENCE. 236 "Restrict display to messages in SEQUENCE.
232 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." 237
238 You are prompted for the name of the sequence. What this command does is show
239 only those messages that are in the selected sequence in the MH-Folder buffer.
240 In addition, it limits further MH-E searches to just those messages.
241
242 When you want to widen the view to all your messages again, use \\[mh-widen]."
233 (interactive (list (mh-read-seq "Narrow to" t))) 243 (interactive (list (mh-read-seq "Narrow to" t)))
234 (with-mh-folder-updating (t) 244 (with-mh-folder-updating (t)
235 (cond ((mh-seq-to-msgs sequence) 245 (cond ((mh-seq-to-msgs sequence)
236 (mh-remove-all-notation) 246 (mh-remove-all-notation)
237 (let ((eob (point-max)) 247 (let ((eob (point-max))
294 (pop mh-view-ops)) 304 (pop mh-view-ops))
295 (t nil))) 305 (t nil)))
296 306
297 ;;;###mh-autoload 307 ;;;###mh-autoload
298 (defun mh-widen (&optional all-flag) 308 (defun mh-widen (&optional all-flag)
299 "Restore the previous limit. 309 "Remove last restriction.
300 If optional prefix argument ALL-FLAG is non-nil, remove all limits." 310 If optional prefix argument ALL-FLAG is non-nil, remove all limits."
301 (interactive "P") 311 (interactive "P")
302 (let ((msg (mh-get-msg-num nil))) 312 (let ((msg (mh-get-msg-num nil)))
303 (when mh-folder-view-stack 313 (when mh-folder-view-stack
304 (cond (all-flag 314 (cond (all-flag
1667 1677
1668 ;; Tick mark handling 1678 ;; Tick mark handling
1669 1679
1670 ;;;###mh-autoload 1680 ;;;###mh-autoload
1671 (defun mh-toggle-tick (range) 1681 (defun mh-toggle-tick (range)
1672 "Toggle tick mark of all messages in RANGE." 1682 "Toggle tick mark of all messages in RANGE.
1683
1684 This command adds messages to the \"tick\" sequence (which you can customize
1685 via the option `mh-tick-seq'). This sequence can be viewed later with the
1686 \\[mh-index-ticked-messages] command.
1687
1688 Check the documentation of `mh-interactive-range' to see how RANGE is read in
1689 interactive use."
1673 (interactive (list (mh-interactive-range "Tick"))) 1690 (interactive (list (mh-interactive-range "Tick")))
1674 (unless mh-tick-seq 1691 (unless mh-tick-seq
1675 (error "Enable ticking by customizing `mh-tick-seq'")) 1692 (error "Enable ticking by customizing `mh-tick-seq'"))
1676 (let* ((tick-seq (mh-find-seq mh-tick-seq)) 1693 (let* ((tick-seq (mh-find-seq mh-tick-seq))
1677 (tick-seq-msgs (mh-seq-msgs tick-seq)) 1694 (tick-seq-msgs (mh-seq-msgs tick-seq))
1694 (mh-index-add-to-sequence mh-tick-seq ticked) 1711 (mh-index-add-to-sequence mh-tick-seq ticked)
1695 (mh-index-delete-from-sequence mh-tick-seq unticked)))) 1712 (mh-index-delete-from-sequence mh-tick-seq unticked))))
1696 1713
1697 ;;;###mh-autoload 1714 ;;;###mh-autoload
1698 (defun mh-narrow-to-tick () 1715 (defun mh-narrow-to-tick ()
1699 "Limit to messages in `mh-tick-seq'. 1716 "Limit to ticked messages.
1700 1717
1701 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." 1718 What this command does is show only those messages that are in the \"tick\"
1719 sequence (which you can customize via the `mh-tick-seq' option) in the
1720 MH-Folder buffer. In addition, it limits further MH-E searches to just those
1721 messages. When you want to widen the view to all your messages again, use
1722 \\[mh-widen]."
1702 (interactive) 1723 (interactive)
1703 (cond ((not mh-tick-seq) 1724 (cond ((not mh-tick-seq)
1704 (error "Enable ticking by customizing `mh-tick-seq'")) 1725 (error "Enable ticking by customizing `mh-tick-seq'"))
1705 ((null (mh-seq-msgs (mh-find-seq mh-tick-seq))) 1726 ((null (mh-seq-msgs (mh-find-seq mh-tick-seq)))
1706 (message "No messages in %s sequence" mh-tick-seq)) 1727 (message "No messages in %s sequence" mh-tick-seq))