Gnus development mailing list
 help / color / mirror / Atom feed
From: Trevor Murphy <trevor.m.murphy@gmail.com>
To: ding@gnus.org
Subject: Why can't I see X-GM-LABELS as an extra header when talking to Gmail over IMAP?
Date: Tue, 08 Oct 2013 19:35:49 -0400	[thread overview]
Message-ID: <87li239vze.fsf@gmail.com> (raw)

I'm trying to ask this question "the smart way", but unfortunately 
I'm out of my depths.   I'm following some instructions that I've 
modified according to my best guesses from the latest Gmail API. 
Links:

http://blog.devnode.pl/blog/2012/03/30/gnus/
https://developers.google.com/gmail/imap_extensions?csw=1#access_to_gmail_labels_x-gm-labels 
Specifically, in my .emacs, I have:  (setq nnmail-extra-headers 
'(To Newsgroups Cc X-GM-LABELS))
(defun tmm:gnus-get-gmail-label (header)
  (gnus-extra-header 'X-GM-LABELS header))
(defalias 'gnus-user-format-function-X 'tmm:gnus-get-gmail-label)
(setq gnus-summary-line-format "%U%R%z %-6,6d: %(%[%-23,23f%]%) 
%-30,30uX %B%s
")
 
The "%-30,30uX" part gives me a nice 30-space wide gap of nothing 
in my summary buffer.  (I have 30 spaces in there just so I can 
see what I'm doing.  I'll make it more reasonable once I get this 
down.)   I would prefer to see ... something reminiscent of the 
Gmail labels I see in the web interface.  End goal is to just pull 
up the first label, but at this point I'd be happy to see all / 
any of them.   I'm baffled why I see nothing.  I used 
`edebug-on-entry' on `nnimail-retrieve-headers' and saw that Gnus 
/ nnimap.el was sending the following command:
 
"UID FETCH 12163:12638 (UID RFC822.SIZE BODYSTRUCTURE 
BODY.PEEK[HEADER.FIELDS (Subject From Date Message-Id References 
In-Reply-To Xref To Newsgroups Cc X-GM-LABELS)])"
 
When I switched to the buffer Gnus was using to negotiate the 
protocol, I noticed that Gmail wasn't returning any X-GM-LABELS 
header in its responses.  All the other headers showed up as 
appropriate.
 
This made me worry that, for whatever reason, Gmail didn't feel 
like supporting its labels extension today.  But when I dug into 
the `nnimap-object' I saw that it had the following capabilities:

("IMAP4REV1" "UNSELECT" "IDLE" "NAMESPACE" "QUOTA" "ID" "XLIST" 
"CHILDREN" "X-GM-EXT-1" "UIDPLUS" "COMPRESS=DEFLATE" "ENABLE" 
"MOVE" "CONDSTORE" "ESEARCH")
 
Which includes "X-GM-EXT-1".

Is there anything else I can do to figure out what's up?  Have 
other folks worked around this issue somehow?  Any pointers would 
be much appreciated.

--
Trevor Murphy
GnuPG Key: 0xCB06EAAF




             reply	other threads:[~2013-10-08 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 23:35 Trevor Murphy [this message]
2013-12-26 17:13 ` Lars Ingebrigtsen
2014-01-01 14:43 ` Leonidas Tsampros

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

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

  git send-email \
    --in-reply-to=87li239vze.fsf@gmail.com \
    --to=trevor.m.murphy@gmail.com \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).