Subject: Article ordering in Pine

From: Sen Sui <[email-masked]>
Date: Tue, 6 May 2003 15:15:39 +0800 (China Standard Time)

Hi,

It seems that PINE will not sort message by received time order once the
message is saved in folders other than the inbox.

Is there any workaround or patch to have PINE still retain the received
order in other mail folders.

Thanks.

---------- Forwarded message ----------
Date: Tue, 6 May 2003 08:05:54 +0800 (HKT)
From: Jimmy H.M. Lee <[email-masked]>
To: Sen Sui <[email-masked]>
Subject: Re: Article ordering in Pine ...

No, I think Pine takes the order (not the time and date) in which messages
arrive at the mailbox.  This is the same with your definition as far as the
inbox is concerned.  However, the definitions differ when it comes to
mailboxes for archiving emails.  Suppose I have two emails m1 and m2 which
arrive at time t1 and t2, where t1 < t2.  The email m2 will appear first in
my inbox if I use Reverse Arrival.  However, if I save m2 and then m1 to
the archive, then when I look at the archive, m1 will appear first in the
archive (using Reverse Arrival).  This really messes up the order the
messages.

Elm uses your definition, which is exactly what I want.

The "Date" order is no good, since it messes up the actual arrival order of
the emails in the presence of emails from different time zones.

Cheers,
jim

On Tue, 6 May 2003, Sen Sui wrote:

> The arrival in Pine is the time the message arrived at the pine inbox, I
> think.  If you want to use the time the sender sent the message, sort by
> "date".
>
> What definition Elm uses?
>
> On Mon, 5 May 2003, Jimmy H.M. Lee wrote:
>
> > Dear Sen,
> >
> > How do you order your emails in Pine?  I find that Pine has a different
> > definition of "Arrival" as Elm (which is more correct).
> >
> > jim
> >
>

---

From: Gopi Sundaram <[email-masked]>
Date: Tue, 6 May 2003 10:35:23 -0500 (CDT)

On Tue, 6 May 2003, Sen Sui wrote:

> It seems that PINE will not sort message by received time order once
> the message is saved in folders other than the inbox.

It sorts by arrival time of the message IN THAT MAILBOX. This is, in my
opinion, the correct behavior.

Pine does not preserve the "From " line message separator in the mbox
format (which is where the arrival time is stored). If you have another
MUA that does, use that to move messages around.

-- 
Gopi Sundaram
http://www.zrox.net/Mail/Pine/

---

From: Mats Dufberg <[email-masked]>
Date: Tue, 6 May 2003 23:51:00 +0200 (CEST)

> opinion, the correct behavior.

Well, it would be good if there was a way to resort the messages either
based on time of arrival or date field date, or something else.

> MUA that does, use that to move messages around.

Last (the top most) received field contains the time of arrival.

Mats

-----------------------------------------------------------------
Mats Dufberg                                         mats@dufberg
Blaoarvsgraend 42                                  +46-8-38 48 59
SE-162 45 Vaellingby, Sweden                      +46-70-258 2588

---

From: Barry Landy <[email-masked]>
Date: Tue, 6 May 2003 23:06:11 +0100 (BST)

On Tue, 6 May 2003, Mats Dufberg wrote:

:>Well, it would be good if there was a way to resort the messages either
:>based on time of arrival or date field date, or something else.
:>

Hullo? $ D sorts by date field.

-- 
Barry Landy                        Home:               +44-1223-570417
192, Gilbert Road                  College:            +44-1223-332058
Cambridge CB4 3PB                  Email:[email-masked]

---

From: Mats Dufberg <[email-masked]>
Date: Wed, 7 May 2003 00:37:38 +0200 (CEST)

> Hullo? $ D sorts by date field.

Yes, but only until you quit pine. It is powerful because you can have
different sorting i different pine sessions, but it would be more powerful
if you could resort the mail in the mailbox, even if it took some time.

Sorting by original arrival should be added to the wishlist. Actually,
even if you use MBX format, the first line of the mail contains that
information.

Mats

---

From: Terry Gray <[email-masked]>
Date: Tue, 6 May 2003 16:02:02 -0700 (Pacific Daylight Time)

Does it help to realize that Pine nevers sorts *mailboxes*, only its
*VIEW* of a mailbox?

