Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State changes not pushed back to gmail: when relative to current dir . #273

Closed
windo opened this issue Dec 21, 2023 · 4 comments
Closed

Comments

@windo
Copy link

windo commented Dec 21, 2023

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.

@gauteh
Copy link
Owner

gauteh commented Dec 21, 2023

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.

@gauteh gauteh changed the title State changes not pushed back to gmail State changes not pushed back to gmail: when relative to current dir . Dec 24, 2023
@gauteh
Copy link
Owner

gauteh commented Dec 24, 2023

Is this the same as #208 ?

@windo
Copy link
Author

windo commented Jan 2, 2024

Oh yes it is, I had forgotten that I had discovered and mentioned this before and seems I had somehow lost the local fix :)

@gauteh
Copy link
Owner

gauteh commented Jan 2, 2024

Ok :)

@gauteh gauteh closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants