;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
(function :tag "Use muttprint then evince" notmuch-print-muttprint/evince)
(function :tag "Using a custom function")))
(function :tag "Use muttprint then evince" notmuch-print-muttprint/evince)
(function :tag "Using a custom function")))
"Pass the contents of the current buffer to 'muttprint'.
Optional OUTPUT allows passing a list of flags to muttprint."
"Pass the contents of the current buffer to 'muttprint'.
Optional OUTPUT allows passing a list of flags to muttprint."
"Print a message buffer using lpr."
(lpr-buffer))
(defun notmuch-print-ps-print (msg)
"Print a message buffer using the ps-print package."
"Print a message buffer using lpr."
(lpr-buffer))
(defun notmuch-print-ps-print (msg)
"Print a message buffer using the ps-print package."
(rename-buffer subject t)
(ps-print-buffer)))
(defun notmuch-print-ps-print/evince (msg)
"Preview a message buffer using ps-print and evince."
(rename-buffer subject t)
(ps-print-buffer)))
(defun notmuch-print-ps-print/evince (msg)
"Preview a message buffer using ps-print and evince."
- (let ((ps-file (make-temp-file "notmuch"))
- (subject (plist-get (notmuch-show-get-prop :headers msg) :Subject)))
+ (let ((ps-file (make-temp-file "notmuch" nil ".ps"))
+ (subject (notmuch-prettify-subject
+ (plist-get (notmuch-show-get-prop :headers msg) :Subject))))
(rename-buffer subject t)
(ps-print-buffer ps-file)
(notmuch-print-run-evince ps-file)))
(rename-buffer subject t)
(ps-print-buffer ps-file)
(notmuch-print-run-evince ps-file)))
(notmuch-print-run-muttprint (list "--printer" (concat "TO_FILE:" ps-file)))
(notmuch-print-run-evince ps-file)))
(defun notmuch-print-message (msg)
"Print a message using the user-selected mechanism."
(notmuch-print-run-muttprint (list "--printer" (concat "TO_FILE:" ps-file)))
(notmuch-print-run-evince ps-file)))
(defun notmuch-print-message (msg)
"Print a message using the user-selected mechanism."