user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] uri_imap: handle '/' as an IMAP hierarchy separator
Date: Tue, 14 Sep 2021 17:05:47 -0400	[thread overview]
Message-ID: <20210914210547.akdp4cqmwaheayp5@meerkat.local> (raw)
In-Reply-To: <20210914195510.kozlchcwvgrng5uc@meerkat.local>

On Tue, Sep 14, 2021 at 03:55:10PM -0400, Konstantin Ryabitsev wrote:
> On Tue, Sep 14, 2021 at 07:35:28PM +0000, Eric Wong wrote:
> > > I found an interesting problem using lei with imaps:// folders. I'm trying
> > > things out with migadu, and the folder paths use '/' separators, so a full
> > > IMAPS folder path for a folder "lore/mentions" is
> > > imaps://imap.migadu.com/lore/mentions. However, if I configure lei-q to use
> > > that remote path, everything actually ends up in the folder
> > > imap.migadu.com/lore (not the "mentions" subfolder).
> > 
> > Oops, I think the patch below should fix it.
> 
> Yep, that worked. Thanks!

I think I found a couple of other bugs while testing this with migadu. E.g.:

	$ export MFOLDER=imaps://imap.migadu.com/lore/b4
	$ lei q -o $MFOLDER -I https://lore.kernel.org/all/ '(s:b4 OR nq:b4 OR dfn:b4) AND rt:1.week.ago..'
	# /usr/bin/curl -Sf -s -d '' https://lore.kernel.org/all/?q=(s%3Ab4+OR+nq%3Ab4+OR+dfn%3Ab4)+AND+rt%3A1631066349..&x=m
	# /home/user/.local/share/lei/store 54/54

So far so good, but then:

	2021-09-14T20:59:12Z 20428 20428 die: BUG: imaps://imap.migadu.com/lore/b4;UIDVALIDITY=1621977334 has no UIDVALIDITY at /usr/local/share/perl/5.32.1/PublicInbox/LeiStore.pm line 313.
	 (from nowait set_sync_info)
	# https://lore.kernel.org/all/ 19/?
	# https://lore.kernel.org/all/ 25/?
	# https://lore.kernel.org/all/ 51/?
	# https://lore.kernel.org/all/ 54/54
	# 54 written to imaps://imap.migadu.com/lore/b4 (108 matches)

However, it doesn't show up in ls-search:

	$ lei ls-search
	/home/user/work/temp/lei/lockdown
	/home/user/work/temp/lei/mentions

That would appear to be due to them being saved in the lore/ subdir:

	$ find .local/share/lei/saved-searches/ -type d
	.local/share/lei/saved-searches/
	.local/share/lei/saved-searches/lockdown-1804cfad691a409f55598a8528566d5f1539b2632e1db7e206cb147396582631
	.local/share/lei/saved-searches/mentions-f467d0a01dfdc3e42523b5d0d090773269e199a6a109b0713dc48142f0e30526
	.local/share/lei/saved-searches/lore
	.local/share/lei/saved-searches/lore/mentions-e9ca065affe84b4e4637620c72b64b09970a02b83171ba75c86afff95489d392
	.local/share/lei/saved-searches/lore/b4-4811ca1722c2c2817e8cdc6a8d390f63a3b723c3c991f0267425d380aa1c8add

Cheers,
-K

  parent reply	other threads:[~2021-09-14 21:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 17:50 Wrong folder when using imaps:// Konstantin Ryabitsev
2021-09-14 19:35 ` [PATCH] uri_imap: handle '/' as an IMAP hierarchy separator Eric Wong
2021-09-14 19:55   ` Konstantin Ryabitsev
2021-09-14 20:12     ` Eric Wong
2021-09-14 20:19       ` Konstantin Ryabitsev
2021-09-14 21:05     ` Konstantin Ryabitsev [this message]
2021-09-14 22:10       ` [PATCH] uri_imap: fix ->uidvalidity and ->uid w/ `/' separator Eric Wong
2021-09-15 12:33         ` Konstantin Ryabitsev
2021-09-15 17:43           ` Eric Wong
2021-09-15 17:57             ` Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210914210547.akdp4cqmwaheayp5@meerkat.local \
    --to=konstantin@linuxfoundation.org \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).