-teg

---

From: Douglas Kline <[email-masked]>
Date: Tue, 6 May 2003 19:15:31 -0400 (EDT)

That is the answer here.  Re-sorting the messages in the mailbox isn't
possible if the mailbox is the user's spooling file.  That would mean
separating out each message individually and re-writing the file, the same
file to which incoming messages are appended.  Re-writing the index of
messages which pine (or some other e-mail client) displays, OTOH, is an
internal pine matter.  It has the list in memory and can either re-write
that list or simply write out the lines in the list in a different order.
Re-writing the list makes more sense if the user is going to work with the
different order, grouping messages by number for example.

Douglas

---

From: Satya <[email-masked]>
Date: Tue, 06 May 2003 19:22:20 -0400 (EDT)

>different sorting i different pine sessions, but it would be more powerful

Different pine sessions?

>if you could resort the mail in the mailbox, even if it took some time.

I do this by creating a temp folder, sorting everything, select all,
save to temp folder, delete, go to temp folder, select all, and save
back to original folder. Takes less time to do than to describe.

>even if you use MBX format, the first line of the mail contains that

$a does it.

-- 
Satya. <URL:http://satya.virtualave.net/>
We are sorry, but the number you have dialed is imaginary. Please
rotate your phone 90 degrees and try again.

---

From: Sen Sui <[email-masked]>
Date: Wed, 7 May 2003 10:59:07 +0800 (China Standard Time)

> >even if you use MBX format, the first line of the mail contains that

$a only sort by arrival time to the mail folder.  Not the actual time
received by the user inbox.

---

From: Sen Sui <[email-masked]>
Date: Wed, 7 May 2003 11:00:18 +0800 (China Standard Time)

In that case, wouldn't it be easier?  Since it's more efficient to work
with headers only than the whole text?

---

From: Sen Sui <[email-masked]>
Date: Wed, 7 May 2003 11:02:43 +0800 (China Standard Time)

Yes.  A friend told me it's inefficient to operate on a flat mail folder
file.  Afterall, it's not a database.  But another friend told me that Elm
does it right.  Ok, so perhaps PINE.  :P

---

From: Barry Landy <[email-masked]>
Date: Wed, 7 May 2003 06:52:23 +0100 (BST)

:>I do this by creating a temp folder, sorting everything, select all,
:>save to temp folder, delete, go to temp folder, select all, and save
:>back to original folder. Takes less time to do than to describe.

Exactly!

As I recall the Pine team made this possible at my request.(At one time
if you did SORT, seclect all, apply save, it did it in folder order
rather than index order for efficiency)

---

From: Nancy McGough <[email-masked]>
Date: Wed, 7 May 2003 08:11:50 +0100 (BST)

> :>back to original folder. Takes less time to do than to describe.

Alternatively the last step could be Rename rather than save back
to original folder. Also make sure that the hidden feature
save-aggregates-copy-sequence is *not* set otherwise the order
may not be preserved.

> rather than index order for efficiency)

Mulberry does not preserve the order of the current "View" when
doing an aggregate save and this is one (of the many) reasons
that I still sometimes use Pine rather than completely switching
to Mulberry.

Nancy

-- 
Nancy McGough
Infinite Ink                              Log and Discussion
<http://www.ii.com>                <http://ii.deflexion.com>
--- Computing  -  Mathematics  -  Science  -  Philosophy ---

---

From: Jo Knox <[email-masked]>
Date: Wed, 7 May 2003 12:03:25 -0800 (AKDT)

> back to original folder. Takes less time to do than to describe.

I sort, select all, save to the same folder I'm in---you don't really need
the temp folder!
jo

---

From: Mats Dufberg <[email-masked]>
Date: Wed, 7 May 2003 22:15:10 +0200 (CEST)

> Does it help to realize that Pine nevers sorts *mailboxes*, only its

Well, that is the limitation that I tried to convey. -- I'd like to have
both sorting of mailboxes and views of mailboxes.

Mats

---

From: Mats Dufberg <[email-masked]>
Date: Wed, 7 May 2003 22:21:21 +0200 (CEST)

On May 6, 2003, 19:15 (-0400) Douglas Kline <[email-masked]> wrote:

> file to which incoming messages are appended.

