[mew-int 00828] Re: mew-cite-fields date

Tatsuya Kinoshita tats at example.com
Mon Apr 8 09:38:27 JST 2002


In message [mew-int 00827], on Sun, 7 Apr 2002,
Chris Beggy <chrisb at example.com> wrote:

> I would like to use a simpler date than the one in:
> 
>      (defvar mew-cite-fields '("From:" "Subject:" "Date:"))
> 
> which gives a detailed date:
> 
>       Sun, 07 Apr 2002 19:58:33 -0400 (EDT)
> 
> I just want:
>    
>       07 Apr 2002

You can do it by `mew-cite-strings-function'.

I give you a sample of ~/.mew.el:

---- 
(setq mew-cite-fields '("Subject:" "Date:" "From:"))
(setq mew-cite-format "In message \"%s\"\non %s, %s wrote:\n\n")
(setq mew-cite-prefix-function nil)
(setq mew-cite-strings-function
      '(lambda ()
	 (let ((str (mew-cite-strings)))
	   ;; Simplify `Date:'
	   (when (string-match "^\\(on .*\\) +[0-9][0-9]:[0-9][0-9][^,]*" str)
	     (setq str (replace-match (match-string 1 str) nil t str)))
	   ;; Simplify `From:'
	   (when (string-match "\\(([^)]+) *\\)\\(<[^>]+> wrote:\n\n\\)$" str)
	     (setq str (replace-match (match-string 2 str) nil t str)))
	   str))
      ) ;; default value is (function mew-cite-strings)
---- 

-- 
Tatsuya Kinoshita



More information about the Mew-int mailing list