emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* patch for Wanderlust 2.15.5
@ 2007-02-19 15:02 Tokuya Kameshima
  2007-02-19 15:35 ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Tokuya Kameshima @ 2007-02-19 15:02 UTC (permalink / raw)
  To: emacs-orgmode

Hello.

Recently, I have started using org-mode found it's very great tool.

I have a problem to access the 'wl' links in org-mode, where I uses
Wanderlust to visit the imap folders.  This is my patch to org.el 4.65
for Wanderlust 2.15.5.

Thanks.
--Tokuya


--- org.el-4.65	Sat Feb 17 23:44:37 2007
+++ org.el	Mon Feb 19 14:37:38 2007
@@ -9000,7 +9000,8 @@
 		  (elmo-msgdb-overview-get-entity
 		   msgnum (wl-summary-buffer-msgdb))))
 	     (from (wl-summary-line-from))
-	     (subject (wl-summary-line-subject))) ; FIXME: untested
+	     (subject (let (wl-thr-indent-string wl-parent-message-entity)
+			(wl-summary-line-subject))))
 	(org-store-link-props :type "wl" :from from :to "???"
 			      :subject subject :message-id message-id)
 	(setq message-id (org-remove-angle-brackets message-id))
@@ -10072,10 +10073,19 @@
 
 (defun org-follow-wl-link (folder article)
   "Follow a Wanderlust link to FOLDER and ARTICLE."
-  (setq article (org-add-angle-brackets article))
+  (if (and (string= folder "%")
+	   article
+	   (string-match "^\\([^#]+\\)\\(#\\(.*\\)\\)?" article))
+      ;; XXX: imap-uw supports folders starting with '#' such as "#mh/inbox".
+      ;; Thus, we recompose folder and article ids.
+      (setq folder (format "%s#%s" folder (match-string 1 article))
+	    article (match-string 3 article)))
+  (if (not (elmo-folder-exists-p (wl-folder-get-elmo-folder folder)))
+      (error "No such folder: %s" folder))
   (wl-summary-goto-folder-subr folder 'no-sync t nil t nil nil)
-  (if article (wl-summary-jump-to-msg-by-message-id article))
-  (wl-summary-redisplay))
+  (and article
+       (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets article))
+       (wl-summary-redisplay)))
 
 (defun org-follow-rmail-link (folder article)
   "Follow an RMAIL link to FOLDER and ARTICLE."

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

* Re: patch for Wanderlust 2.15.5
  2007-02-19 15:02 patch for Wanderlust 2.15.5 Tokuya Kameshima
@ 2007-02-19 15:35 ` Carsten Dominik
  2007-02-19 16:33   ` Tokuya Kameshima
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2007-02-19 15:35 UTC (permalink / raw)
  To: Tokuya Kameshima; +Cc: emacs-orgmode

This is very nice, thank your very much.  Since you are at it,
what do I have to do to get the "to" field in org-store-link?  This is 
a part I am still missing.
Thanks.

- Carsten
On Feb 19, 2007, at 16:02, Tokuya Kameshima wrote:

> Hello.
>
> Recently, I have started using org-mode found it's very great tool.
>
> I have a problem to access the 'wl' links in org-mode, where I uses
> Wanderlust to visit the imap folders.  This is my patch to org.el 4.65
> for Wanderlust 2.15.5.
>
> Thanks.
> --Tokuya
>
>
> --- org.el-4.65	Sat Feb 17 23:44:37 2007
> +++ org.el	Mon Feb 19 14:37:38 2007
> @@ -9000,7 +9000,8 @@
>  		  (elmo-msgdb-overview-get-entity
>  		   msgnum (wl-summary-buffer-msgdb))))
>  	     (from (wl-summary-line-from))
> -	     (subject (wl-summary-line-subject))) ; FIXME: untested
> +	     (subject (let (wl-thr-indent-string wl-parent-message-entity)
> +			(wl-summary-line-subject))))
>  	(org-store-link-props :type "wl" :from from :to "???"
>  			      :subject subject :message-id message-id)
>  	(setq message-id (org-remove-angle-brackets message-id))
> @@ -10072,10 +10073,19 @@
>
>  (defun org-follow-wl-link (folder article)
>    "Follow a Wanderlust link to FOLDER and ARTICLE."
> -  (setq article (org-add-angle-brackets article))
> +  (if (and (string= folder "%")
> +	   article
> +	   (string-match "^\\([^#]+\\)\\(#\\(.*\\)\\)?" article))
> +      ;; XXX: imap-uw supports folders starting with '#' such as 
> "#mh/inbox".
> +      ;; Thus, we recompose folder and article ids.
> +      (setq folder (format "%s#%s" folder (match-string 1 article))
> +	    article (match-string 3 article)))
> +  (if (not (elmo-folder-exists-p (wl-folder-get-elmo-folder folder)))
> +      (error "No such folder: %s" folder))
>    (wl-summary-goto-folder-subr folder 'no-sync t nil t nil nil)
> -  (if article (wl-summary-jump-to-msg-by-message-id article))
> -  (wl-summary-redisplay))
> +  (and article
> +       (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets 
> article))
> +       (wl-summary-redisplay)))
>
>  (defun org-follow-rmail-link (folder article)
>    "Follow an RMAIL link to FOLDER and ARTICLE."
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

* Re: patch for Wanderlust 2.15.5
  2007-02-19 15:35 ` Carsten Dominik
@ 2007-02-19 16:33   ` Tokuya Kameshima
  2007-02-19 17:16     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Tokuya Kameshima @ 2007-02-19 16:33 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hello.

How about the following code for the "to" field.  This is a quick hack
but works fine for me.

Thanks.
--Tokuya

----------------------------------------------------------------------
 		  (elmo-msgdb-overview-get-entity
 		   msgnum (wl-summary-buffer-msgdb))))
	     (from (wl-summary-line-from))
