[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small feature request
In addition:
Markus Oehme wrote:
>
> If this is too complicated, an easier question: Is it possible to get to know
> the local filename of an email, so I can manually open it?
Not that it's too complicated, but this is useful as well. :-)
(defun wl-summary-current-message-filename ()
(let* ((folder-name (wl-summary-buffer-folder-name))
(folder-type (elmo-folder-type folder-name))
(msg-num (wl-summary-message-number))
(msgid (and msg-num
(elmo-message-field wl-summary-buffer-elmo-folder
msg-num 'message-id))))
(if (not msgid)
nil
(cond
((string= folder-type "maildir")
(let* ((folder (wl-folder-get-elmo-folder folder-name))
(location (elmo-map-message-location folder msg-num))
(filename (elmo-maildir-message-file-name folder location)))
filename))
(t
(elmo-cache-get-path msgid))))))
(defun wl-summary-show-current-message-number ()
(interactive)
(let ((num (wl-summary-message-number)))
(if num
(message "%d %s - %s"
num
wl-summary-buffer-folder-name
(wl-summary-current-message-filename))
(message "No message"))))
(define-key wl-summary-mode-map "=" 'wl-summary-show-current-message-number)
You could also choose to have it automatically do an (own-selection)
on the filename, to put it on the clipboard, which is quite handy...
--
Ron Isaacson
Morgan Stanley
ron.isaacson@morganstanley.com / (212) 276-1349