[PATCH 0/4] small lei fixes

2023-09-22 Thread Eric Wong
Only noticed while working on bigger fixes... Eric Wong (4): lei blob|rediff: fix usage of lei->fail lei: improve ->fail internal API lei_to_mail: drop awkward duplication of $lei object lei: use File::Temp for listing saved searches lib/PublicInbox/LEI.pm| 19

[PATCH 1/4] lei blob|rediff: fix usage of lei->fail

2023-09-22 Thread Eric Wong
lei->fail only takes one message argument, presently; but it's probably a good idea to change the API... --- lib/PublicInbox/LeiBlob.pm | 2 +- lib/PublicInbox/LeiRediff.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiBlob.pm

[PATCH 2/4] lei: improve ->fail internal API

2023-09-22 Thread Eric Wong
Allow the exit code to be the first argument intead of the last to match our ->child_error, as well as the BSD err(3) API. We'll also avoid shifting user-passed exit codes so $? can be passed as-is without losing signal information. --- lib/PublicInbox/LEI.pm | 19 ---

[PATCH 4/4] lei: use File::Temp for listing saved searches

2023-09-22 Thread Eric Wong
I have no idea how badly my brain malfunctioned here when I wrote the code to create a temporary file without O_EXCL :x I'm still not sure if users have enough saved searches for justifying a cache, here. --- lib/PublicInbox/LeiSavedSearch.pm | 20 +--- 1 file changed, 9

[PATCH 3/4] lei_to_mail: drop awkward duplication of $lei object

2023-09-22 Thread Eric Wong
Our awaitpid API now exists and ProcessPipe uses it, so it's immune to cyclic references. Thus there's no need to create a duplicate of the lei object to prevent leaks. --- lib/PublicInbox/LeiToMail.pm | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

lei interactive TUIs (ncurses/vim/emacs)

2023-09-22 Thread Eric Wong
I hardly have any experience in this area; but automatic end-to-end tests for ncurses and other TUI stuff seems like a huge pain... I've also noticed vim has scripting abilities (like Emacs?) and notmuch bundles a vim extension we can take inspiration from. Perhaps we could bundle vim and Emacs

Re: [PATCH] pop3: support initial_limit parameter in mailbox name

2023-09-22 Thread Eric Wong
Konstantin Ryabitsev wrote: > On Fri, Sep 22, 2023 at 02:18:17AM +, Eric Wong wrote: > > Subject: [PATCH] pop3: support initial_limit parameter in mailbox name > > That looks good in my tests. Thanks! > > Tested-by: Konstantin Ryabitsev Thanks. I also forgot to expand on the fix for

[PATCH] t/lei-mirror: avoid make(1) jobserver warning

2023-09-22 Thread Eric Wong
We can't control `make test' nor user-defined targets in config.mak. There's no need for a jobserver to run `make help', anyways, so just let things be. This also fixes the use of `gmake check' et al. on *BSDs where various make flags confuse BSD make(1) While we're at it, allow the test to run

Re: [PATCH] pop3: support initial_limit parameter in mailbox name

2023-09-22 Thread Konstantin Ryabitsev
On Fri, Sep 22, 2023 at 02:18:17AM +, Eric Wong wrote: > Subject: [PATCH] pop3: support initial_limit parameter in mailbox name That looks good in my tests. Thanks! Tested-by: Konstantin Ryabitsev -K