+	     (to (car (elmo-message-entity-field wl-message-entity 'to)))
	     (subject (let (wl-thr-indent-string wl-parent-message-entity)
			(wl-summary-line-subject))))
-	(org-store-link-props :type "wl" :from from :to "???"
+	(org-store-link-props :type "wl" :from from :to to
			      :subject subject :message-id message-id)
 	(setq message-id (org-remove-angle-brackets message-id))
----------------------------------------------------------------------

On Mon, 19 Feb 2007 16:35:44 +0100,
Carsten Dominik <dominik@science.uva.nl> wrote:
> 
> This is very nice, thank your very much.  Since you are at it,
> what do I have to do to get the "to" field in org-store-link?  This is 
> a part I am still missing.
> Thanks.
> 
> - Carsten
> On Feb 19, 2007, at 16:02, Tokuya Kameshima wrote:
> 
> > Hello.
> >
> > Recently, I have started using org-mode found it's very great tool.
> >
> > I have a problem to access the 'wl' links in org-mode, where I uses
> > Wanderlust to visit the imap folders.  This is my patch to org.el 4.65
> > for Wanderlust 2.15.5.
> >
> > Thanks.
> > --Tokuya
> >
> >
> > --- org.el-4.65	Sat Feb 17 23:44:37 2007
> > +++ org.el	Mon Feb 19 14:37:38 2007
> > @@ -9000,7 +9000,8 @@
> >  		  (elmo-msgdb-overview-get-entity
> >  		   msgnum (wl-summary-buffer-msgdb))))
> >  	     (from (wl-summary-line-from))
> > -	     (subject (wl-summary-line-subject))) ; FIXME: untested
> > +	     (subject (let (wl-thr-indent-string wl-parent-message-entity)
> > +			(wl-summary-line-subject))))
> >  	(org-store-link-props :type "wl" :from from :to "???"
> >  			      :subject subject :message-id message-id)
> >  	(setq message-id (org-remove-angle-brackets message-id))
> > @@ -10072,10 +10073,19 @@
> >
> >  (defun org-follow-wl-link (folder article)
> >    "Follow a Wanderlust link to FOLDER and ARTICLE."
> > -  (setq article (org-add-angle-brackets article))
> > +  (if (and (string= folder "%")
> > +	   article
> > +	   (string-match "^\\([^#]+\\)\\(#\\(.*\\)\\)?" article))
> > +      ;; XXX: imap-uw supports folders starting with '#' such as 
> > "#mh/inbox".
> > +      ;; Thus, we recompose folder and article ids.
> > +      (setq folder (format "%s#%s" folder (match-string 1 article))
> > +	    article (match-string 3 article)))
> > +  (if (not (elmo-folder-exists-p (wl-folder-get-elmo-folder folder)))
> > +      (error "No such folder: %s" folder))
> >    (wl-summary-goto-folder-subr folder 'no-sync t nil t nil nil)
> > -  (if article (wl-summary-jump-to-msg-by-message-id article))
> > -  (wl-summary-redisplay))
> > +  (and article
> > +       (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets 
> > article))
> > +       (wl-summary-redisplay)))
> >
> >  (defun org-follow-rmail-link (folder article)
> >    "Follow an RMAIL link to FOLDER and ARTICLE."
> >
> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >
> >
> 
> --
> Carsten Dominik
> Sterrenkundig Instituut "Anton Pannekoek"
> Universiteit van Amsterdam
> Kruislaan 403
> NL-1098SJ Amsterdam
> phone: +31 20 525 7477
> 

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

* Re: patch for Wanderlust 2.15.5
  2007-02-19 16:33   ` Tokuya Kameshima
@ 2007-02-19 17:16     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2007-02-19 17:16 UTC (permalink / raw)
  To: Tokuya Kameshima; +Cc: emacs-orgmode

Looks fine to me, I cannot test it, but take your work for it.
Thank you very much.

- Carsten

On Feb 19, 2007, at 17:33, Tokuya Kameshima wrote:

> Hello.
>
> How about the following code for the "to" field.  This is a quick hack
> but works fine for me.
>
> Thanks.
> --Tokuya
>
> ----------------------------------------------------------------------
>  		  (elmo-msgdb-overview-get-entity
>  		   msgnum (wl-summary-buffer-msgdb))))
> 	     (from (wl-summary-line-from))
> +	     (to (car (elmo-message-entity-field wl-message-entity 'to)))
> 	     (subject (let (wl-thr-indent-string wl-parent-message-entity)
> 			(wl-summary-line-subject))))
> -	(org-store-link-props :type "wl" :from from :to "???"
> +	(org-store-link-props :type "wl" :from from :to to
> 			      :subject subject :message-id message-id)
>  	(setq message-id (org-remove-angle-brackets message-id))
> ----------------------------------------------------------------------
>
> On Mon, 19 Feb 2007 16:35:44 +0100,
> Carsten Dominik <dominik@science.uva.nl> wrote:
>>
>> This is very nice, thank your very much.  Since you are at it,
>> what do I have to do to get the "to" field in org-store-link?  This is
>> a part I am still missing.
>> Thanks.
>>
>> - Carsten
>> On Feb 19, 2007, at 16:02, Tokuya Kameshima wrote:
>>
>>> Hello.
>>>
>>> Recently, I have started using org-mode found it's very great tool.
>>>
>>> I have a problem to access the 'wl' links in org-mode, where I uses
>>> Wanderlust to visit the imap folders.  This is my patch to org.el 
>>> 4.65
>>> for Wanderlust 2.15.5.
>>>
>>> Thanks.
>>> --Tokuya
>>>
>>>
>>> --- org.el-4.65	Sat Feb 17 23:44:37 2007
>>> +++ org.el	Mon Feb 19 14:37:38 2007
>>> @@ -9000,7 +9000,8 @@
>>>  		  (elmo-msgdb-overview-get-entity
>>>  		   msgnum (wl-summary-buffer-msgdb))))
>>>  	     (from (wl-summary-line-from))
>>> -	     (subject (wl-summary-line-subject))) ; FIXME: untested
>>> +	     (subject (let (wl-thr-indent-string wl-parent-message-entity)
>>> +			(wl-summary-line-subject))))
>>>  	(org-store-link-props :type "wl" :from from :to "???"
>>>  			      :subject subject :message-id message-id)
>>>  	(setq message-id (org-remove-angle-brackets message-id))
>>> @@ -10072,10 +10073,19 @@
>>>
>>>  (defun org-follow-wl-link (folder article)
>>>    "Follow a Wanderlust link to FOLDER and ARTICLE."
>>> -  (setq article (org-add-angle-brackets article))
>>> +  (if (and (string= folder "%")
>>> +	   article
>>> +	   (string-match "^\\([^#]+\\)\\(#\\(.*\\)\\)?" article))
>>> +      ;; XXX: imap-uw supports folders starting with '#' such as
>>> "#mh/inbox".
>>> +      ;; Thus, we recompose folder and article ids.
>>> +      (setq folder (format "%s#%s" folder (match-string 1 article))
>>> +	    article (match-string 3 article)))
>>> +  (if (not (elmo-folder-exists-p (wl-folder-get-elmo-folder 
>>> folder)))
>>> +      (error "No such folder: %s" folder))
>>>    (wl-summary-goto-folder-subr folder 'no-sync t nil t nil nil)
>>> -  (if article (wl-summary-jump-to-msg-by-message-id article))
>>> -  (wl-summary-redisplay))
>>> +  (and article
>>> +       (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
>>> article))
>>> +       (wl-summary-redisplay)))
>>>
>>>  (defun org-follow-rmail-link (folder article)
>>>    "Follow an RMAIL link to FOLDER and ARTICLE."
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>>
>>
>> --
>> Carsten Dominik
>> Sterrenkundig Instituut "Anton Pannekoek"
>> Universiteit van Amsterdam
>> Kruislaan 403
>> NL-1098SJ Amsterdam
>> phone: +31 20 525 7477
>>
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

end of thread, other threads:[~2007-02-19 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-19 15:02 patch for Wanderlust 2.15.5 Tokuya Kameshima
2007-02-19 15:35 ` Carsten Dominik
2007-02-19 16:33   ` Tokuya Kameshima
2007-02-19 17:16     ` 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).