emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-gnus-follow-link and nnimap-request-scan
@ 2011-04-11 21:51 Eden Cardim
  2011-04-12  7:26 ` Tassilo Horn
  0 siblings, 1 reply; 5+ messages in thread
From: Eden Cardim @ 2011-04-11 21:51 UTC (permalink / raw)
  To: emacs-orgmode


After switching to using gnus mail splitting, following links to nnimap
messages has become very slow. I'm fairly familiar with the gnus source,
but not org-mode's as much, after wading a bit in the source I landed on 
,----[ org-gnus-follow-link ]
| 	 (gnus-activate-group group t)
`----
,----[ C-h f gnus-activate-group RET ]
| gnus-activate-group is a compiled Lisp function in `gnus-start.el'.
| 
| (gnus-activate-group GROUP &optional SCAN DONT-CHECK METHOD DONT-SUB-CHECK)
| 
| Check whether a group has been activated or not.
| If SCAN, request a scan of that group as well.
| 
| [back]
`----
which ends up invoking
,----
| (deffoo nnimap-request-scan (&optional group server)
|   (when (and (nnimap-possibly-change-group nil server)
| 	     nnimap-inbox
| 	     nnimap-split-methods)
|     (nnheader-message 7 "nnimap %s splitting mail..." server)
|     (nnimap-split-incoming-mail)))
`----
Which is certainly dispensable for visiting articles via nnimap.
Switching to
,----[ org-gnus-follow-link ]
| 	 (gnus-activate-group group nil)
`----
Makes the linked articles appear nearly instantly.

Am I missing something here?

-- 
Eden Cardim
Software Engineer
edencardim.com
+55 73 9986-3963

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

* Re: org-gnus-follow-link and nnimap-request-scan
  2011-04-11 21:51 org-gnus-follow-link and nnimap-request-scan Eden Cardim
@ 2011-04-12  7:26 ` Tassilo Horn
  2011-04-12  7:57   ` Eden Cardim
  0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2011-04-12  7:26 UTC (permalink / raw)
  To: emacs-orgmode

Eden Cardim <edencardim@gmail.com> writes:

Hi Eden,

> After switching to using gnus mail splitting, following links to
> nnimap messages has become very slow. I'm fairly familiar with the
> gnus source, but not org-mode's as much, after wading a bit in the
> source I landed on

[...]

> ,----[ org-gnus-follow-link ]
> | 	 (gnus-activate-group group t)
> `----
> Which is certainly dispensable for visiting articles via nnimap.
> Switching to
> ,----[ org-gnus-follow-link ]
> | 	 (gnus-activate-group group nil)
> `----
> Makes the linked articles appear nearly instantly.
>
> Am I missing something here?

No, I just wasn't really sure what that SCAN argument means, so I tried
to be as safe as possible.  If it's always safe to provide nil, let's
change that.

Bye,
Tassilo

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

* Re: org-gnus-follow-link and nnimap-request-scan
  2011-04-12  7:26 ` Tassilo Horn
@ 2011-04-12  7:57   ` Eden Cardim
  2011-04-12 18:30     ` Tassilo Horn
  0 siblings, 1 reply; 5+ messages in thread
From: Eden Cardim @ 2011-04-12  7:57 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> "Tassilo" == Tassilo Horn <tassilo@member.fsf.org> writes:

    Tassilo> No, I just wasn't really sure what that SCAN argument
    Tassilo> means, so I tried to be as safe as possible.  If it's
    Tassilo> always safe to provide nil, let's change that.

Well, right now all it does is to check split rules against incoming
mail. But, if we have a link to a message in org, then that message
already went through the split process, so re-splitting is unnecessary.

-- 
Eden Cardim
Software Engineer
edencardim.com
+55 73 9986-3963

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

* Re: org-gnus-follow-link and nnimap-request-scan
  2011-04-12  7:57   ` Eden Cardim
@ 2011-04-12 18:30     ` Tassilo Horn
  2011-05-02  9:10       ` [Accepted] " Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2011-04-12 18:30 UTC (permalink / raw)
  To: emacs-orgmode

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

