On Tue, Jul 17, 2012 at 12:27:37PM -0500, Derek Martin wrote:
 > On Tue, Jul 17, 2012 at 04:12:03PM +0200, Harald Weis wrote:
 
 > >  > Output of mutt -v is:
 > >  > Mutt 1.4.2.3i (2007-05-26)
 > 
 > As I've already suggested, at least if we don't get you fixed with
 > this version, you should really consider getting the latest (1.5.21)
 > and compiling from scratch.  It's not that hard, and it may contain

No problem for me. Have followed this advice and reported in post dated
8 Jul 2012. The port is mutt-devel-1.5.21_4 for us.
Didn't help. So I recompiled my original mutt.

 > bug fixes that eliminate your issues.
 > 
 > Leaving this in for easy reference:
 > 
 > >  > System: FreeBSD 8.3-RELEASE (i386) [using ncurses 5.7]
 > >  > Compile options:
 > >  > -DOMAIN
 > >  > -DEBUG
 > >  > -HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  
 > >  > -USE_FCNTL  +USE_FLOCK
 > >  > +USE_POP  +USE_IMAP  +USE_GSS  +USE_SSL  -USE_SASL  
 > >  > +HAVE_REGCOMP  -USE_GNU_REGEX  +COMPRESSED  
 > >  > +HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
 > >  > +HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
 > >  > +HAVE_PGP  -BUFFY_SIZE -EXACT_ADDRESS  -SUN_ATTACHMENT  
 > >  > +ENABLE_NLS  +LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
 > >  > +HAVE_LANGINFO_YESEXPR  
 > >  > +HAVE_ICONV  -ICONV_NONTRANS  +HAVE_GETSID  +HAVE_GETADDRINFO  
 > >  > -ISPELL
 > >  > SENDMAIL="/usr/sbin/sendmail"
 > >  > MAILPATH="/var/mail"
 > >  > PKGDATADIR="/usr/local/share/mutt"
 > >  > SYSCONFDIR="/usr/local/etc"
 > >  > EXECSHELL="/bin/sh"
 > >  > -MIXMASTER
 > >  > To contact the developers, please mail to <mutt-...@mutt.org>.
 > >  > To report a bug, please use the flea(1) utility.
 > >  > 
 > >  > vvv.initials
 > >  > 1.3.28.nr.threadcomplete
 > >  > rr.compressed
 > >
 > > Does everybody think - when reading this message -
 > > that my case is hopeless ?
 > 
 > It's not hopeless, but it's hard to guess how to help you from here.
 > I know you may have answered some of these questions already, but it
 > might be helpful to get the answers to all of the following questions
 > in one place, to compare the different settings (and I've lost the
 > beginning of the thread).  So, if you still want help, please provide
 > the answers/output to all of the following:
 > 
 > What is the output of 'locale -a |grep "$LANG"' (without the single
 > quotes) on your system?

me@pollux:~ % locale -a | grep "$LANG"
en_US.UTF-8
 
 > What is the output of 'locale' (without the single quotes) on your
 > system?

me@pollux:~ % locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
 
 > What is the output of 'locale' FROM WITHIN MUTT (press '!' to ask mutt
 > for a shell prompt, then type locale<enter>)?

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
Press any key to continue...
 
 > What terminal emulator are you using?

Xterm since ages and tmux since several months now.

