3

I tried to customize Wanderlust's summary buffer by changing wl-summary-line-format. I would like to see the age of a message in the summary buffer. But I can not find any abbreviation for the age of a message.

In Gnus it was possible to define a gnus-user-format-function-x, which could be referenced in the gnus-summary-line-format. But I can not find anything similar in Wanderlust.

How to show the age of a message in the summary buffer?

  • Describe variable wl-summary-line-format and that gives you a list of what's available. If it's not there, then you would need to implement the feature or do without. My preference is to use: (setq wl-summary-line-format "%T%P [%5(%c %S%) %] %M/%D/%Y (%W) %h:%m %t%[%25(%c %f%) %] [%75(%c %s%)] %n") – lawlist Dec 7 '14 at 19:05
  • @lawlist Is there somewhere the age in it? – ceving Dec 7 '14 at 19:19
  • I'm sorry, but I don't really know what age is -- I rely on the dates a message was sent, and I sort automatically with the newest messages at the top of the buffer. The word age is nowhere to be found within the source file wl-vars.el If you haven't done so already, type: M-x describe-variable RET wl-summary-line-format RET and read the doc-string of available options. – lawlist Dec 7 '14 at 19:35
  • age is the time from now till the time the message has been send. For example "one hour ago", "yesterday", "last week", "two years ago". – ceving Dec 7 '14 at 20:53
  • Ah . . Thank you. Someone would need to implement that feature for you, or you would need to write it yourself -- it does not presently exist. – lawlist Dec 7 '14 at 20:55
4

You'll have to write the wl-summary-line-age function yourself, but the way to add a new summary line format string, e.g. %a is to use:

(defun wl-summary-line-age ()
  ... some magic with the wl-datevec variable (see wl-summary-line-year, etc.)

(setq wl-summary-line-format-spec-alist
      (put-alist '?a
         '((wl-summary-line-age))
         wl-summary-line-format-spec-alist))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.