Re: [PATCH] pager_honours_reverse_sort
- To: mutt-dev@xxxxxxxx
- Subject: Re: [PATCH] pager_honours_reverse_sort
- From: "Ben Walton" <bdwalton@xxxxxxxxx>
- Date: Tue, 9 Oct 2007 16:05:18 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=FOM0Ax0BT3FYc2NE/E2w6vnWqnruwtfXQMFErkrGVyg=; b=OLjlbzL/mo9F5R7DI6aSe1dPydYbfNRlgxpfWuiwUOSzQB9mpcYbLsyLmygThT2KsTIya28tSIEvYTU1p3Cn3Li60mc8H4xtLEzPL4gNiENCxb5q9p//8nSe/6ikgzYoSutrhrpQdaI+n7lLyeAey3GF0zJ6+YCXzJ7gP/bBJHQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=fPVhIX6Iexb42eauGCxDWDVc1zyVV0ezBRGQu0u2/mUaWQem4+53FaMnDJJvQnxiz9N6yLb42LlHLU8U4VWtnG+gpVc6Qwj+mjiNO21lpqmg2em1he5fIu+xeFfXuU31aHiymR5MXcZz+jxbv8CynmGswkhur/oBIMTxjKscJX8=
- In-reply-to: <20071009195300.GH2258@xxxxxxxxxxxxx>
- List-post: <mailto:mutt-dev@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-dev"
- References: <f96e0240710091221s31f09bc2u533c79f5a4bf5358@xxxxxxxxxxxxxx> <20071009195300.GH2258@xxxxxxxxxxxxx>
- Sender: owner-mutt-dev@xxxxxxxx
Re-submitted.
Thanks
-Ben
On 10/9/07, Kyle Wheeler <kyle-mutt-dev@xxxxxxxxxxxxxx> wrote:
> On Tuesday, October 9 at 03:21 PM, quoth Ben Walton:
> >+ /* FIXME: Make this based on an option later */
> >+ if (option (OPTPAGERHONOURSREVERSE) && Sort & SORT_REVERSE)
> >+ rc = OP_MAIN_PREV_UNDELETED;
> >+ else
> >+ rc = OP_MAIN_NEXT_UNDELETED;
>
> The comment here looks like cruft.
>
> ~Kyle
> --
> The price of freedom of religion, or of speech, or of the press, is
> that we must put up with a good deal of rubbish.
> -- Robert Jackson
>
>
--
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <bdwalton@xxxxxxxxx>
When one person suffers from a delusion, it is called insanity. When
many people suffer from a delusion it is called Religion.
Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance
---------------------------------------------------------------------------------------------------------------------------
#diff -r 709db707bcdf init.h
--- a/init.h Fri Sep 28 11:06:43 2007 +0200
+++ b/init.h Tue Oct 09 16:04:08 2007 -0400
@@ -1398,6 +1398,13 @@ struct option_t MuttVars[] = {
** when you are at the end of a message and invoke the \fInext-page\fP
** function.
*/
+ { "pager_honours_reverse_sort", DT_BOOL, R_NONE,
OPTPAGERHONOURSREVERSE, 0 },
+ /*
+ ** .pp
+ ** When set, the internal pager will move to the previous message
instead
+ ** of the next message when paging past the bottom/end of the current
+ ** message.
+ */
{ "pgp_autosign", DT_SYN, R_NONE, UL "crypt_autosign", 0 },
{ "crypt_autosign", DT_BOOL, R_NONE, OPTCRYPTAUTOSIGN, 0 },
/*
#diff -r 709db707bcdf mutt.h
--- a/mutt.h Fri Sep 28 11:06:43 2007 +0200
+++ b/mutt.h Tue Oct 09 14:38:43 2007 -0400
@@ -409,6 +409,7 @@ enum
OPTMIMEFORWDECODE,
OPTNARROWTREE,
OPTPAGERSTOP,
+ OPTPAGERHONOURSREVERSE,
OPTPIPEDECODE,
OPTPIPESPLIT,
#ifdef USE_POP
#diff -r 709db707bcdf pager.c
--- a/pager.c Fri Sep 28 11:06:43 2007 +0200
+++ b/pager.c Tue Oct 09 16:01:39 2007 -0400
@@ -1897,7 +1897,10 @@ mutt_pager (const char *banner, const ch
else
{
/* end of the current message, so display the next message. */
- rc = OP_MAIN_NEXT_UNDELETED;
+ if (option (OPTPAGERHONOURSREVERSE) && Sort & SORT_REVERSE)
+ rc = OP_MAIN_PREV_UNDELETED;
+ else
+ rc = OP_MAIN_NEXT_UNDELETED;
ch = -1;
}
break;