[Top][All Lists]

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

Re: Postscript print buffer with ISO date?

From: Svend Tollak Munkejord
Subject: Re: Postscript print buffer with ISO date?
Date: Thu, 20 Feb 2003 10:55:26 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

Today, Eric Marsden <address@hidden> wrote:

>>>>>> "stm" == Svend Tollak Munkejord <address@hidden> writes:
>   stm> I use GNU Emacs 21.2. When I print a buffer using the
>   stm> "Postscript print buffer" function, Emacs prints the date in
>   stm> the format mm/dd/yyyy (e.g. 02/20/2003 today). I would like it
>   stm> to use the ISO format yyyy-mm-dd. I searched the manual, but
>   stm> did not find out how to do this. Can anyone help?
> the stuff that is printed on the right side of the header is
> determined by the variable ps-right-header. If you examine the
> contents of this variable, you probably have an element like
> ps-time-stamp-mon-dd-yyyy. Just change this element to something that
> you prefer. 

Thanks to you and to François for pointing me to the right place.

>    (require 'cl)
>    (defun my-iso8601-date () (format-time-string "%Y-%d-%d"))
>    (eval-after-load "ps-print"
>      (setf (second ps-print-header) 'my-iso8601-date))

I came up with this:

(defun ps-time-stamp-iso ()
  "Return date as \"2003-02-20\"."
  (format-time-string "%Y-%m-%d"))
(setq ps-right-header '("/pagenumberstring load" ps-time-stamp-iso 

Is your solution preferable?

Svend Tollak Munkejord 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]