Discussion:
Return key does not display-message in index view
TJ Hayes
2018-08-09 05:24:23 UTC
Permalink
I am using mutt 1.9.4 on Ubuntu Budgie 18.04.

QUESTION: How can I have <Return> open/display the selected email message from the index view?

I have this in my muttrc:

bind index <Return> display-message

However, hitting <Return> does not open the selected message from the
index. Mutt gives no feedback like "this key is not bound" or anything
like that. I can use <Space> to display-message, but I'd rather use
<Return>.

What I've checked:
(1) :exec what-key, then <Return>
Mutt tells me: Char = <Return>, Octal = 12, Decimal = 10

(2) <Return> is listed as bound to display-message, when I hit ? to view the keybinds.

(3) My <Return> key does function to do other things within mutt.
When I change folders or select an attachment, <Return> does function just fine. <Return> is bound to select-entry in maps other than index.

Thoughts?

Thanks!
TJ
Felix Finch
2018-08-09 06:07:57 UTC
Permalink
I am also running mutt 1.9.4 on Ubuntu 18.04, and can reproduce everything
here -- except that <Return> in the index DOES display the message. I have
nothing else to add.
Post by TJ Hayes
I am using mutt 1.9.4 on Ubuntu Budgie 18.04.
QUESTION: How can I have <Return> open/display the selected email message
from the index view?
bind index <Return> display-message
However, hitting <Return> does not open the selected message from the
index. Mutt gives no feedback like "this key is not bound" or anything
like that. I can use <Space> to display-message, but I'd rather use
<Return>.
(1) :exec what-key, then <Return>
Mutt tells me: Char = <Return>, Octal = 12, Decimal = 10
(2) <Return> is listed as bound to display-message, when I hit ? to view the keybinds.
(3) My <Return> key does function to do other things within mutt. When I
change folders or select an attachment, <Return> does function just fine.
<Return> is bound to select-entry in maps other than index.
--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & wood chipper / ***@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
Cameron Simpson
2018-08-09 22:44:16 UTC
Permalink
Post by TJ Hayes
I am using mutt 1.9.4 on Ubuntu Budgie 18.04.
I'm running a built from source mutt 1.10.0 on a Mac.

Like Felix, all of my tests of your tests behave just like you except that
<Return> does display the message for me.
Post by TJ Hayes
QUESTION: How can I have <Return> open/display the selected email
message from the index view?
bind index <Return> display-message
Try commenting this line out of your config and retry. I don't have this
explicitly in my settings, it comes from mutt's defaults for me.

Also try running "mutt -F /dev/null" to bypass all the configuration.

(I've tried putting that line in my muttrc and <Return> still displays a
message from the index for me.)
Post by TJ Hayes
However, hitting <Return> does not open the selected message from the
index. Mutt gives no feedback like "this key is not bound" or anything
like that. I can use <Space> to display-message, but I'd rather use
<Return>.
(1) :exec what-key, then <Return>
Mutt tells me: Char = <Return>, Octal = 12, Decimal = 10
Me too.
Post by TJ Hayes
(2) <Return> is listed as bound to display-message, when I hit ? to view the keybinds.
Does that line include the description "display a message" in the right hand
column? Mine does, and if that is missing or different it may be a clue.
Post by TJ Hayes
(3) My <Return> key does function to do other things within mutt. When
I change folders or select an attachment, <Return> does function just fine.
<Return> is bound to select-entry in maps other than index.
Very strange. Do you have another version of mutt to hand to run against the
same setup for comparison?

Cheers,
Cameron Simpson <***@cskk.id.au>
TJ Hayes
2018-08-14 04:06:41 UTC
Permalink
@Cameron Simpson
Post by Cameron Simpson
Try commenting this line out of your config and retry. I don't have this
explicitly in my settings, it comes from mutt's defaults for me.
Commenting out "bind <return> display-message" from my muttrc has no impact.
The <return> key still does nothing when I press it in index mode.
Post by Cameron Simpson
Also try running "mutt -F /dev/null" to bypass all the configuration.
This worked!! When I run mutt with no config file (muttrc), the <Return> key does function properly to display-message in index mode. This is a clue that my muttrc is giving me the trouble.

Also, I verified that typing ? to show keybinds DOES show that display-message and "display a message" are listed for <Return>.
Post by Cameron Simpson
Do you have another version of mutt to hand to run against the
same setup for comparison?
I do not have another version to run with the same setup.

** One new bit of information: this behavior started after I upgraded my system from Ubuntu-Budgie 17.10 to Ubuntu-Budgie 18.04. I was second guessing myself about this, wondering if I only thought that <Return> used to open an email message. However, I am 95% sure that mutt worked fine before the upgrade to my Linux OS. I wonder if the newer version of Ubuntu, or the upgrade process itself somehow messed up the inner workings of my mutt. Searching the Ubuntu help pages gave no hints that anyone else has run into this.

My next steps:
(1) Mess with my muttrc to find out what is causing this strange behavior.
(2) Try another version of mutt. Maybe I can figure out how to compile the newest version of mutt 1.10.0.

Thanks!
- TJ
Felix Finch
2018-08-14 05:04:58 UTC
Permalink
It makes me wonder if some other line is invoking anunseen config entry which changes the definition.

Is it possible to add a config line which prints the definition to a file, or to the screen? Then you could scatter several such lines around in a binary search / bisect mode until you narrow it downto one particular line which changes the definition.

I am just flailing for no particular reason; I do not know if there is any way to print a definition like this.

