unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Bug in format-time-string in emacs 21.1?
Date: 13 Mar 2002 19:49:35 +0000	[thread overview]
Message-ID: <m3eliop7sg.fsf@nyaumo.btinternet.com> (raw)
In-Reply-To: <200203122337.g2CNax910197@shade.twinsun.com>

Paul Eggert <eggert@twinsun.com> writes:

> > From: Jason Rumney <jasonr@gnu.org>
> > Date: 12 Mar 2002 22:56:44 +0000
> > 
> > after experimenting with all the documented format specifiers, it
> > seems that "%h" is the only one that does not work with the current code
> 
> Surely you not have tested this exhaustively.

I didn't test all the %O and %E permutations, as the documentation
was vague about which format specifiers they are supposed to work
with. It turns out that they do not work on Windows either, though the
symptoms are different; %h returns "", while %OY returns "%OY".

> > some effort has obviously already been made to make the other
> > specifiers that are not supported by the system strftime function
> > work.
> 
> I think you may be reading too much into the code here.

%C, %G, %g, %V are not supported by the underlying library function
either, but they work. That is why I concluded that some effort has
already been made to accommodate systems that do not support those
format specifiers.

> For example, for the %OY format the system merely invokes the
> underlying strftime; if the underlying strftime mishandles %OY then
> there is no workaround.

Perhaps %OY would be better approximated by %Y on systems that do not
support it.  At least the information gets to the user, even if it is
in a different format.


  So in this respect, %h is similar to %OY,
> %Ea, and lots of other formats.
> 
> 
> > In the case of "%h", it is documented as doing the same as "%b", so
> > we can fix that easily.
> 
> But that will introduce either minor runtime overhead, or
> hard-to-maintain Microsoft-version-specific ifdefs,

I don't propose making this Microsoft-specific. There are likely to
be other systems that do not support %h %O and %E, in which case the
same conditional code should be used.

> and I doubt whether either belongs in the GNU C Library source code
> (which is where strftime.c lives).

Really?  Why does the GNU C Library have all that complicated
conditional code to handle the case where it is not the GNU C
Library.  Surely this code would be better separated into the GNU C
Library version (without that code) and the Emacs version (without
the special code for the GNU C Library). Most of the conditional code
could then disappear.


-- 
Jason Rumney


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-03-13 19:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.SUN.3.91.1020312075746.24908F-100000@is>
     [not found] ` <m3n0xep8u8.fsf@Janik.cz>
2002-03-12 21:35   ` Bug in format-time-string in emacs 21.1? Jason Rumney
2002-03-12 22:21     ` Paul Eggert
2002-03-12 22:56       ` Jason Rumney
2002-03-12 23:37         ` Paul Eggert
2002-03-13 19:49           ` Jason Rumney [this message]
2002-03-14  0:37             ` Paul Eggert
2002-03-13 10:59     ` Richard Stallman
2002-03-13 22:13       ` Jason Rumney
2002-03-14  0:13         ` Paul Eggert
2002-03-14 22:28           ` Jason Rumney

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m3eliop7sg.fsf@nyaumo.btinternet.com \
    --to=jasonr@gnu.org \
    --cc=emacs-devel@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).