From: kaoru Date: Thu, 28 May 2009 10:39:58 +0000 (+0000) Subject: 2009-05-26 Vitaly Mayatskikh X-Git-Tag: elmo-imap4-compliance-root~94 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=56ec7240eef89ae587708733e3f73834619d8c66;p=elisp%2Fwanderlust.git 2009-05-26 Vitaly Mayatskikh * wl-summary.el (wl-summary-display-raw): New function, display message in raw format. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index e83a52f..8d02305 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2009-05-26 Vitaly Mayatskikh + + * wl-summary.el (wl-summary-display-raw): New function, display + message in raw format. + 2009-05-26 TAKAHASHI Kaoru * Version number is increased to 2.15.7. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 61b2965..ac04708 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -291,7 +291,8 @@ See also variable `wl-use-petname'." ["Resend bounced mail" wl-summary-resend-bounced-mail t] ["Enter the message" wl-summary-jump-to-current-message t] ["Pipe message" wl-summary-pipe-message t] - ["Print message" wl-summary-print-message t]) + ["Print message" wl-summary-print-message t] + ["View raw message" wl-summary-display-raw t]) ("Thread Operation" ["Open or Close" wl-thread-open-close (eq wl-summary-buffer-view 'thread)] ["Open all" wl-thread-open-all (eq wl-summary-buffer-view 'thread)] @@ -387,6 +388,7 @@ See also variable `wl-use-petname'." ;; basic commands (define-key wl-summary-mode-map " " 'wl-summary-read) (define-key wl-summary-mode-map "." 'wl-summary-redisplay) + (define-key wl-summary-mode-map "," 'wl-summary-display-raw) (define-key wl-summary-mode-map "<" 'wl-summary-display-top) (define-key wl-summary-mode-map ">" 'wl-summary-display-bottom) (define-key wl-summary-mode-map "\177" 'wl-summary-prev-page) @@ -4741,6 +4743,31 @@ If ARG is numeric number, decode message as following: (if message-buf (set-buffer message-buf)) (wl-draft-edit-string (buffer-substring (point-min) (point-max))))))) +(defun wl-summary-display-raw (&optional arg) + "Display current message in raw format." + (interactive) + (let ((number (wl-summary-message-number)) + (folder wl-summary-buffer-elmo-folder)) + (if number + (let ((raw (elmo-message-fetch-string + folder number + (elmo-find-fetch-strategy folder number))) + (raw-buffer (get-buffer-create "*wl:raw message*")) + (raw-mode-map (make-sparse-keymap))) + (with-current-buffer raw-buffer + (toggle-read-only -1) + (erase-buffer) + (princ raw raw-buffer) + (toggle-read-only t) + (beginning-of-buffer) + (switch-to-buffer-other-window raw-buffer) + (define-key raw-mode-map "l" 'toggle-truncate-lines) + (define-key raw-mode-map "q" 'kill-buffer-and-window) + (define-key raw-mode-map "," 'kill-buffer-and-window) + (use-local-map raw-mode-map))) + (message "No message to display.")) + number)) + (defun wl-summary-save (&optional arg wl-save-dir) "Save current message to disk." (interactive)