all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Svend Tollak Munkejord <stm@bacchus.pvv.org>
Subject: Re: Postscript print buffer with ISO date?
Date: Thu, 20 Feb 2003 10:55:26 +0100	[thread overview]
Message-ID: <hdd4r6zp981.fsf@bacchus.pvv.ntnu.no> (raw)
In-Reply-To: wziel63nvlw.fsf@melbourne.laas.fr

Today, Eric Marsden <emarsden@laas.fr> wrote:

>>>>>> "stm" == Svend Tollak Munkejord <stm@bacchus.pvv.org> 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 ps-time-stamp-hh:mm:ss))

Is your solution preferable?

Regards,
-- 
Svend Tollak Munkejord 

  reply	other threads:[~2003-02-20  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20  8:42 Postscript print buffer with ISO date? Svend Tollak Munkejord
2003-02-20  9:11 ` François Fleuret
2003-02-20  9:34 ` Eric Marsden
2003-02-20  9:55   ` Svend Tollak Munkejord [this message]
2003-02-20 10:20     ` Eric Marsden
2003-02-20 20:24       ` Kevin Rodgers
2003-02-21  8:25         ` Eric Marsden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=hdd4r6zp981.fsf@bacchus.pvv.ntnu.no \
    --to=stm@bacchus.pvv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.