user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH 0/2] lei MUA UX fixes
@ 2021-04-03  1:37 Eric Wong
  2021-04-03  1:37 ` [PATCH 1/2] lei q: don't show remote progress if MUA is running Eric Wong
  2021-04-03  1:37 ` [PATCH 2/2] lei: allow progress to non-TTY after MUA spawn Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2021-04-03  1:37 UTC (permalink / raw)
  To: meta

More stuff around auth coming...

Eric Wong (2):
  lei q: don't show remote progress if MUA is running
  lei: allow progress to non-TTY after MUA spawn

 lib/PublicInbox/LEI.pm        | 1 +
 lib/PublicInbox/LeiXSearch.pm | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] lei q: don't show remote progress if MUA is running
  2021-04-03  1:37 [PATCH 0/2] lei MUA UX fixes Eric Wong
@ 2021-04-03  1:37 ` Eric Wong
  2021-04-03  1:37 ` [PATCH 2/2] lei: allow progress to non-TTY after MUA spawn Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2021-04-03  1:37 UTC (permalink / raw)
  To: meta

Remote results can safely use the same mset progress reporting
as local results, despite not knowing the size of the result
set.  We're assuming terminal MUAs, for now.
---
 lib/PublicInbox/LeiXSearch.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index f3b8cc25..2b23e8e9 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -232,7 +232,7 @@ sub each_remote_eml { # callback for MboxReader->mboxrd
 		if ($now > $next) {
 			$lei->{-next_progress} = $now + 1;
 			my $nr = $lei->{-nr_remote_eml};
-			$lei->err("# $lei->{-current_url} $nr/?");
+			mset_progress($lei, $lei->{-current_url}, $nr, '?');
 		}
 	}
 	$each_smsg->($smsg, undef, $eml);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] lei: allow progress to non-TTY after MUA spawn
  2021-04-03  1:37 [PATCH 0/2] lei MUA UX fixes Eric Wong
  2021-04-03  1:37 ` [PATCH 1/2] lei q: don't show remote progress if MUA is running Eric Wong
@ 2021-04-03  1:37 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2021-04-03  1:37 UTC (permalink / raw)
  To: meta

Sometimes I want to save debug info to a file or pipe even when
spawning an MUA.
---
 lib/PublicInbox/LEI.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index f9361c68..96a27102 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -850,6 +850,7 @@ sub start_mua {
 	if ($self->{lxs} && $self->{au_done}) { # kick wait_startq
 		syswrite($self->{au_done}, 'q' x ($self->{lxs}->{jobs} // 0));
 	}
+	return unless -t $self->{2}; # XXX how to determine non-TUI MUAs?
 	$self->{opt}->{quiet} = 1;
 	delete $self->{-progress};
 	delete $self->{opt}->{verbose};

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-03  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-03  1:37 [PATCH 0/2] lei MUA UX fixes Eric Wong
2021-04-03  1:37 ` [PATCH 1/2] lei q: don't show remote progress if MUA is running Eric Wong
2021-04-03  1:37 ` [PATCH 2/2] lei: allow progress to non-TTY after MUA spawn Eric Wong

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://public-inbox.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git