Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-19 Thread Christian Ebert

Hi Kevin,

* Kevin J. McCarthy on Thursday, October 17, 2019 at 18:46:39 +0800:

I've pushed a quick-fix commit to stable, and a better fix to master.
I also cleaned up the abort/error handling when changing folder within
the pager, so it returns back to the pager (except in the case of a
close mailbox failure - that usually means the index will change so we
need to come back up).

Please let me know if you notice any problems.


So far I did not notice any problems - testing master.

Great, thanks! Also for the return to pager, definitely an
improvement.

--
LAST SHIP HOME
Die Weltumsegelung der Peter von Danzig
Ein Film von Michael Weber und Christian Ebert
--->> https://lastshiphome.de


Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-17 Thread Kevin J. McCarthy

On Thu, Oct 17, 2019 at 07:42:19AM +0800, Kevin J. McCarthy wrote:
I believe I know what the problem is.  I was staring so hard at the 
wrong places I missed it.  :-(


I don't have time to work on it until later today, but I'll try to 
post a patch by tomorrow.


I've pushed a quick-fix commit to stable, and a better fix to master.  I 
also cleaned up the abort/error handling when changing folder within the 
pager, so it returns back to the pager (except in the case of a close 
mailbox failure - that usually means the index will change so we need to 
come back up).


Please let me know if you notice any problems.

Thank you,

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


signature.asc
Description: PGP signature


Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-16 Thread Kevin J. McCarthy

On Wed, Oct 16, 2019 at 05:32:46PM +0100, Christian Ebert wrote:
I'll try. As I have got other stuff on my plate and am back into blind 
guessing territory - there is a reason why I wasn't more precise in my 
commit message(s) regarding the cause - this may take a while. Sorry.


I believe I know what the problem is.  I was staring so hard at the 
wrong places I missed it.  :-(


I don't have time to work on it until later today, but I'll try to post 
a patch by tomorrow.


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


signature.asc
Description: PGP signature


Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-16 Thread Christian Ebert

* Kevin J. McCarthy on Wednesday, October 16, 2019 at 09:58:38 +0800:

On Tue, Oct 15, 2019 at 03:32:01PM +0100, Christian Ebert wrote:

I have the following in my muttrc:

folder-hook somefoldernamepattern ' push ~r>1m'


This example isn't triggering the problem for me (I have subsituted
'.' for the matching regexec).  Would you mind double checking that it
isn't a different folder hook, or something else.


Indeed, it must be something else. I was able to repro it by
going into a different target folder.


If you could send a minimal muttrc that triggers it, that would
be helpful.


I'll try. As I have got other stuff on my plate and am back into
blind guessing territory - there is a reason why I wasn't more
precise in my commit message(s) regarding the cause - this may
take a while. Sorry.

--
LAST SHIP HOME
Die Weltumsegelung der Peter von Danzig
Ein Film von Michael Weber und Christian Ebert
--->> https://lastshiphome.de


Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-15 Thread Kevin J. McCarthy

On Tue, Oct 15, 2019 at 03:32:01PM +0100, Christian Ebert wrote:
The goal is that 'y' should _not_ behave differently. I.e., I 
should be able to browse-mailboxes, choose a different mailbox 
and open it without error.


Hi Christian,

Sorry for the barrage of questions in my last email.  I should have 
actually asked questions last year instead of just accepting the patch.


I agree that it shouldn't behave differently, so I will try to track 
down the difference and see if I can fix it "properly".  There *is* a 
small difference between the two states of invoking , 
but I currently can't see how it is causing the problem.



I have the following in my muttrc:

folder-hook somefoldernamepattern ' push ~r>1m'


This example isn't triggering the problem for me (I have subsituted '.' 
for the matching regexec).  Would you mind double checking that it isn't 
a different folder hook, or something else.  If you could send a minimal 
muttrc that triggers it, that would be helpful.


Thank you,

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


signature.asc
Description: PGP signature


Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-15 Thread Christian Ebert

Hi Kevin,

* Kevin J. McCarthy on Tuesday, October 15, 2019 at 09:09:12 +0800:

On Mon, Oct 14, 2019 at 04:02:52PM +0100, Christian Ebert wrote:

* Christian Ebert on Monday, October 14, 2019 at 15:50:01 +0100:

+macro pager y "" "show incoming mailboxes list"


As there's now a clean command instead of macro hacks - thank
you, Kevin -, it may be worth considering to integrate this
directly in browse-mailboxes?


I forgot about that patch from you last year.

However, I'd like to review the reasons for this before applying your
new patch.  How is this any difference from calling  or
 from the pager?  Why should 'y' behave differently?


The goal is that 'y' should _not_ behave differently. I.e., I
should be able to browse-mailboxes, choose a different mailbox
and open it without error.


What exactly are you doing that generates the error when
invoking 'y' from the pager.


I have the following in my muttrc:

folder-hook somefoldernamepattern ' push ~r>1m'

1. I am in a mailbox, let's call it  'currentbox'.
2. I am in its *index* and press 'y' for .
3. From the browser I choose a mailbox which matches
'somefolderpattern'.
4. I open the target mailbox without errors.

From the *pager* 1., 2., 3. behave the same, when i do 4. mutt
barks: 'Not available in this menu'.

I want mutt to behave the same as if 1. and 2. would happen in
the index.


Is there any reason why you shouldn't create the macro yourself
in that case?


1. unexpected behaviour, even error
2. hard to find out the reason, and hard to find the cure [*]

[*] I don't really understand why the error is triggered by a
hook of the target mailbox combined with the fact that it is not
triggered when I start the procedure in the index. It's as if
there is some remnant pager state when I'm in the browser:
delete-pattern indeed is only available from the index, neither
from the browser (but if that was the problem, then the error
would also be thrown if I start from index) nor from the pager.

So, in layman's terms: For consistent and error free behavior I
have to exit the 'lingering pager state'.

Admittedly it feels like doctoring at the symptom, but so far it
works for me[tm].

--
LAST SHIP HOME
Die Weltumsegelung der Peter von Danzig
Ein Film von Michael Weber und Christian Ebert
--->> https://lastshiphome.de


Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-14 Thread Kevin J. McCarthy

On Mon, Oct 14, 2019 at 04:02:52PM +0100, Christian Ebert wrote:

* Christian Ebert on Monday, October 14, 2019 at 15:50:01 +0100:

+macro pager y "" "show incoming mailboxes list"


As there's now a clean command instead of macro hacks - thank
you, Kevin -, it may be worth considering to integrate this
directly in browse-mailboxes?


Hi Christian,

I forgot about that patch from you last year.

However, I'd like to review the reasons for this before applying your 
new patch.  How is this any difference from calling  or 
 from the pager?  Why should 'y' behave differently?


What exactly are you doing that generates the error when invoking 'y' 
from the pager.  Is there any reason why you shouldn't create the macro 
yourself in that case?


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


signature.asc
Description: PGP signature


Re: [PATCH] Exit pager before calling browse-mailboxes

2019-10-14 Thread Christian Ebert

* Christian Ebert on Monday, October 14, 2019 at 15:50:01 +0100:

+macro pager y "" "show incoming mailboxes list"


As there's now a clean command instead of macro hacks - thank
you, Kevin -, it may be worth considering to integrate this
directly in browse-mailboxes?

--
LAST SHIP HOME
Die Weltumsegelung der Peter von Danzig
Ein Film von Michael Weber und Christian Ebert
--->> https://lastshiphome.de