[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attachment mark



Rodrigo Amestica wrote:
> 
> Hi,
> 
> is there any way to add a mark to the summary line format that would
> let me know whether the message contains an attachment or not? By
> attachment I mean, for example, a pdf file.

Not off the top of my head, but I do have a different summary line
customization which some enterprising person could use as a template. 
With this, %E in your summary line will display a "*" if the message
is addressed directly to you (via To or CC), and a blank space
otherwise (for example, if you got it via a mailing list). With thanks
to Erik Hetzner for some fixes:

  (defun wl-summary-line-to-me ()
    (let ((all-addresses (append
                          (elmo-message-entity-field wl-message-entity 'to t)
                          (elmo-message-entity-field wl-message-entity 'cc t)))
         (to-me nil))
      (while (and all-addresses
                  (not to-me))
        (setq to-me (wl-address-user-mail-address-p (car all-addresses)))
        (setq all-addresses (cdr all-addresses)))
      (if to-me "*" " ")))

  (setq wl-summary-line-format-spec-alist
        (put-alist '?E
                   '((wl-summary-line-to-me))
                   wl-summary-line-format-spec-alist))

--
Ron Isaacson
Morgan Stanley
ron.isaacson@morganstanley.com / (212) 276-1349