[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles
From: |
Tassilo Horn |
Subject: |
[Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles |
Date: |
Thu, 29 Jul 2010 20:06:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
David Maus <address@hidden> writes:
Hi David,
> Finally I got a novcache:
Congratulations! ;-)
> ,----[ gnus.el ]
> | ;;; Experimental Gnus setup
> |
> | (setq gnus-select-method '(nntp "news.gmane.org"))
> | (setq gnus-secondary-select-methods
> | '((nnimap "localhost"
> | (nnimap-address "localhost")
> | (nnimap-server-port 993)
> | (nnimap-stream ssl))))
> |
> | (setq nnimap-nov-is-evil nil)
> | (setq gnus-cache-enter-articles '(ticked dormant unread read))
> |
> | (setq org-gnus-nnimap-query-article-no-from-file t)
> `----
>
> Now the strange thing is that the novcache file in ~/News/overview is
> 100% identical to .overview in ~/News/agent
Two are better than one! (I have no idea why.)
> ,----
> | address@hidden ~/News % md5sum
> overview/nnimap/localhost/INBOX/1280089306/novcache
> agent/nnimap/localhost/INBOX/.overview
> | b4a78e25a064f0c260f76080a00991cd
> overview/nnimap/localhost/INBOX/1280089306/novcache
> | b4a78e25a064f0c260f76080a00991cd agent/nnimap/localhost/INBOX/.overview
> | address@hidden ~/News %
> `----
>
> Anyway: `nnimap-retrieve-headers-from-file' does not work as expected.
> First, it requires the group parameter without backend and server
> prefix (e.g. "INBOX" instead of "nnimap+localhost:INBOX".
I've expected that.
> Second it would return a cons (min-UID . max-UID). That wouldn't help
> us, would it?
What an appropriately named function that is. ;-) No, that wouldn't
help. But its code could be stolen to write and own function to insert
the right NOV file in a temp buffer, to search for the message-id.
Something like that:
--8<---------------cut here---------------start------------->8---
(defun org-gnus-nnimap-get-article-number (group server message-id)
(with-current-buffer nntp-server-buffer
(let ((nov (nnimap-group-overview-filename group server)))
(when (file-exists-p nov)
(mm-insert-file-contents nov)
(set-buffer-modified-p nil)
(when (search-forward message-id nil t)
(goto-char (line-beginning-position))
(read (current-buffer)))))))
--8<---------------cut here---------------end--------------->8---
That function is totally untested, but might do what it should.
> Third and amazingly my novcache seems to be corrupt right after
> creation: `nnimap-retrieve-headers-from-file' does not get the maximum
> UID but reads "INBOX" (?!) -- A string that looks kind of a header
> information for nov -- and not "18753" what is the highest UID in the
> mailbox.
>
> Last line of the cache:
> (it's a local copy of wanderlust general newsgroup accessed via IMAP)
>
> ,----
> | 18753 Re: checking imap folder unplugged Yoichi NAKAYAMA
> <address@hidden> Sun, 13 Oct 2002 10:19:13 +0900 <address@hidden>
> <address@hidden> 4424 13 Xref: t41.ictsoc.de INBOX:18753
> Newsgroups: gmane.mail.wanderlust.general.japanese
> `----
Really strange. Maybe the corruption comes from replacing TABs by
spaces using some home-brewn auto-replace-all-tabs-with-spaces function?
Bye,
Tassilo
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, (continued)
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Sébastien Vauban, 2010/07/21
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Tassilo Horn, 2010/07/22
- Re: [Orgmode] Re: Behavior of Gnus when called from an hyperlink, David Maus, 2010/07/26
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Tassilo Horn, 2010/07/26
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Tassilo Horn, 2010/07/26
- [Orgmode] Fixing slowness of following Gnus links to IMAP articles (was: Behavior of Gnus when called from an hyperlink), Tassilo Horn, 2010/07/27
- Re: [Orgmode] Fixing slowness of following Gnus links to IMAP articles (was: Behavior of Gnus when called from an hyperlink), David Maus, 2010/07/27
- Re: [Orgmode] Fixing slowness of following Gnus links to IMAP articles (was: Behavior of Gnus when called from an hyperlink), Nick Dokos, 2010/07/27
- [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles, Tassilo Horn, 2010/07/28
- Re: [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles, David Maus, 2010/07/29
- [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles,
Tassilo Horn <=
- [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles, Sébastien Vauban, 2010/07/30
- [Orgmode] Re: Fixing slowness of following Gnus links to IMAP articles, Tassilo Horn, 2010/07/28
- Message not available
- [Orgmode] Re: Patchwork: Patch 176 Accepted, Tassilo Horn, 2010/07/31
- [Orgmode] Re: Patchwork: Patch 176 Accepted, Bastien, 2010/07/31
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Tassilo Horn, 2010/07/20
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Sébastien Vauban, 2010/07/21
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Bernt Hansen, 2010/07/20
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Tassilo Horn, 2010/07/20
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Sébastien Vauban, 2010/07/21
- [Orgmode] Re: Behavior of Gnus when called from an hyperlink, Tassilo Horn, 2010/07/22