Function: set-rmail-inbox-list

set-rmail-inbox-list is an autoloaded, interactive and byte-compiled function defined in rmailmsc.el.gz.

Signature

(set-rmail-inbox-list FILE-NAME)

Documentation

Set the inbox list of the current RMAIL file to FILE-NAME.

You can specify one file name, or several names separated by commas. If FILE-NAME is empty, remove any existing inbox list.

This applies only to the current session.

Probably introduced at or before Emacs version 23.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmailmsc.el.gz
;;;###autoload
(defun set-rmail-inbox-list (file-name)
  "Set the inbox list of the current RMAIL file to FILE-NAME.
You can specify one file name, or several names separated by commas.
If FILE-NAME is empty, remove any existing inbox list.

This applies only to the current session."
  (interactive "sSet mailbox list to (comma-separated list of filenames): ")
  (unless (eq major-mode 'rmail-mode)
    (error "set-rmail-inbox-list works only for an Rmail file"))
  (let ((inbox-list
	 (with-temp-buffer
	   (insert file-name)
	   (goto-char (point-min))
	   ;; split-string does not remove leading/trailing whitespace.
	   (nreverse (mail-parse-comma-list)))))
    (when (or (not rmail-inbox-list)
	      (y-or-n-p (concat "Replace "
				(mapconcat #'identity
					   rmail-inbox-list
					   ", ")
				"? ")))
      (message "Setting the inbox list for %s for this session"
	       (file-name-nondirectory (buffer-file-name)))
      (setq rmail-inbox-list inbox-list)))
  (rmail-show-message-1 rmail-current-message))