From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79344 Path: news.gmane.org!not-for-mail From: nyc4bos@aol.com Newsgroups: gmane.emacs.gnus.general Subject: Re: Cannot subscribe or see nndrafts folder upon startup Date: Sat, 02 Jul 2011 14:58:16 -0400 Message-ID: References: <2a8vsjwqeb.fsf@news.eternal-september.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309633327 28760 80.91.229.12 (2 Jul 2011 19:02:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Jul 2011 19:02:07 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27640@lists.math.uh.edu Sat Jul 02 21:02:04 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qd5S6-0005rH-4b for ding-account@gmane.org; Sat, 02 Jul 2011 21:02:02 +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 1Qd5S2-0006Mg-9o; Sat, 02 Jul 2011 14:01:58 -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 1Qd5S1-0006MZ-AU for ding@lists.math.uh.edu; Sat, 02 Jul 2011 14:01:57 -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 1Qd5Rr-00085h-CN for ding@lists.math.uh.edu; Sat, 02 Jul 2011 14:01:57 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Qd5Rp-0001eS-VE for ding@gnus.org; Sat, 02 Jul 2011 21:01:45 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qd5Rp-0005kn-M1 for ding@gnus.org; Sat, 02 Jul 2011 21:01:45 +0200 Original-Received: from 63.117.244.126 ([63.117.244.126]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Jul 2011 21:01:45 +0200 Original-Received: from nyc4bos by 63.117.244.126 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Jul 2011 21:01:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 63.117.244.126 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) Cancel-Lock: sha1:nDvFyC6QpTyGlV1ZqZT2L+Nq900= X-Spam-Score: -3.7 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79344 Archived-At: Katsumi Yamaoka writes: > Katsumi Yamaoka wrote: >> Katsumi Yamaoka wrote: >>> Lars Magne Ingebrigtsen wrote: >>>> However, the drafts group could update itself when you delete a message >>>> from it, for instance. That would only be slightly inconsistent. > > [...] >>> I've installed a fix. > >> Er, the fix was incomplete. It doesn't work properly if there're >> sparse draft messages. > [...] > > I found the easiest way to fix it. Installed. > > Lars Magne Ingebrigtsen wrote: >> The drafts group doesn't update until you hit `g', like other normal >> groups. It's somewhat difficult to have the group buffer update itself >> when a message lands in the draft buffer -- it lands there by you just >> saving the message you're composing. And I don't want any Gnus stuff to >> run off of `save-buffer-hook' or the like. > > I tried this. A patch is below. Not tested fully, though. I tried this patch (below). I still have the original problem (nndraft:drafts group not listed in *Group* buffer when starting Gnus). Is that problem fixed (and waiting to be synced into bzr Gnus)? Thanks. > > > --- nndraft.el~ 2011-04-05 05:00:10.178750000 +0000 > +++ nndraft.el 2011-07-01 10:31:26.218750000 +0000 > @@ -161,6 +161,13 @@ > (message-headers-to-generate > nndraft-required-headers message-draft-headers nil)))) > > +(defun nndraft-update-unread-articles (group) > + "Return a function that updates unread articles of GROUP." > + `(lambda nil > + (with-current-buffer gnus-group-buffer > + (let ((gnus-group-marked (list ,(concat "nndraft:" group)))) > + (gnus-group-get-new-news-this-group nil t))))) > + > (deffoo nndraft-request-associate-buffer (group) > "Associate the current buffer with some article in the draft group." > (nndraft-open-server "") > @@ -182,6 +189,10 @@ > 'write-contents-hooks))) > (gnus-make-local-hook hook) > (add-hook hook 'nndraft-generate-headers nil t)) > + (let ((fn (nndraft-update-unread-articles group))) > + (gnus-make-local-hook 'after-save-hook) > + (add-hook 'after-save-hook fn nil t) > + (message-add-action (caddr fn) 'exit 'postpone 'kill)) > article)) > > (deffoo nndraft-request-group (group &optional server dont-check info)