unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* gmail label support in offlineimap - update
@ 2012-11-28 14:47 Rainer M Krug
  2012-11-28 16:27 ` Peter Portante
  2012-11-28 16:46 ` Jeremy Nickurak
  0 siblings, 2 replies; 9+ messages in thread
From: Rainer M Krug @ 2012-11-28 14:47 UTC (permalink / raw)
  To: notmuch; +Cc: Abdó Roig-Maranges

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

there is a patched version of offlineimap available which is synching gmail labels to x-keywords.
More information can be found here:

http://thread.gmane.org/gmane.mail.imap.offlineimap.general/5943/focus=5970

and

http://article.gmane.org/gmane.mail.imap.offlineimap.general/5970

It is written by Abdó ig-Maranges (I cc him this email).

I would ask if it is possible (and desired) to include indexing of the X-keywords headers as well,
so that gmail labels can be represented as tags in notmuch.

To have sync from notmuch tags to gmail labels, the tags would have to be written to a x-header as
well.

This could possibly be activated by a config setting, so that emails are left unchanged by
default, but if write.Tags.In.X-Header is set to TRUE, the tags are synced to the x-headers as well.

Unfortunately, I am not a programmer, it is only that I really like notmuch and would like to
continue using it with gmail label sync.

I think this would be a very useful feature.

Cheers,

Rainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC2JAkACgkQoYgNqgF2egqpKQCfWXqA0T45U1OaJ10Hhz6AnaU3
CagAn2HVwpH1hsf5KYU+vbhG2VA2DC+Q
=oD7G
-----END PGP SIGNATURE-----

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

* Re: gmail label support in offlineimap - update
  2012-11-28 14:47 gmail label support in offlineimap - update Rainer M Krug
@ 2012-11-28 16:27 ` Peter Portante
  2012-11-28 16:46 ` Jeremy Nickurak
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Portante @ 2012-11-28 16:27 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: Abdó Roig-Maranges, notmuch

+1

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

* Re: gmail label support in offlineimap - update
  2012-11-28 14:47 gmail label support in offlineimap - update Rainer M Krug
  2012-11-28 16:27 ` Peter Portante
@ 2012-11-28 16:46 ` Jeremy Nickurak
  2012-11-28 18:09   ` David Bremner
  2012-11-28 18:47   ` Michal Nazarewicz
  1 sibling, 2 replies; 9+ messages in thread
From: Jeremy Nickurak @ 2012-11-28 16:46 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 787 bytes --]

As far as syncing flags to notmuch, it sounds like this would be easy to
achieve with an independent 3rd tool, or even a small script:
1) Find files in the maildir modified since the last check
2) Read their keywords headers
3) Update the notmuch tags accordingnly.

The other direction sounds like it would be trickier though, since there's
no obvious way to say "what notmuch tags have changed since time X?". Is
this something that notmuch could provide?

Alternatively, would it be a good idea to give notmuch a tags-changed hook,
so that an external tool could be called on a tag change? That sounds like
would solve this problem, keep the gmail/imap logic safely away from
notmuch, and probably provide some really interesting other opportunities
for automation of things by tags.

