Re: Key is not bound. Press '?' for help. - keycode

2022-07-28 Thread Kevin J. McCarthy

On Thu, Jul 28, 2022 at 10:36:48PM +0100, Chris Narkiewicz via Mutt-users wrote:

I need to see what mutt actually see, not what X11 sends.


Try ':exec what-key' and see if that helps.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Key is not bound. Press '?' for help. - keycode

2022-07-28 Thread Kurt Hackenberg

On 2022/07/28 16:23, Chris Narkiewicz via Mutt-users wrote:


I configured a shortcut - C- and C- - to naviage the sidebar.
It works, but on some terminal, pressing this shortcut yields

Key is not bound.  Press '?' for help.

This is puzzling and I suspect that the terminal sends something
else. Is there a way to display the key combination that was
actually received by mutt, so I know what is wrong with the terminal?

The terminal in question is urxvt on OpenBSD.


How about if you run a hex dump program from the command line in that 
terminal emulator? Like this (in an xterm):


~$ hexdump
^[[1;5A
000 5b1b 3b31 4135 000a
007
~$

(I typed C-  C-D. Saw no output until C-D (EOF).)


Re: Key is not bound. Press '?' for help. - keycode

2022-07-28 Thread Chris Narkiewicz via Mutt-users
On Thu, Jul 28, 2022 at 04:58:30PM -0400, Patrick Shanahan wrote:
> xev and showkey

It's the terminal that does something weird,
or s-lang. xev won't help here.

There is no showkey on OpenBSD.

I need to see what mutt actually see, not what X11 sends.

Cheers,
Chris Narkiewicz


signature.asc
Description: PGP signature


Re: Key is not bound. Press '?' for help. - keycode

2022-07-28 Thread Patrick Shanahan
* mutt users list  [07-28-22 16:25]:
> Hi,
> 
> I configured a shortcut - C- and C- - to naviage the sidebar.
> It works, but on some terminal, pressing this shortcut yields
> 
> Key is not bound.  Press '?' for help.
> 
> This is puzzling and I suspect that the terminal sends something
> else. Is there a way to display the key combination that was
> actually received by mutt, so I know what is wrong with the terminal?
> 
> The terminal in question is urxvt on OpenBSD.

xev and showkey
showkey needs to be ran in a console terminal w/o X.
if you are running wayland, I dunno

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet oftc


Key is not bound. Press '?' for help. - keycode

2022-07-28 Thread Chris Narkiewicz via Mutt-users
Hi,

I configured a shortcut - C- and C- - to naviage the sidebar.
It works, but on some terminal, pressing this shortcut yields

Key is not bound.  Press '?' for help.

This is puzzling and I suspect that the terminal sends something
else. Is there a way to display the key combination that was
actually received by mutt, so I know what is wrong with the terminal?

The terminal in question is urxvt on OpenBSD.

Best regards,
Chris Narkiewicz


signature.asc
Description: PGP signature


Re: Offlineimap only for current folder

2022-07-28 Thread José María Mateos

On Thu, Jul 28, 2022 at 04:44:07PM +0300, Oleg A. Mamontov wrote:

I use the following approach for the same problem but with mbsync:
---
folder-hook . "source ~/.mutt/on-folder-change"
---

where ~/.mutt/on-folder-change has the below content:
---
set record = ^
set my_folder = `echo $record | sed 's|.*/||' | sed 's|\\.|/|g'`
macro index,pager o ":unset wait_keyclear; printf '# syncing =$my_folder\\n\\n'; 
mbsync full:$my_folder:set wait_key" "sync current folder"
---

I know, it looks a bit creepy but works pretty well :)


At least I understand what you're doing, more or less :-) Thanks for 
your solution. I'll stand by in case someone posts something a bit more 
straightforward (which I think might not exist.)


--
José María (Chema) Mateos || https://rinzewind.org


Re: Offlineimap only for current folder

2022-07-28 Thread Oleg A. Mamontov

Hi,

On Thu, Jul 28, 2022 at 09:29:34AM -0400, José María Mateos wrote:

Hi all,

I have offlineimap running on a cron job every 5 minutes, but from 
time to time (for example, I've received a login code) I want to 
refresh the current folder faster. For that, I have this macro:


macro index,pager G "!offlineimap\n" "Retrieve new IMAP messages"

It works well, but this refreshes all folders; I'd be great if it 
worked only for the folder I'm currently in. Is there any "environment 
variable" for the macro that I can use in this case?


I use the following approach for the same problem but with mbsync:
---
folder-hook . "source ~/.mutt/on-folder-change"
---

where ~/.mutt/on-folder-change has the below content:
---
set record = ^
set my_folder = `echo $record | sed 's|.*/||' | sed 's|\\.|/|g'`
macro index,pager o ":unset wait_keyclear; printf '# syncing =$my_folder\\n\\n'; 
mbsync full:$my_folder:set wait_key" "sync current folder"
---

I know, it looks a bit creepy but works pretty well :)


Thanks!

--
José María (Chema) Mateos || https://rinzewind.org


--
Cheers,
Oleg A. Mamontov

email: o...@mamontov.net
phone: +7 (903) 798-1352


Offlineimap only for current folder

2022-07-28 Thread José María Mateos

Hi all,

I have offlineimap running on a cron job every 5 minutes, but from time 
to time (for example, I've received a login code) I want to refresh the 
current folder faster. For that, I have this macro:


macro index,pager G "!offlineimap\n" "Retrieve new IMAP messages"

It works well, but this refreshes all folders; I'd be great if it worked 
only for the folder I'm currently in. Is there any "environment 
variable" for the macro that I can use in this case?


Thanks!

--
José María (Chema) Mateos || https://rinzewind.org


Re: too many useless warnings

2022-07-28 Thread Sam Kuper
On Wed, Jul 27, 2022 at 05:12:51PM +0100, Darac Marjal wrote:
> On 27/07/2022 13:08, Fourhundred Thecat wrote:
>> Hello,
>> 
>> when I press key that is not bound, I get following warning in the
>> lower left corner:
>> 
>>   Key is not bound.  Press '?' for help.
>> 
>> this is actually a helpful warning/notification that tells me what is
>> going on. Without it, I would be left wondering why my action is not
>> being executed.
>> 
>> However, when I press PageDown repeatedly, and land at the end of the
>> page, I get a warning:
>> 
>>   You are on the last page.
>> 
>> In my opinion, this is absolutely useless and superfluous warning.
>> Unlike the first case, this is just bombarding me with useless
>> information. I can see the key is working all right, I have just
>> pressed it one too many times.
> 
> How do you _know_ the key is working, though? Let's say you're paging
> down a mailbox and you press PgDn three times. On two of those
> presses, the screen updates within milliseconds, showing you more
> records. On the third press, nothing happens. So, what's going on?
> 
>  * Did you not press hard enough on the key?
>  * Did you miscount the number of times you pressed the key?
>  * Has your SSH connection suddenly frozen?
>  * Is the IMAP server thrashing and it's still trying to read the
>headers for those next messages?
>  * Or, have you just reached the end of the list and there are no more
>messages?
> 
> I'd argue that some feedback is better than none. Unless you've
> configured your index with some sort of scrollbar (or an indication
> that the cursor is on page X of Y) then I don't see how you can tell
> the difference between "mutt hasn't responded to the PgDn key yet" vs
> "mutt has done what you asked, but there was nothing to do".

This.

Mutt is doing the right thing here.  Little bits of quiet feedback like
this are more helpful than not.

Fourhundred: bear in mind that some people use Mutt over potentially
unstable/laggy SSH connections, where such feedback is especially
important.

-- 
A: When it messes up the order in which people normally read text.
Q: When is top-posting a bad thing?

()  ASCII ribbon campaign. Please avoid HTML emails & proprietary
/\  file formats. (Why? See e.g. https://v.gd/jrmGbS ). Thank you.