On Fri, Aug 19, 2016 at 03:22:32PM -0700, Kevin J. McCarthy wrote:
> So this is now setting LC_ALL.  Is there a reason this wasn't done
> before?  Are there subtle bugs that may ensue because of this?  I have
> no idea, so I'd like to hear from everyone familiar with locales issues.

Sorry, after taking a second look I realized it was just moving the
LC_ALL setting above the #ifdef ENABLE_NLS.  So it seems unlikely this
would cause any issues.

> >  - I ADDED a call to setlocale() before the index is redrawn
> 
> I don't see this change in the patch.  Perhaps related to this, how is
> the patch dealing with the user setting $locale either in .muttrc or
> during execution of mutt?

I was thinking about the merits of getting rid of the $locale setting.
I read <https://dev.mutt.org/doc/manual.html#send-hook>:

  Another typical use for this command is to change the values of the
  $attribution, $signature and $locale variables in order to change the
  language of the attributions and signatures based upon the recipients.

So it seems this is probably why the option was created, and I guess
there is some sense to it.  Still, it seems subobtimal to change the
$locale setting (used everywhere) just to modify an attribution.

Would it make sense to create a setting *just* for attributions,
$attribution_locale, and then remove the $locale setting?  This would
then make it cleaner to change the attribution in a send-hook without
having your index dates change every time you send an email.

It would also make the other code cleaner because we don't have to worry
about propagating changes to $locale.  We can just:
    if (!do_locales)
      setlocale(LC_TIME, "C");
    strftime ()
    if (!do_locales)
      setlocale(LC_TIME, "");
in those few places that need it.

Feedback?

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to