From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/17923 Path: main.gmane.org!not-for-mail From: Robert Bihlmeyer Newsgroups: gmane.emacs.gnus.general Subject: Re: pgnus and message-make-date Date: 19 Oct 1998 17:53:15 +0200 Organization: Channel XXIII Sender: owner-ding@hpc.uh.edu Message-ID: References: <86yaqnynju.fsf@slowfox.cs.uni-dortmund.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035156535 3349 80.91.224.250 (20 Oct 2002 23:28:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:28:55 +0000 (UTC) Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA27030 for ; Mon, 19 Oct 1998 11:54:17 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id KAB02659; Mon, 19 Oct 1998 10:53:50 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 19 Oct 1998 10:53:44 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id KAA12658 for ; Mon, 19 Oct 1998 10:53:34 -0500 (CDT) Original-Received: from mars.zserv.tuwien.ac.at (mars.zserv.tuwien.ac.at [193.170.75.15]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id LAA27004 for ; Mon, 19 Oct 1998 11:53:15 -0400 (EDT) Original-Received: (qmail 19665 invoked by uid 524); 19 Oct 1998 15:53:16 -0000 Original-To: ding@gnus.org X-Attribution: Robbe In-Reply-To: Lars Magne Ingebrigtsen's message of "17 Oct 1998 21:39:19 +0200" Original-Lines: 58 X-Mailer: Gnus v5.6.11/XEmacs 20.4 - "Emerald" Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:17923 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:17923 >>>>> On 17 Oct 1998 21:39:19 +0200 >>>>> Lars Magne Ingebrigtsen said: Lars> Robert Bihlmeyer writes: Or do Lars> things respond to the LC_LANG (etc.) environment variables? >> >> The LC_* environment variables are used when calling setlocal(). >> This is normally only done at the start of a program. Lars> Surely I can't be the only one who needs to dislocalize the Lars> environment momentarily to do something, like, standardized. This is code from the GNU libc manual, that temporarily changes the locale: #include #include #include #include void with_other_locale (char *new_locale, void (*subroutine) (int), int argument) { char *old_locale, *saved_locale; /* Get the name of the current locale. */ old_locale = setlocale (LC_ALL, NULL); /* Copy the name so it won't be clobbered by `setlocale'. */ saved_locale = strdup (old_locale); if (old_locale == NULL) fatal ("Out of memory"); /* Now change the locale and do some stuff with it. */ setlocale (LC_ALL, new_locale); (*subroutine) (argument); /* Restore the original locale. */ setlocale (LC_ALL, saved_locale); free (saved_locale); } If someone would translate this into a proper emacs primitive, you could do: (with-locale "C" ; do date formatting ) Someone with his hands deep in emacs guts wants to do this? Hrvoje? Steve? Robbe -- Robert Bihlmeyer reads: Deutsch, English, MIME, Latin-1, NO SPAM!