Under tmux:
me@pollux:~ % setenv | grep TERM
TERM=screen
XTERM_VERSION=X.Org 6.8.99.903(267)
XTERM_LOCALE=en_US.UTF-8
TERMCAP=xterm|xterm-color|X11 terminal 
emulator:ti@:te@:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:@7=\EOF:@8=\EOM:kI=\E[2~:kh=\EOH:kP=\E[5~:kN=\E[6~:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:Km=\E[M:li#67:co#139:am:kn#12:km:mi:ms:xn:AX:bl=^G:is=\E[!p\E[?3;4l\E[4l\E>:rs=\E[!p\E[?3;4l\E[4l\E>:le=^H:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:al=\E[L:dc=\E[P:dl=\E[M:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:ho=\E[H:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l:ks=\E[?1h\E=:ke=\E[?1l\E>:kD=\E[3~:sf=\n:sr=\EM:st=\EH:ct=\E[3g:sc=\E7:rc=\E8:eA=\E(B\E)0:as=\E(0:ae=\E(B:ml=\El:mu=\Em:up=\E[A:nd=\E[C:md=\E[1m:me=\E[m:mr=\E[7m:so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:vi=\E[?25l:ve=\E[?25h:ut:Co#8:pa#64:op=\E[39;49m:AB=\E[4%dm:AF=\E[3%dm:kb=\010:
XTERM_SHELL=/bin/tcsh

Under (pure) xterm:
me@pollux:~ % setenv | grep TERM
TERM=xterm-color
XTERM_VERSION=X.Org 6.8.99.903(267)
XTERM_LOCALE=en_US.UTF-8
TERMCAP=xterm|xterm-color|X11 terminal 
emulator:ti@:te@:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:@7=\EOF:@8=\EOM:kI=\E[2~:kh=\EOH:kP=\E[5~:kN=\E[6~:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:Km=\E[M:li#40:co#80:am:kn#12:km:mi:ms:xn:AX:bl=^G:is=\E[!p\E[?3;4l\E[4l\E>:rs=\E[!p\E[?3;4l\E[4l\E>:le=^H:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:al=\E[L:dc=\E[P:dl=\E[M:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:ho=\E[H:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l:ks=\E[?1h\E=:ke=\E[?1l\E>:kD=\E[3~:sf=\n:sr=\EM:st=\EH:ct=\E[3g:sc=\E7:rc=\E8:eA=\E(B\E)0:as=\E(0:ae=\E(B:ml=\El:mu=\Em:up=\E[A:nd=\E[C:md=\E[1m:me=\E[m:mr=\E[7m:so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:vi=\E[?25l:ve=\E[?25h:ut:Co#8:pa#64:op=\E[39;49m:AB=\E[4%dm:AF=\E[3%dm:kb=\010:
XTERM_SHELL=/bin/tcsh

(Sorry for the long TERMCAP lines, joe's wrap option does not work in this
special case. Maybe due to the backslaches.)

Whether I run mutt under tmux or pure xterm makes no difference.

 > How do you start the terminal emulator you're running Mutt in (i.e. do
 > you start it manually from the command line, or are you clicking an
 > icon in your desktop environment)?

Using mcwm, no icons, no menus. Minimalistic, but great window manager.

me@pollux:~ % grep xterm .xinitrc
mcwm -t xterm &
exec xterm
  
 > If the answer to the previous question was by clicking on an icon, did
 > you try starting your terminal emulator from the command line, where
 > you know your locale is set correctly?  (If not, do so.)

It makes no difference if, within xterm, I start another xterm from the
command line.

 > What font is your emulator using, and how is it configured/selected?

me@pollux:~ % grep 'home' .xinitrc
xset +fp 
/usr/home/me/local/lib/X11/fonts/misc,/usr/home/me/local/lib/X11/fonts/100dpi,\
/usr/home/me/local/lib/X11/fonts/75dpi,/usr/home/me/local/lib/X11/fonts/unnec_100dpi,\
/usr/home/me/local/lib/X11/fonts/unnec_75dpi

me@pollux:~ % egrep "^XTerm\*font" .Xdefaults
XTerm*font:             u9x15

me@pollux:~ % egrep "^u9x15 " local/lib/X11/fonts/misc/fonts.alias
u9x15 -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1
 
 > What is the output of 'ldd `which mutt`' on your system?

me@pollux:~ % ldd `which mutt`
/usr/local/bin/mutt:
        libncursesw.so.8 => /lib/libncursesw.so.8 (0x2810d000)
        libgssapi.so.10 => /usr/lib/libgssapi.so.10 (0x2815b000)
        libheimntlm.so.10 => /usr/lib/libheimntlm.so.10 (0x28164000)
        libkrb5.so.10 => /usr/lib/libkrb5.so.10 (0x28169000)
        libhx509.so.10 => /usr/lib/libhx509.so.10 (0x281c7000)
        libcom_err.so.5 => /usr/lib/libcom_err.so.5 (0x281fd000)
        libcrypto.so.6 => /lib/libcrypto.so.6 (0x281ff000)
        libasn1.so.10 => /usr/lib/libasn1.so.10 (0x2835b000)
        libroken.so.10 => /usr/lib/libroken.so.10 (0x283d0000)
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x283e0000)
        libssl.so.6 => /usr/lib/libssl.so.6 (0x28406000)
        libintl.so.9 => /usr/local/lib/libintl.so.9 (0x2844f000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28458000)
        libc.so.7 => /lib/libc.so.7 (0x28550000)
 
 > Can you resend a sample e-mail that doesn't display correctly in the
 > pager?  (I want to hex dump it to look at the raw bytes.)

See attached file `file-modification-times'.
 
-- 
Harald Weis
>From help-gnu-emacs-bounces+hawei=free...@gnu.org  Sun Jul  1 08:26:42 2012
Return-Path: <help-gnu-emacs-bounces+hawei=free...@gnu.org>
Delivered-To: unknown
Received: from pop.free.fr (212.27.48.3) by pollux.local.net with POP3; 01
  Jul 2012 06:26:42 -0000
Delivered-To: free.fr-ha...@free.fr
Received: (qmail 21219 invoked from network); 1 Jul 2012 01:20:12 -0000
Received: from mx24-g26.free.fr (HELO lists.gnu.org) (212.27.42.86)
  by mrelay2-g25.free.fr with SMTP; 1 Jul 2012 01:20:12 -0000
Received: from lists.gnu.org ([208.118.235.17])
        by mx1-g20.free.fr (MXproxy) for ha...@free.fr;
        Sun,  1 Jul 2012 03:20:12 +0200 (CEST)
X-ProXaD-SC: state=HAM score=0
Received: from localhost ([::1]:55498 helo=lists.gnu.org)
        by lists.gnu.org with esmtp (Exim 4.71)
        (envelope-from <help-gnu-emacs-bounces+hawei=free...@gnu.org>)
        id 1Sl8pe-0002O0-Sc
        for ha...@free.fr; Sat, 30 Jun 2012 21:20:10 -0400
Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: "Pascal J. Bourguignon" <p...@informatimago.com>
Newsgroups: gnu.emacs.help
Subject: Re: How to compare time of last file modification?
Date: Sun, 01 Jul 2012 03:16:11 +0200
Organization: Informatimago
Message-ID: <87bok0nuw4....@kuiper.lan.informatimago.com>
References: <mailman.3790.1341102956.855.help-gnu-em...@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net
        UH0OD8BC3lGFgcwvJfC2dwU82AtFodOgjOyNBQbYY2xwSRWxPSbR0KRwGvhsPwAvCq
Cancel-Lock: sha1:NWUwNjdkNTliMDNkZTI2YTcxNTRiNDBhMjg0MzY3ZDNhZTUxODgwZQ==
        sha1:6vtVak5BnNjfNsX7N21ezUEfjkk=
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA
        oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9
        033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac
        l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR
        mV+hO/VvFAAAAABJRU5ErkJggg==
X-Accept-Language: fr, es, en
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Xref: usenet.stanford.edu gnu.emacs.help:193205
To: help-gnu-em...@gnu.org
X-BeenThere: help-gnu-em...@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
        <mailto:help-gnu-emacs-requ...@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-gnu-emacs>
List-Post: <mailto:help-gnu-em...@gnu.org>
List-Help: <mailto:help-gnu-emacs-requ...@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-requ...@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+hawei=free...@gnu.org
Sender: help-gnu-emacs-bounces+hawei=free...@gnu.org
X-Folder: MLDIR
Status: RO
Content-Length: 3652
Lines: 117

Thorsten Jolitz <tjol...@googlemail.com> writes:

> Hi List, 
> the Elisp manual tells me about file-attributes:
>
>
>      4. The time of last access, as a list of two integers. The
>         first integer has the high-order 16 bits of time, the
>         second has the low 16 bits. (This is similar to the value
>         of current-time; see Time of Day.) Note that on some
>         FAT-based filesystems, only the date of last access is
>         recorded, so this time will always hold the midnight of the
>         day of last access.
>        
>      5. The time of last modification as a list of two integers (as
>         above). This is the last time when the file's contents were
>         modified.
>
>
> If I want to compare the time of last modification of two files - how do
> I do that, using these two integers? 

You have to apply some powerful magic, called "maths".

If I were you, I'd not read the following of that message, it's much too
esoteric.



The first time is characterized with this system of equations:

  t₁ =  65536×h₁ + l₁
  0 ≤ h₁ < 65536
  0 ≤ l₁ < 65536

The second time with this similar system:

  t₂ =  65536×h₂ + l₂
  0 ≤ h₂ < 65536
  0 ≤ l₂ < 65536


Comparing those times is adding this equation to the above system:

  t₁ < t₂
  t₁ =  65536×h₁ + l₁
  0 ≤ h₁ < 65536
  0 ≤ l₁ < 65536
  t₂ =  65536×h₂ + l₂
  0 ≤ h₂ < 65536
  0 ≤ l₂ < 65536

So we have to solve a system of equations with 3 variables and 7
equations.

I told you do not read further!


              t₁ < t₂           ∧  t₁ =  65536×h₁ + l₁ ∧  t₂ =  65536×h₂ + l₂
  ⇔  65536×h₁+l₁ < 65536×h₂+l₂  ∧  t₁ =  65536×h₁ + l₁ ∧  t₂ =  65536×h₂ + l₂


Now, notice that: 

      ∀n, 65536×(n+1) + 0 > 65536×n + 65535
  ⇔  ∀n, 65536×n + 65536 > 65536×n + 65535
  ⇔  ∀n,           65536 > 65535
  ⇔  true

Similarly, 

      ∀n,p  n > p ⇒ 65536×n + 0          > 65536×p + 65535
  ⇔  ∀n,p  n > p ⇒ 65536×(n-p+p)        > 65536×p + 65535
  ⇔  ∀n,p  n > p ⇒ 65536×(n-p)+65536×p  > 65536×p + 65535
  ⇔  ∀n,p  n > p ⇒ 65536×(n-p) > 65535
  ⇔  ∀n,p  n > p ⇒ 65536×(n-p) ≥ 65536 > 65535
  ⇔  ∀n,p  n > p ⇒ true
  ⇔  true

Therefore, if h₂ > h₁ then t₂ > t₁
       and if h₁ > h₂ then t₁ > t₂

Now, if h₂ = h₁, then 

        t₁ < t₂ ∧ t₁ =  65536×h₁ + l₁ ∧ t₂ =  65536×h₂ + l₂ ∧ h₁ = h₂

  ⇔  65536×h₁+l₁ < 65536×h₁+l₂  ∧  t₁ =  65536×h₁ + l₁ 
                               ∧  t₂ =  65536×h₂ + l₂ ∧ h₁ = h₂

  ⇔  l₁ < l₂  ∧  t₁ =  65536×h₁ + l₁ ∧  t₂ =  65536×h₂ + l₂ ∧ h₁ = h₂


Therefore, if h₂ > h₁ then t₂ > t₁
           if h₁ > h₂ then t₁ > t₂
           if h₁ = h₂ then if l₁ < l₂ then t₁ < t₂
                          if l₁ > l₂ then t₁ > t₂
                          if l₁ = l₂ then t₁ = t₂

Does this look like an "algorithms"?  I told you, dark magic here!


    (defun time-lessp (t1 t2)
      "Returns whether t1<t2
    t1 and t2 are lists of two integers. The first integer has the
    high-order 16 bits of time, the second has the low 16 bits."
      (destructuring-bind (h1 l1) t1
        (destructuring-bind (h2 l2) t2
           (cond
             ((< h1 h2) t)
             ((> h1 h2) nil)
             (t (cond ((< l1 l2) t)
                      (t         nil)))))))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.

Reply via email to