Function: remember-store-in-mailbox

remember-store-in-mailbox is a byte-compiled function defined in remember.el.gz.

Signature

(remember-store-in-mailbox)

Documentation

Store remember data as if it were incoming mail.

In which case remember-mailbox should be the name of the mailbox. Each piece of pseudo-mail created will have an X-Todo-Priority field, for the purpose of appropriate splitting.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/remember.el.gz
(defun remember-store-in-mailbox ()
  "Store remember data as if it were incoming mail.
In which case `remember-mailbox' should be the name of the mailbox.
Each piece of pseudo-mail created will have an `X-Todo-Priority'
field, for the purpose of appropriate splitting."
  (let ((who (read-string "Who is this item related to? "))
        (moment (format-time-string "%s"))
        (desc (remember-buffer-desc))
        (text (buffer-string)))
    (with-temp-buffer
      (insert (format "From %s  %s
Date: %s
From: %s
Message-Id: <remember-%s@%s>
X-Todo-Priority: %s
To: %s <%s>
Subject: %s\n\n"
                      (user-login-name)
                      (remember-mail-date)
                      (remember-mail-date t)
                      who
                      moment (system-name)
                      remember-default-priority
                      (user-full-name) user-mail-address
                      desc))
      (let ((here (point)))
        (insert text)
        (unless (bolp)
          (insert "\n"))
        (insert "\n")
        (goto-char here)
        (while (re-search-forward "^\\(From[: ]\\)" nil t)
          (replace-match ">\\1")))
      (append-to-file (point-min) (point-max) remember-mailbox)
      t)))