Well, that is what you do when you remove mail from the spool file. If you
have a working locking mechanism it is possible. Probably it is better to
refrain from sorting the spool file since other programs might save
information about the order, but that is not a major problem.

You could put the INBOX in you home directory, and then there is no
conflict with other programs. And most of my mailboxes are other mailboxes
that I'd really like to sort by arrival date.

Mats

---

From: Mats Dufberg <[email-masked]>
Date: Wed, 7 May 2003 22:30:24 +0200 (CEST)

> >different sorting i different pine sessions, but it would be more powerful

Yes, I usually have at least two xterm windows each with a pine session to
the same mail collection. It is very powerful. For it to work you have to
convert you inbox to MBX format (and store it in the home directory).

I can have can have one outgoing mail open at the same time as I look for
old mail, from which to get information.

I always leave pine open on my computer at work. And log in from home and
read mail in a new pine session.

It works as charm!

> back to original folder. Takes less time to do than to describe.

Well, I'd like to see that coded into pine.

> >even if you use MBX format, the first line of the mail contains that

No, it sorts (the view) by date of arrival to that mailbox.

Mats

---

From: Mats Dufberg <[email-masked]>
Date: Wed, 7 May 2003 22:35:20 +0200 (CEST)

> does it right.  Ok, so perhaps PINE.  :P

If you convert to mbx format you get a more efficient format. With mbx
format pine can jump from mail to mail in the file since the mail starts
with a line that says how large the mail is. If you have a large mailbox
you'll see a huge difference.

Elm stores each mail in a file, doesn't it? The downside is that is
requires more opening and closing of files, which is less efficient.

Mats

---

From: Satya <[email-masked]>
Date: Wed, 07 May 2003 16:48:59 -0400 (EDT)

>read mail in a new pine session.

Uh... If I tried to do that, it'd "try... to get get mailbox lock from
process...".

-- 
Satya. <URL:http://satya.virtualave.net/>
Warning: you are logged into reality as root.

---

From: Satya <[email-masked]>
Date: Wed, 07 May 2003 16:47:56 -0400 (EDT)

>I sort, select all, save to the same folder I'm in---you don't really need

That'll work, I just don't like writing to the same buffer that I'm
reading from. (That's an analogy.)

-- 
Satya. <URL:http://satya.virtualave.net/>
Drop your carrier ... we have you surrounded!

---

From: Mats Dufberg <[email-masked]>
Date: Wed, 7 May 2003 22:58:24 +0200 (CEST)

> Uh... If I tried to do that, it'd "try... to get get mailbox lock from

Yes, because you have not converted your mbx format. Maybe it is only
necessary to move the inbox to your home directory.

Mats

---

From: Michael Bartosh <[email-masked]>
Date: Wed, 7 May 2003 15:05:32 -0600

Anyone gotten pine to do kerberos auth on Mac OS X (for either imap or 
smtp?)

I get :

[Server disables LOGIN, no recognized SASL authenticator]

The build appeared to go correctly... Mail.app works fine with kerb 
auth on the same account/ server. Server is specified like this:
inbox-path={bw.4am-media.com}INBOX

Thanks-

http://www.4am-media.com
Mac OS X Consulting and Training
Michael Bartosh
[email-masked]
303.517.0272
Denver, CO

"The surest way to corrupt a youth is to instruct him to hold in higher
regard those who think alike than those who think differently."

- -- Nietzsche

			Think Different.

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Douglas Kline <[email-masked]>
Date: Thu, 8 May 2003 09:14:49 -0400 (EDT)

elm, at least in my experience, reads the spooling file and does not
re-order it.  It was observed earlier that e-mail clients must necessarily
edit the spooling file in order to remove messages which have been deleted
for moved to other folders.  It was observed in response that that editing
happens only at the close of an e-mail execution.  I think it is possible
with at least some e-mail clients to cause such operations to take effect
without exiting the e-mail client.  However that operation requires much
less memory use and time in which the spooling file must be locked.  In
fact, it would be possible to perform such an edit without making a copy
of the spooling file.  It would be necessary to maintain in memory only
the contents of blocks which are being over-written.  Since the edited
file will necessarily be shorter than it was before being edited,
allocation of new disk blocks wouldn't be necessary and the amount of the
file being written at a time could be set at the programmer's discretion
to any number of disk sectors.

Douglas