* [PATCH] org-wl: Disable folder scan when link open
@ 2010-06-30 7:54 David Maus
2010-06-30 7:54 ` [PATCH] Provide customization variable to disable folder check when open link David Maus
0 siblings, 1 reply; 4+ messages in thread
From: David Maus @ 2010-06-30 7:54 UTC (permalink / raw)
To: emacs-orgmode
This patch for org-wl.el adds a customization variable
`org-wl-disable-folder-check' which disables checking folders for new
messages when a WL link is opened. Default value is t.
This will change current behavior of `org-wl-open', but I think it is
reasonable to assume, that if a user opens a link, he does
not want to check for new messages (what could take some time).
Best,
-- David
David Maus (1):
Provide customization variable to disable folder check when open
link.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Provide customization variable to disable folder check when open link.
2010-06-30 7:54 [PATCH] org-wl: Disable folder scan when link open David Maus
@ 2010-06-30 7:54 ` David Maus
2010-07-01 13:50 ` Carsten Dominik
0 siblings, 1 reply; 4+ messages in thread
From: David Maus @ 2010-06-30 7:54 UTC (permalink / raw)
To: emacs-orgmode
* org-wl.el (org-wl-disable-folder-check): New customization
variable.
(org-wl-open): Disable folder check depending on
`orrg-wl-disable-folder-check'.
---
lisp/org-wl.el | 63 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/lisp/org-wl.el b/lisp/org-wl.el
index a5c8218..7746427 100644
--- a/lisp/org-wl.el
+++ b/lisp/org-wl.el
@@ -62,6 +62,11 @@ googlegroups otherwise."
:type 'boolean
:group 'org-wl)
+(defcustom org-wl-disable-folder-check t
+ "Disable check for new messages when open a link."
+ :type 'boolean
+ :group 'org-wl)
+
(defcustom org-wl-namazu-default-index nil
"Default namazu search index."
:type 'directory
@@ -233,33 +238,37 @@ with `org-wl-namazu-default-index' as search index. When called
with two prefixes or `org-wl-namazu-default-index' is nil, ask
for namazu index."
(require 'wl)
- (unless wl-init (wl))
- ;; XXX: The imap-uw's MH folder names start with "%#".
- (if (not (string-match "\\`\\(\\(?:%#\\)?[^#]+\\)\\(#\\(.*\\)\\)?" path))
- (error "Error in Wanderlust link"))
- (let ((folder (match-string 1 path))
- (article (match-string 3 path)))
- ;; maybe open message in namazu search folder
- (when current-prefix-arg
- (setq folder (concat "[" article "]"
- (if (and (equal current-prefix-arg '(4))
- org-wl-namazu-default-index)
- org-wl-namazu-default-index
- (read-directory-name "Namazu index: ")))))
- (if (not (elmo-folder-exists-p (org-no-warnings
- (wl-folder-get-elmo-folder folder))))
- (error "No such folder: %s" folder))
- (let ((old-buf (current-buffer))
- (old-point (point-marker)))
- (wl-folder-goto-folder-subr folder)
- (with-current-buffer old-buf
- ;; XXX: `wl-folder-goto-folder-subr' moves point to the
- ;; beginning of the current line. So, restore the point
- ;; in the old buffer.
- (goto-char old-point))
- (and article (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
- article))
- (wl-summary-redisplay)))))
+ (let ((wl-auto-check-folder-name
+ (if org-wl-disable-folder-check
+ 'none
+ wl-auto-check-folder-name)))
+ (unless wl-init (wl))
+ ;; XXX: The imap-uw's MH folder names start with "%#".
+ (if (not (string-match "\\`\\(\\(?:%#\\)?[^#]+\\)\\(#\\(.*\\)\\)?" path))
+ (error "Error in Wanderlust link"))
+ (let ((folder (match-string 1 path))
+ (article (match-string 3 path)))
+ ;; maybe open message in namazu search folder
+ (when current-prefix-arg
+ (setq folder (concat "[" article "]"
+ (if (and (equal current-prefix-arg '(4))
+ org-wl-namazu-default-index)
+ org-wl-namazu-default-index
+ (read-directory-name "Namazu index: ")))))
+ (if (not (elmo-folder-exists-p (org-no-warnings
+ (wl-folder-get-elmo-folder folder))))
+ (error "No such folder: %s" folder))
+ (let ((old-buf (current-buffer))
+ (old-point (point-marker)))
+ (wl-folder-goto-folder-subr folder)
+ (with-current-buffer old-buf
+ ;; XXX: `wl-folder-goto-folder-subr' moves point to the
+ ;; beginning of the current line. So, restore the point
+ ;; in the old buffer.
+ (goto-char old-point))
+ (and article (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
+ article))
+ (wl-summary-redisplay))))))
(provide 'org-wl)
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Provide customization variable to disable folder check when open link.
2010-06-30 7:54 ` [PATCH] Provide customization variable to disable folder check when open link David Maus
@ 2010-07-01 13:50 ` Carsten Dominik
2010-07-02 19:36 ` Darlan Cavalcante Moreira
0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2010-07-01 13:50 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode
Applied, thanks.
- Carsten
On Jun 30, 2010, at 9:54 AM, David Maus wrote:
> * org-wl.el (org-wl-disable-folder-check): New customization
> variable.
> (org-wl-open): Disable folder check depending on
> `orrg-wl-disable-folder-check'.
> ---
> lisp/org-wl.el | 63 +++++++++++++++++++++++++++++++
> +------------------------
> 1 files changed, 36 insertions(+), 27 deletions(-)
>
> diff --git a/lisp/org-wl.el b/lisp/org-wl.el
> index a5c8218..7746427 100644
> --- a/lisp/org-wl.el
> +++ b/lisp/org-wl.el
> @@ -62,6 +62,11 @@ googlegroups otherwise."
> :type 'boolean
> :group 'org-wl)
>
> +(defcustom org-wl-disable-folder-check t
> + "Disable check for new messages when open a link."
> + :type 'boolean
> + :group 'org-wl)
> +
> (defcustom org-wl-namazu-default-index nil
> "Default namazu search index."
> :type 'directory
> @@ -233,33 +238,37 @@ with `org-wl-namazu-default-index' as search
> index. When called
> with two prefixes or `org-wl-namazu-default-index' is nil, ask
> for namazu index."
> (require 'wl)
> - (unless wl-init (wl))
> - ;; XXX: The imap-uw's MH folder names start with "%#".
> - (if (not (string-match "\\`\\(\\(?:%#\\)?[^#]+\\)\\(#\\(.*\\)\
> \)?" path))
> - (error "Error in Wanderlust link"))
> - (let ((folder (match-string 1 path))
> - (article (match-string 3 path)))
> - ;; maybe open message in namazu search folder
> - (when current-prefix-arg
> - (setq folder (concat "[" article "]"
> - (if (and (equal current-prefix-arg '(4))
> - org-wl-namazu-default-index)
> - org-wl-namazu-default-index
> - (read-directory-name "Namazu index: ")))))
> - (if (not (elmo-folder-exists-p (org-no-warnings
> - (wl-folder-get-elmo-folder folder))))
> - (error "No such folder: %s" folder))
> - (let ((old-buf (current-buffer))
> - (old-point (point-marker)))
> - (wl-folder-goto-folder-subr folder)
> - (with-current-buffer old-buf
> - ;; XXX: `wl-folder-goto-folder-subr' moves point to the
> - ;; beginning of the current line. So, restore the point
> - ;; in the old buffer.
> - (goto-char old-point))
> - (and article (wl-summary-jump-to-msg-by-message-id (org-add-
> angle-brackets
> - article))
> - (wl-summary-redisplay)))))
> + (let ((wl-auto-check-folder-name
> + (if org-wl-disable-folder-check
> + 'none
> + wl-auto-check-folder-name)))
> + (unless wl-init (wl))
> + ;; XXX: The imap-uw's MH folder names start with "%#".
> + (if (not (string-match "\\`\\(\\(?:%#\\)?[^#]+\\)\\(#\\(.*\\)\
> \)?" path))
> + (error "Error in Wanderlust link"))
> + (let ((folder (match-string 1 path))
> + (article (match-string 3 path)))
> + ;; maybe open message in namazu search folder
> + (when current-prefix-arg
> + (setq folder (concat "[" article "]"
> + (if (and (equal current-prefix-arg '(4))
> + org-wl-namazu-default-index)
> + org-wl-namazu-default-index
> + (read-directory-name "Namazu index: ")))))
> + (if (not (elmo-folder-exists-p (org-no-warnings
> + (wl-folder-get-elmo-folder folder))))
> + (error "No such folder: %s" folder))
> + (let ((old-buf (current-buffer))
> + (old-point (point-marker)))
> + (wl-folder-goto-folder-subr folder)
> + (with-current-buffer old-buf
> + ;; XXX: `wl-folder-goto-folder-subr' moves point to the
> + ;; beginning of the current line. So, restore the point
> + ;; in the old buffer.
> + (goto-char old-point))
> + (and article (wl-summary-jump-to-msg-by-message-id (org-add-angle-
> brackets
> + article))
> + (wl-summary-redisplay))))))
>
> (provide 'org-wl)
>
> --
> 1.7.1
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Provide customization variable to disable folder check when open link.
2010-07-01 13:50 ` Carsten Dominik
@ 2010-07-02 19:36 ` Darlan Cavalcante Moreira
0 siblings, 0 replies; 4+ messages in thread
From: Darlan Cavalcante Moreira @ 2010-07-02 19:36 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
As an org-mode and wanderlust user I can say that this is indeed much
better now.
Thanks
--
Darlan
At Thu, 1 Jul 2010 15:50:23 +0200,
Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> Applied, thanks.
>
> - Carsten
>
> On Jun 30, 2010, at 9:54 AM, David Maus wrote:
>
> > * org-wl.el (org-wl-disable-folder-check): New customization
> > variable.
> > (org-wl-open): Disable folder check depending on
> > `orrg-wl-disable-folder-check'.
> > ---
> > lisp/org-wl.el | 63 +++++++++++++++++++++++++++++++
> > +------------------------
> > 1 files changed, 36 insertions(+), 27 deletions(-)
> >
> > diff --git a/lisp/org-wl.el b/lisp/org-wl.el
> > index a5c8218..7746427 100644
> > --- a/lisp/org-wl.el
> > +++ b/lisp/org-wl.el
> > @@ -62,6 +62,11 @@ googlegroups otherwise."
> > :type 'boolean
> > :group 'org-wl)
> >
> > +(defcustom org-wl-disable-folder-check t
> > + "Disable check for new messages when open a link."
> > + :type 'boolean
> > + :group 'org-wl)
> > +
> > (defcustom org-wl-namazu-default-index nil
> > "Default namazu search index."
> > :type 'directory
> > @@ -233,33 +238,37 @@ with `org-wl-namazu-default-index' as search
> > index. When called
> > with two prefixes or `org-wl-namazu-default-index' is nil, ask
> > for namazu index."
> > (require 'wl)
> > - (unless wl-init (wl))
> > - ;; XXX: The imap-uw's MH folder names start with "%#".
> > - (if (not (string-match "\\`\\(\\(?:%#\\)?[^#]+\\)\\(#\\(.*\\)\
> > \)?" path))
> > - (error "Error in Wanderlust link"))
> > - (let ((folder (match-string 1 path))
> > - (article (match-string 3 path)))
> > - ;; maybe open message in namazu search folder
> > - (when current-prefix-arg
> > - (setq folder (concat "[" article "]"
> > - (if (and (equal current-prefix-arg '(4))
> > - org-wl-namazu-default-index)
> > - org-wl-namazu-default-index
> > - (read-directory-name "Namazu index: ")))))
> > - (if (not (elmo-folder-exists-p (org-no-warnings
> > - (wl-folder-get-elmo-folder folder))))
> > - (error "No such folder: %s" folder))
> > - (let ((old-buf (current-buffer))
> > - (old-point (point-marker)))
> > - (wl-folder-goto-folder-subr folder)
> > - (with-current-buffer old-buf
> > - ;; XXX: `wl-folder-goto-folder-subr' moves point to the
> > - ;; beginning of the current line. So, restore the point
> > - ;; in the old buffer.
> > - (goto-char old-point))
> > - (and article (wl-summary-jump-to-msg-by-message-id (org-add-
> > angle-brackets
> > - article))
> > - (wl-summary-redisplay)))))
> > + (let ((wl-auto-check-folder-name
> > + (if org-wl-disable-folder-check
> > + 'none
> > + wl-auto-check-folder-name)))
> > + (unless wl-init (wl))
> > + ;; XXX: The imap-uw's MH folder names start with "%#".
> > + (if (not (string-match "\\`\\(\\(?:%#\\)?[^#]+\\)\\(#\\(.*\\)\
> > \)?" path))
> > + (error "Error in Wanderlust link"))
> > + (let ((folder (match-string 1 path))
> > + (article (match-string 3 path)))
> > + ;; maybe open message in namazu search folder
> > + (when current-prefix-arg
> > + (setq folder (concat "[" article "]"
> > + (if (and (equal current-prefix-arg '(4))
> > + org-wl-namazu-default-index)
> > + org-wl-namazu-default-index
> > + (read-directory-name "Namazu index: ")))))
> > + (if (not (elmo-folder-exists-p (org-no-warnings
> > + (wl-folder-get-elmo-folder folder))))
> > + (error "No such folder: %s" folder))
> > + (let ((old-buf (current-buffer))
> > + (old-point (point-marker)))
> > + (wl-folder-goto-folder-subr folder)
> > + (with-current-buffer old-buf
> > + ;; XXX: `wl-folder-goto-folder-subr' moves point to the
> > + ;; beginning of the current line. So, restore the point
> > + ;; in the old buffer.
> > + (goto-char old-point))
> > + (and article (wl-summary-jump-to-msg-by-message-id (org-add-angle-
> > brackets
> > + article))
> > + (wl-summary-redisplay))))))
> >
> > (provide 'org-wl)
> >
> > --
> > 1.7.1
> >
> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-02 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 7:54 [PATCH] org-wl: Disable folder scan when link open David Maus
2010-06-30 7:54 ` [PATCH] Provide customization variable to disable folder check when open link David Maus
2010-07-01 13:50 ` Carsten Dominik
2010-07-02 19:36 ` Darlan Cavalcante Moreira
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).