From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Provide customization variable to disable folder check when open link. Date: Thu, 1 Jul 2010 15:50:23 +0200 Message-ID: References: <1277884470-563-1-git-send-email-dmaus@ictsoc.de> <1277884470-563-2-git-send-email-dmaus@ictsoc.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=58797 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUK9z-0000xt-RN for emacs-orgmode@gnu.org; Thu, 01 Jul 2010 09:50:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUK9u-0001Xd-IS for emacs-orgmode@gnu.org; Thu, 01 Jul 2010 09:50:35 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:64752) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUK9u-0001XV-BS for emacs-orgmode@gnu.org; Thu, 01 Jul 2010 09:50:30 -0400 Received: by ewy28 with SMTP id 28so917706ewy.0 for ; Thu, 01 Jul 2010 06:50:29 -0700 (PDT) In-Reply-To: <1277884470-563-2-git-send-email-dmaus@ictsoc.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: emacs-orgmode@gnu.org 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