From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83806 Path: news.gmane.org!not-for-mail From: Trevor Murphy Newsgroups: gmane.emacs.gnus.general 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 Message-ID: <87li239vze.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1381275407 18197 80.91.229.3 (8 Oct 2013 23:36:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2013 23:36:47 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32062@lists.math.uh.edu Wed Oct 09 01:36:51 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VTgpc-0005l8-SM for ding-account@gmane.org; Wed, 09 Oct 2013 01:36:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1VTgoy-0007Y7-3l; Tue, 08 Oct 2013 18:36:08 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1VTgov-0007Xq-BP for ding@lists.math.uh.edu; Tue, 08 Oct 2013 18:36:05 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1VTgot-00030f-LO for ding@lists.math.uh.edu; Tue, 08 Oct 2013 18:36:04 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1VTgor-0007yP-SU for ding@gnus.org; Wed, 09 Oct 2013 01:36:01 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VTgor-0005OY-Mo for ding@gnus.org; Wed, 09 Oct 2013 01:36:01 +0200 Original-Received: from z65-50-91-81.ips.direcpath.com ([65.50.91.81]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Oct 2013 01:36:01 +0200 Original-Received: from trevor.m.murphy by z65-50-91-81.ips.direcpath.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Oct 2013 01:36:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: z65-50-91-81.ips.direcpath.com Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:PIfJ59cun9wLfa080dlf80wCRro= X-Spam-Score: -1.3 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83806 Archived-At: 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