An alternative would be to throw in an explicit redefinition to the value you want, put it at the end, and if it fixes the problem, move it backwards a ways until it no longer fixes the problem, then move it forward half the distance, and so on.
Post by TJ Hayes
@Cameron Simpson
Post by Cameron Simpson
Try commenting this line out of your config and retry. I don't have this
explicitly in my settings, it comes from mutt's defaults for me.
Commenting out "bind <return> display-message" from my muttrc has no impact.
The <return> key still does nothing when I press it in index mode.
Post by Cameron Simpson
Also try running "mutt -F /dev/null" to bypass all the configuration.
This worked!! When I run mutt with no config file (muttrc), the <Return> key does function properly to display-message in index mode. This is a clue that my muttrc is giving me the trouble.
Also, I verified that typing ? to show keybinds DOES show that display-message and "display a message" are listed for <Return>.
Post by Cameron Simpson
Do you have another version of mutt to hand to run against the
same setup for comparison?
I do not have another version to run with the same setup.
** One new bit of information: this behavior started after I upgraded my system from Ubuntu-Budgie 17.10 to Ubuntu-Budgie 18.04. I was second guessing myself about this, wondering if I only thought that <Return> used to open an email message. However, I am 95% sure that mutt worked fine before the upgrade to my Linux OS. I wonder if the newer version of Ubuntu, or the upgrade process itself somehow messed up the inner workings of my mutt. Searching the Ubuntu help pages gave no hints that anyone else has run into this.
(1) Mess with my muttrc to find out what is causing this strange behavior.
(2) Try another version of mutt. Maybe I can figure out how to compile the newest version of mutt 1.10.0.
Thanks!
- TJ
--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & wood chipper / ***@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
Cameron Simpson
2018-08-15 05:31:30 UTC
Permalink
Post by TJ Hayes
@Cameron Simpson
Post by Cameron Simpson
Try commenting this line out of your config and retry. I don't have this
explicitly in my settings, it comes from mutt's defaults for me.
Commenting out "bind <return> display-message" from my muttrc has no impact.
The <return> key still does nothing when I press it in index mode.
Ok. Try grepping for "bind" in all your mutt settings files.
Post by TJ Hayes
Post by Cameron Simpson
Also try running "mutt -F /dev/null" to bypass all the configuration.
This worked!! When I run mutt with no config file (muttrc), the <Return> key does function properly to display-message in index mode. This is a clue that my muttrc is giving me the trouble.
Yes. Maybe there's a stray bind somewhere. Try a grep i.e. get the computer to
look instead of looking by eye. My own eye likes to see what should be there
instead of what is actually there.

Also, I think -F skips the system muttrc as well.

Try moving your muttrc sideways:

mv ~/.muttrc ~/DOTmuttrc

and test mutt again. If it is still bad then we start suspecting the system
muttrc stuff.
Post by TJ Hayes
Also, I verified that typing ? to show keybinds DOES show that display-message and "display a message" are listed for <Return>.
Urgh.

Your keypress test argues against this next idea, but does your muttrc invoke
anything that may muck with the keyboard, like the "stty" command?
Post by TJ Hayes
Post by Cameron Simpson
Do you have another version of mutt to hand to run against the
same setup for comparison?
I do not have another version to run with the same setup.
** One new bit of information: this behavior started after I upgraded my system from Ubuntu-Budgie 17.10 to Ubuntu-Budgie 18.04. I was second guessing myself about this, wondering if I only thought that <Return> used to open an email message.
What you want is mutt's default behaviour, so your beliefs sound right to me.
Post by TJ Hayes
However, I am 95% sure that mutt worked fine before the upgrade to my Linux
OS. I wonder if the newer version of Ubuntu, or the upgrade process itself
somehow messed up the inner workings of my mutt. Searching the Ubuntu help
pages gave no hints that anyone else has run into this.
Ok, look for bind commands in the system muttrc. My local Ubuntu is well
behind, and I mostly live on a Mac anyway. However on Ubuntu the system muttrc
is in the file /etc/Muttrc and the files /etc/Muttrc.d/*.rc.

Mine has:

[//etc]borg*> grep bind /etc/Muttrc /etc/Muttrc.d/*
/etc/Muttrc:# emacs-like bindings
/etc/Muttrc:bind editor "\e<delete>" kill-word
/etc/Muttrc:bind editor "\e<backspace>" kill-word
/etc/Muttrc:bind editor <delete> delete-char
/etc/Muttrc:#bind pager <up> previous-line
/etc/Muttrc:#bind pager <down> next-line
/etc/Muttrc:bind browser y exit

Maybe you've got something exciting and new.
Post by TJ Hayes
(1) Mess with my muttrc to find out what is causing this strange behavior.
(2) Try another version of mutt. Maybe I can figure out how to compile the newest version of mutt 1.10.0.
Fetch source from mutt.org. Unpack source. In the source tree:

./configure --prefix=/opt/mutt-1.10.0 && make && echo OK

Then "mkdir /opt/mutt-1.10.0" and "make install && echo OK".

You may want a billion special switches for configure, depending what you make
use of. Last time I did this I went:

LDFLAGS=-L/opt/local/lib CFLAGS=-I/opt/local/include ./configure --prefix=/opt/mutt-1.10.0--`daycode` --with-ssl --with-idn --enable-gpgme --enable-sidebar --enable-compressed --enable-pop --enable-imap --enable-smtp --enable-exact-address --enable-hcache && echo YES

The envvars are to suck in the MacPorts libraries. You won't need that but you
might need a bunch of "*-dev" apt packages.

Cheers,
Cameron Simpson <***@cskk.id.au>

Continue reading on narkive:
Loading...