Eden Cardim <edencardim@gmail.com> writes:

>     Tassilo> No, I just wasn't really sure what that SCAN argument
>     Tassilo> means, so I tried to be as safe as possible.  If it's
>     Tassilo> always safe to provide nil, let's change that.
>
> Well, right now all it does is to check split rules against incoming
> mail. But, if we have a link to a message in org, then that message
> already went through the split process, so re-splitting is
> unnecessary.

Ok, so here we go:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Call-gnus-activate-group-without-SCAN-arg.patch --]
[-- Type: text/x-patch, Size: 889 bytes --]

From 89fecc7b938385647618dc28c4df304df872e6eb Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Tue, 12 Apr 2011 20:27:54 +0200
Subject: [PATCH] Call gnus-activate-group without SCAN arg.

* org-gnus.el (org-gnus-follow-link): Don't request scan of
group when following link.
---
 lisp/org-gnus.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index eba4cb4..a5ece8b 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -249,7 +249,7 @@ If `org-store-link' was called with a prefix arg the meaning of
   (when article
     (setq article (org-substring-no-properties article)))
   (cond ((and group article)
-	 (gnus-activate-group group t)
+	 (gnus-activate-group group)
 	 (condition-case nil
 	     (let* ((method (gnus-find-method-for-group group))
 		    (backend (car method))
-- 
1.7.5.rc1


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


Bye,
Tassilo

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

* [Accepted]  org-gnus-follow-link and nnimap-request-scan
  2011-04-12 18:30     ` Tassilo Horn
@ 2011-05-02  9:10       ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2011-05-02  9:10 UTC (permalink / raw)
  To: emacs-orgmode

Patch 747 (http://patchwork.newartisans.com/patch/747/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C8762qjqqfy.fsf%40member.fsf.org%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] org-gnus-follow-link and nnimap-request-scan
> Date: Tue, 12 Apr 2011 23:30:17 -0000
> From: Tassilo Horn <tassilo@member.fsf.org>
> X-Patchwork-Id: 747
> Message-Id: <8762qjqqfy.fsf@member.fsf.org>
> To: emacs-orgmode@gnu.org
> 
> Eden Cardim <edencardim@gmail.com> writes:
> 
> >     Tassilo> No, I just wasn't really sure what that SCAN argument
> >     Tassilo> means, so I tried to be as safe as possible.  If it's
> >     Tassilo> always safe to provide nil, let's change that.
> >
> > Well, right now all it does is to check split rules against incoming
> > mail. But, if we have a link to a message in org, then that message
> > already went through the split process, so re-splitting is
> > unnecessary.
> 
> Ok, so here we go:
> Bye,
> Tassilo
> 
> 
> >From 89fecc7b938385647618dc28c4df304df872e6eb Mon Sep 17 00:00:00 2001
> From: Tassilo Horn <tassilo@member.fsf.org>
> Date: Tue, 12 Apr 2011 20:27:54 +0200
> Subject: [PATCH] Call gnus-activate-group without SCAN arg.
> 
> * org-gnus.el (org-gnus-follow-link): Don't request scan of
> group when following link.
> ---
>  lisp/org-gnus.el |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
> index eba4cb4..a5ece8b 100644
> --- a/lisp/org-gnus.el
> +++ b/lisp/org-gnus.el
> @@ -249,7 +249,7 @@ If `org-store-link' was called with a prefix arg the meaning of
>    (when article
>      (setq article (org-substring-no-properties article)))
>    (cond ((and group article)
> -	 (gnus-activate-group group t)
> +	 (gnus-activate-group group)
>  	 (condition-case nil
>  	     (let* ((method (gnus-find-method-for-group group))
>  		    (backend (car method))
> -- 
> 1.7.5.rc1
> 
> 

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

end of thread, other threads:[~2011-05-02  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11 21:51 org-gnus-follow-link and nnimap-request-scan Eden Cardim
2011-04-12  7:26 ` Tassilo Horn
2011-04-12  7:57   ` Eden Cardim
2011-04-12 18:30     ` Tassilo Horn
2011-05-02  9:10       ` [Accepted] " Carsten Dominik

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).