State changes not pushed back to gmail: when relative to current dir `.`
Closed this issue · 4 comments
I don't know how I ended up in this state or if it's again somehow related to older versions of libraries (from Debian), but I found my setup in a state where state changes (eg: tag:unread
) were not being synced back to gmail, with push saying:
$ gmi push
receiving metadata (5) ...done: 5 its in 00.081s
resolving changes (5) ...done: 5 its in 00.000s
push: nothing to push
I had followed some other older (closed) issues and made sure to do a fresh sync with the right flags in notmuch.config:
[database]
path=/home/windo/mail
[new]
tags=
ignore=
[maildir]
synchronize_flags=true
Anyway, I finally traced it down to needing to do this in remote.py:
- qry = "path:%s/** and lastmod:%d..%d" % (
- self.local.nm_relative,
+ if self.local.nm_relative == ".":
+ path = "**"
+ else:
+ path = "%s/**" % self.local.nm_relative
+ qry = "path:%s and lastmod:%d..%d" % (
+ path,
self.local.state.lastmod,
rev,
)
In my case, self.local/nm_relative
is .
but when I try the query notmuch search path:./**
it returns no results, but path:**
finds everything (and I only have the gmail-synced e-mail in there).
Anyway, I think it may well not be very applicable to other users, but I wanted to record it here in case anyone else runs into something similar with whatever weirdness is going on with my setup.
Looks like there is something that doesn't work there yes. Seems like your fix should fix it correctly, but would need a bit of testing.
Oh yes it is, I had forgotten that I had discovered and mentioned this before and seems I had somehow lost the local fix :)
Ok :)