Discussion:
Possible to not leave pager if up on first or down on last message?
Scott Kostyshak
2017-12-20 18:01:09 UTC
Permalink
When I'm in the pager and on the first message, if I accidentally press
<up> it takes me to the index, with a message of "You are on the first
message". This makes sense, but I would prefer to stay in the pager.
Similarly for pressing <down> on the last messsage, I would prefer to
stay in the pager. Is it possible to configure this?

My use case is I find it very helpful to be able to focus on one email
at a time, without knowing how many emails I have. I start mutt with:

mutt -e "push <first-entry><Return>"

Best,

Scott
Todd Zullinger
2017-12-20 19:14:38 UTC
Permalink
Hi Scott,
Post by Scott Kostyshak
When I'm in the pager and on the first message, if I accidentally press
<up> it takes me to the index, with a message of "You are on the first
message". This makes sense, but I would prefer to stay in the pager.
Similarly for pressing <down> on the last messsage, I would prefer to
stay in the pager. Is it possible to configure this?
My use case is I find it very helpful to be able to focus on one email
mutt -e "push <first-entry><Return>"
I think you want the pager_stop¹ variable:

3.169. pager_stop

Type: boolean
Default: no

When set, the internal-pager will not move to the next
message when you are at the end of a message and invoke
the <next-page> function.

¹ http://www.mutt.org/doc/manual/#pager-stop
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In my life, I have prayed but one prayer: oh Lord, make my enemies
ridiculous. And God granted it.
-- Voltaire
Ben Boeckel
2017-12-20 19:46:07 UTC
Permalink
Post by Todd Zullinger
3.169. pager_stop
Type: boolean
Default: no
When set, the internal-pager will not move to the next
message when you are at the end of a message and invoke
the <next-page> function.
That's for internal page navigation. Pressing <Up> or <Down> is an index
operation and doesn't affect Scott's issue. (This is the setup I have
now and Up/Down still close the pager for me.)

--Ben
Todd Zullinger
2017-12-20 21:00:34 UTC
Permalink
Post by Ben Boeckel
Post by Todd Zullinger
3.169. pager_stop
Type: boolean
Default: no
When set, the internal-pager will not move to the next
message when you are at the end of a message and invoke
the <next-page> function.
That's for internal page navigation. Pressing <Up> or <Down> is an index
operation and doesn't affect Scott's issue. (This is the setup I have
now and Up/Down still close the pager for me.)
Oops, sorry about that. I also have some key bindings to
remap <up> and <down> which I didn't remember.

bind pager <up> previous-line
bind pager <down> next-line

I knew this sort of thing used to bug me and when I looked
at pager_stop in my muttrc, I thought that was it. It's
been many years since I set most of these things. My memory
is obviously not as clear as I'd like to think. ;)
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fleas can be taught nearly anything that a Congressman can.
-- Mark Twain
Scott Kostyshak
2017-12-21 04:30:15 UTC
Permalink
Post by Todd Zullinger
Post by Ben Boeckel
Post by Todd Zullinger
3.169. pager_stop
Type: boolean
Default: no
When set, the internal-pager will not move to the next
message when you are at the end of a message and invoke
the <next-page> function.
That's for internal page navigation. Pressing <Up> or <Down> is an index
operation and doesn't affect Scott's issue. (This is the setup I have
now and Up/Down still close the pager for me.)
Oops, sorry about that. I also have some key bindings to
remap <up> and <down> which I didn't remember.
bind pager <up> previous-line
bind pager <down> next-line
I knew this sort of thing used to bug me and when I looked
at pager_stop in my muttrc, I thought that was it. It's
been many years since I set most of these things. My memory
is obviously not as clear as I'd like to think. ;)
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fleas can be taught nearly anything that a Congressman can.
-- Mark Twain
Thank you for the replies, Todd and Ben.

It seems there's not a configuration variable for what I would like to
achieve.

Scott
Erik Christiansen
2017-12-22 08:38:15 UTC
Permalink
Post by Scott Kostyshak
Post by Todd Zullinger
bind pager <up> previous-line
bind pager <down> next-line
...
Post by Scott Kostyshak
Thank you for the replies, Todd and Ben.
It seems there's not a configuration variable for what I would like to
achieve.
On the contrary, Ben's key bindings do keep you in the pager,
substituting line up/down for message up/down. (It's something which
I've also adopted long ago, as the default is alien.)

Erik
Ben Boeckel
2017-12-22 15:49:11 UTC
Permalink
Post by Erik Christiansen
On the contrary, Ben's key bindings do keep you in the pager,
substituting line up/down for message up/down. (It's something which
I've also adopted long ago, as the default is alien.)
They're Todd's, not mine :) . It makes it move lines, but if you want to
move to the next message, I don't think there's away to say "move to the
next message unless this is the last one" and similarly for the first
message.

--Ben
Scott Kostyshak
2017-12-22 21:45:56 UTC
Permalink
Post by Ben Boeckel
Post by Erik Christiansen
On the contrary, Ben's key bindings do keep you in the pager,
substituting line up/down for message up/down. (It's something which
I've also adopted long ago, as the default is alien.)
They're Todd's, not mine :) . It makes it move lines, but if you want to
move to the next message, I don't think there's away to say "move to the
next message unless this is the last one" and similarly for the first
message.
Thanks, Ben and Erik. I should have been more specific. Indeed, as Ben
mentions I would still like to use the default navigation across
messages (I like using Return/backspace within messages), I just wanted
to change only that one behavior of <next-entry> and <previous-entry>.

Scott

Loading...