Index at first message .. not happening always

This is a discussion on Index at first message .. not happening always within the Pine forums in Other Technologies category; I dont know if its a bug, but in one of my IMAP folders, whenever there is a new mail in the folder, filtered at the server by a Rule, opening the folder causes the cursor to point to the last message. This annoys me because I have the folders sorted by Reverse Arrival and the new message is thereby the first message in the folder. My Incoming folder options have been set to use the "first" message. Any pointers on how I can force the first message to be pointed to irrespective of the conditions? Thanks, Praveen...

Go Back   Application Development Forum > Other Technologies > Pine

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-21-2008, 11:54 AM
bunchofmails@gmail.com
Guest
 
Default Index at first message .. not happening always

I dont know if its a bug, but in one of my IMAP folders, whenever
there is a new mail in the folder, filtered at the server by a Rule,
opening the folder causes the cursor to point to the last message.
This annoys me because I have the folders sorted by Reverse Arrival
and the new message is thereby the first message in the folder. My
Incoming folder options have been set to use the "first" message.

Any pointers on how I can force the first message to be pointed to
irrespective of the conditions?

Thanks,
Praveen
Reply With Quote
  #2  
Old 08-22-2008, 06:00 PM
bunchofmails@gmail.com
Guest
 
Default Re: Index at first message .. not happening always

On Aug 21, 9:54 am, bunchofma...@gmail.com wrote:
> I dont know if its a bug, but in one of my IMAP folders, whenever
> there is a new mail in the folder, filtered at the server by a Rule,
> opening the folder causes the cursor to point to the last message.
> This annoys me because I have the folders sorted by Reverse Arrival
> and the new message is thereby the first message in the folder. My
> Incoming folder options have been set to use the "first" message.
>
> Any pointers on how I can force the first message to be pointed to
> irrespective of the conditions?
>
> Thanks,
> Praveen


I got a little too frustrated with this issue and deleted the .pinerc
and recreated .pinerc by running alpine. I moved some of my important
settings to the new .pinerc. Now alpine seems to work alright. Seems
like the feature-list carried out from pine to alpine is likely to be
the reason.

Thanks,
Praveen
Reply With Quote
  #3  
Old 08-22-2008, 06:35 PM
bunchofmails@gmail.com
Guest
 
Default Re: Index at first message .. not happening always

On Aug 22, 4:00 pm, bunchofma...@gmail.com wrote:
> On Aug 21, 9:54 am, bunchofma...@gmail.com wrote:
>
> > I dont know if its a bug, but in one of my IMAP folders, whenever
> > there is a new mail in the folder, filtered at the server by a Rule,
> > opening the folder causes the cursor to point to the last message.
> > This annoys me because I have the folders sorted by Reverse Arrival
> > and the new message is thereby the first message in the folder. My
> > Incoming folder options have been set to use the "first" message.

>
> > Any pointers on how I can force the first message to be pointed to
> > irrespective of the conditions?

>
> > Thanks,
> > Praveen

>
> I got a little too frustrated with this issue and deleted the .pinerc
> and recreated .pinerc by running alpine. I moved some of my important
> settings to the new .pinerc. Now alpine seems to work alright. Seems
> like the feature-list carried out from pine to alpine is likely to be
> the reason.
>
> Thanks,
> Praveen


Alas! I spoke too soon.. Still I see the same behavior. I move my
mails from the inbox to sub-folders using "save" and could this be a
reason ?

Praveen
Reply With Quote
  #4  
Old 08-22-2008, 08:00 PM
bunchofmails@gmail.com
Guest
 
Default Re: Index at first message .. not happening always

On Aug 22, 4:35 pm, bunchofma...@gmail.com wrote:
> On Aug 22, 4:00 pm, bunchofma...@gmail.com wrote:
>
>
>
> > On Aug 21, 9:54 am, bunchofma...@gmail.com wrote:

>
> > > I dont know if its a bug, but in one of my IMAP folders, whenever
> > > there is a new mail in the folder, filtered at the server by a Rule,
> > > opening the folder causes the cursor to point to the last message.
> > > This annoys me because I have the folders sorted by Reverse Arrival
> > > and the new message is thereby the first message in the folder. My
> > > Incoming folder options have been set to use the "first" message.

>
> > > Any pointers on how I can force the first message to be pointed to
> > > irrespective of the conditions?

>
> > > Thanks,
> > > Praveen

>
> > I got a little too frustrated with this issue and deleted the .pinerc
> > and recreated .pinerc by running alpine. I moved some of my important
> > settings to the new .pinerc. Now alpine seems to work alright. Seems
> > like the feature-list carried out from pine to alpine is likely to be
> > the reason.

>
> > Thanks,
> > Praveen

>
> Alas! I spoke too soon.. Still I see the same behavior. I move my
> mails from the inbox to sub-folders using "save" and could this be a
> reason ?
>
> Praveen



Ok. I looked at the alpine code a little bit and found out
first_sorted_flagged() returns the wrong value when IS_FLAG is set. I
believe there should be an FSF_FIRST option that can avoid the
function loops as well and just return 1.

scenario.
IMAP incoming folder sort order - Reverse arrival
Incoming-startup-rule = first
New mail comes in. Unread, save it to an imap folder
open the imap folder, the cursor is at the last message.. should have
been the first

Praveen
Reply With Quote
  #5  
Old 08-26-2008, 05:36 PM
Steve Hubert
Guest
 
Default Re: Index at first message .. not happening always

On Fri, 22 Aug 2008, bunchofmails@gmail.com wrote:

> Ok. I looked at the alpine code a little bit and found out
> first_sorted_flagged() returns the wrong value when IS_FLAG is set. I
> believe there should be an FSF_FIRST option that can avoid the
> function loops as well and just return 1.
>
> scenario.
> IMAP incoming folder sort order - Reverse arrival
> Incoming-startup-rule = first
> New mail comes in. Unread, save it to an imap folder
> open the imap folder, the cursor is at the last message.. should have
> been the first
>
> Praveen


Some debug from this might be revealing. Try running with flags

-d verbose=9,imap=4,flush

and you should see something like

imap_cmd(testfolder, SEARCH, 0x1)
IMAP DEBUG 14:30:45 8/26: 0000000d SEARCH UNDELETED
IMAP DEBUG 14:30:45 8/26: * SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
IMAP DEBUG 14:30:45 8/26: 0000000d OK SEARCH completed
First_sorted_flagged returning winner = 1

which is how it locates the first undeleted message. I'd be careful
special-casing away some of the calls because there may be side-effects
that are needed. I don't know I'm just saying there may be.

I haven't been able to reproduce the problem you are having, maybe the
debug output will show why. Thanks.

Steve
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:53 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.