[-- Attachment #2: Type: text/html, Size: 888 bytes --]

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

* Re: gmail label support in offlineimap - update
  2012-11-28 16:46 ` Jeremy Nickurak
@ 2012-11-28 18:09   ` David Bremner
  2012-11-29  8:57     ` Rainer M Krug
  2012-11-28 18:47   ` Michal Nazarewicz
  1 sibling, 1 reply; 9+ messages in thread
From: David Bremner @ 2012-11-28 18:09 UTC (permalink / raw)
  To: Jeremy Nickurak, notmuch

Jeremy Nickurak <not-much@trk.nickurak.ca> writes:


> The other direction sounds like it would be trickier though, since there's
> no obvious way to say "what notmuch tags have changed since time X?". Is
> this something that notmuch could provide?

Not currently, but there have been patches proposed; see e.g.

    id:1323796305-28789-1-git-send-email-schnouki@schnouki.net

> Alternatively, would it be a good idea to give notmuch a tags-changed hook,
> so that an external tool could be called on a tag change? That sounds like
> would solve this problem, keep the gmail/imap logic safely away from
> notmuch, and probably provide some really interesting other opportunities
> for automation of things by tags.

See the thread at 

    id:1342503373-16979-1-git-send-email-dominik@with-h.at

for some patches and discussion.

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

* Re: gmail label support in offlineimap - update
  2012-11-28 16:46 ` Jeremy Nickurak
  2012-11-28 18:09   ` David Bremner
@ 2012-11-28 18:47   ` Michal Nazarewicz
  2012-11-29  8:59     ` Rainer M Krug
  1 sibling, 1 reply; 9+ messages in thread
From: Michal Nazarewicz @ 2012-11-28 18:47 UTC (permalink / raw)
  To: Jeremy Nickurak, notmuch

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

On Wed, Nov 28 2012, Jeremy Nickurak wrote:
> The other direction sounds like it would be trickier though, since
> there's no obvious way to say "what notmuch tags have changed since
> time X?". Is this something that notmuch could provide?

One could parse the X-Labels header and compare it with actual tags
given message has.  If there are some tags that X-Labels lists but the
message does not have, the notmuch->gmail syncing tool could assume that
those were removed by notmuch.  Similarly with tags that are not in
X-Labels but the message has.  (Of course the list of tags would have to
be limited to those that have corresponding gmail labels.)  Just
a thought.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: gmail label support in offlineimap - update
  2012-11-28 18:09   ` David Bremner
@ 2012-11-29  8:57     ` Rainer M Krug
  2012-11-29 13:33       ` Michal Nazarewicz
  0 siblings, 1 reply; 9+ messages in thread
From: Rainer M Krug @ 2012-11-29  8:57 UTC (permalink / raw)
  To: notmuch; +Cc: Jeremy Nickurak, notmuch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/11/12 19:09, David Bremner wrote:
> Jeremy Nickurak <not-much@trk.nickurak.ca> writes:
> 
> 
>> The other direction sounds like it would be trickier though, since there's no obvious way to
>> say "what notmuch tags have changed since time X?". Is this something that notmuch could
>> provide?
> 
> Not currently, but there have been patches proposed; see e.g.
> 
> id:1323796305-28789-1-git-send-email-schnouki@schnouki.net
> 
>> Alternatively, would it be a good idea to give notmuch a tags-changed hook, so that an
>> external tool could be called on a tag change? That sounds like would solve this problem,
>> keep the gmail/imap logic safely away from notmuch, and probably provide some really
>> interesting other opportunities for automation of things by tags.
> 
> See the thread at
> 
> id:1342503373-16979-1-git-send-email-dominik@with-h.at
> 
> for some patches and discussion.

I think a "tag changed hook" could solve both problems - when there would be an additional "messge
changed" hook: the "message changed" hook could be used to add the x-headers to the notmuch
database, and the "tag changed" hook could do the inverse, i.e. update the x-headers in the message.

This would be a clean approach, which could be used for many things.

Cheers,

Rainer

> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC3I4kACgkQoYgNqgF2egoanQCfV8OL1qhXWMfV5lMOqKf6szPM
zKoAn0sZzi3f/z0r4lgH0/s19z9f1ozr
=/fc1
-----END PGP SIGNATURE-----

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

* Re: gmail label support in offlineimap - update
  2012-11-28 18:47   ` Michal Nazarewicz
@ 2012-11-29  8:59     ` Rainer M Krug
  0 siblings, 0 replies; 9+ messages in thread
From: Rainer M Krug @ 2012-11-29  8:59 UTC (permalink / raw)
  To: notmuch; +Cc: Jeremy Nickurak, notmuch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/11/12 19:47, Michal Nazarewicz wrote:
> On Wed, Nov 28 2012, Jeremy Nickurak wrote:
>> The other direction sounds like it would be trickier though, since there's no obvious way to
>> say "what notmuch tags have changed since time X?". Is this something that notmuch could
>> provide?
> 
> One could parse the X-Labels header and compare it with actual tags given message has.  If
> there are some tags that X-Labels lists but the message does not have, the notmuch->gmail
> syncing tool could assume that those were removed by notmuch.  Similarly with tags that are not
> in X-Labels but the message has.  (Of course the list of tags would have to be limited to those
> that have corresponding gmail labels.)  Just a thought.

Assumptions are dangerous - what about labels added on gmail side?

Rainer


> 
> 
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC3I+UACgkQoYgNqgF2egoUbACfdwBclerun3dypzmUHijh4rkn
DvcAn1chRuFiy0JKuB7GjM1aMC7YOyts
=vegN
-----END PGP SIGNATURE-----

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

* Re: gmail label support in offlineimap - update
  2012-11-29  8:57     ` Rainer M Krug
@ 2012-11-29 13:33       ` Michal Nazarewicz
  2012-11-29 16:09         ` Rainer M Krug
  0 siblings, 1 reply; 9+ messages in thread
From: Michal Nazarewicz @ 2012-11-29 13:33 UTC (permalink / raw)
  To: Rainer M Krug, notmuch; +Cc: Jeremy Nickurak, notmuch

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

On Thu, Nov 29 2012, Rainer M Krug wrote:
> I think a "tag changed hook" could solve both problems - when there
> would be an additional "messge changed" hook:

How would you make the “message changed” hook work? What if I do
“$EDITOR <some-mail>”? What is supposed to trigger the hook?

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: gmail label support in offlineimap - update
  2012-11-29 13:33       ` Michal Nazarewicz
@ 2012-11-29 16:09         ` Rainer M Krug
  0 siblings, 0 replies; 9+ messages in thread
From: Rainer M Krug @ 2012-11-29 16:09 UTC (permalink / raw)
  To: notmuch
  Cc: notmuch, public-notmuch-gxuj+Tv9EO5zyzON3hdc1g, Rainer M Krug,
	Jeremy Nickurak

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/11/12 14:33, Michal Nazarewicz wrote:
> On Thu, Nov 29 2012, Rainer M Krug wrote:
>> I think a "tag changed hook" could solve both problems - when there would be an additional
>> "messge changed" hook:
> 
> How would you make the ?message changed? hook work? What if I do ?$EDITOR <some-mail>?? What is
> supposed to trigger the hook?

The hook would be triggered when doing "notmuch new". Cling the hook from a different program is
not feasible, I guess, unless opne can configure the external program accordingly.


> 
> 
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC3iM4ACgkQoYgNqgF2egpIngCeKgURn+x0R3j016HRoGacmo6D
YYIAn2NmzknYGuhyYmhxy9tjmNn9KQ0M
=r15f
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2012-11-29 16:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-28 14:47 gmail label support in offlineimap - update Rainer M Krug
2012-11-28 16:27 ` Peter Portante
2012-11-28 16:46 ` Jeremy Nickurak
2012-11-28 18:09   ` David Bremner
2012-11-29  8:57     ` Rainer M Krug
2012-11-29 13:33       ` Michal Nazarewicz
2012-11-29 16:09         ` Rainer M Krug
2012-11-28 18:47   ` Michal Nazarewicz
2012-11-29  8:59     ` Rainer M Krug

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.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).