emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [ANN] OS X only: Insert links to flagged emails
@ 2009-03-19 19:07 Christopher Suckling
  2009-03-20 20:13 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Suckling @ 2009-03-19 19:07 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

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

All,

For various reasons (mainly Spotlight and an excess of HTML mail send  
by employers), I've migrated back to Mail.app after some time in Mutt  
(and how I miss the speed and threading).

I habitually flag mails that need attention at a later date, and  
rather than use both org-mode and Mail.app to keep track of what needs  
doing, I've written a couple of hybid elisp AppleScript functions to  
suck links to my flagged email into org-mode.

More details in the attached file.

Comments and improvements welcome.

Best,

Christopher


[-- Attachment #2: org-mac-flagged-mail.el --]
[-- Type: application/octet-stream, Size: 4579 bytes --]

;;; org-mac-flagged-mail.el --- import links to OS X Mail.app messages
;;
;; Author: Christopher Suckling <suckling at gmail dot com>
;; Keywords: outlines, hypermedia, org, mail
;; Version: 0.624

;; Commentary 
;; This library searches for flagged messages in a Mail.app
;; account. It creates hyperlinks to these messages and copies them to
;; the kill ring for further processing, for example, the included
;; function (org-mac-insert-flagged-mail), inserts these links into an
;; org-mode buffer.

;; Installation 
;; Add (require 'org-mac-flagged-mail) to your .emacs and customize
;; the variable org-mac-mail-theAccount to the Mail.app account you
;; wish to search.

;; Two functions are provided. 
;; (org-mac-create-flagged-mail) copies a formatted list of links to
;; the kill ring.
;; (org-mac-insert-flagged-mail) searches within an org-mode buffer
;; for a specific heading, creating it if it doesn't exist. Any
;; message:// links within the first level of that heading are deleted
;; and replaced with links to flagged messages.

;; If you have Growl installed and would like more visual feedback
;; whilst AppleScript searches for messages, please uncomment lines
;; 60 to 65.

(require 'org-mac-message)

(defgroup org-mac-flagged-mail nil
  "Options concerning linking to flagged Mail.app messages"
  :tag "Org Mail.app"
  :group 'org-link)

(defcustom org-mac-mail-theAccount "mailaccount"
  "The Mail.app account in which to search for flagged messages"
  :group 'org-mac-flagged-mail
  :type 'string)

(defun org-mac-create-flagged-mail ()
  "Import flagged messages from Mail.app and copy them to the
kill ring"
  (interactive)
  (message "AppleScript: searching mailboxes...")
  (let* ((theLinkList (do-applescript
		      (concat
		       "tell application \"Mail\"\n"
		       "set theMailboxes to every mailbox of account \"" org-mac-mail-theAccount "\"\n"
		       "set theLinkList to {}\n"
		       "repeat with aMailbox in theMailboxes\n"
		       "set theSelection to (every message in aMailbox whose flagged status = true)\n"
		       "repeat with theMessage in theSelection\n"
		       "set theID to message id of theMessage\n"
		       "set theSubject to subject of theMessage\n"
		       "set theLink to \"message://\" & theID & \"::split::\" & theSubject & \"\n\"\n"
		       "copy theLink to end of theLinkList\n"
		       ;; "tell application \"GrowlHelperApp\"\n"
		       ;; "set the allNotificationsList to {\"FlaggedMail\"}\n"
		       ;; "set the enabledNotificationsList to allNotificationsList\n"
		       ;; "register as application \"FlaggedMail\" all notifications allNotificationsList default notifications enabledNotificationsList icon of application \"Mail\"\n"
		       ;; "notify with name \"FlaggedMail\" title \"Importing flagged message\" description theSubject application name \"FlaggedMail\"\n"
		       ;; "end tell\n"
		       "end repeat\n"
		       "end repeat\n"
		       "return theLinkList as string\n"
		       "end tell")))
	(splitLinkList (split-string theLinkList "\n"))
	splitLink
	theURL
	theTitle
	orglink
	(orglinkList nil))
    (while splitLinkList
      (progn
	(setq splitLink (split-string (pop splitLinkList) "::split::"))
	(setq theURL (car splitLink))
	(setq theTitle (cadr splitLink))
	(if (not (string= theURL ""))
	    (progn
	      (setq orglink (org-make-link-string theURL theTitle))
	      (push orglink orglinkList)))))
    (with-temp-buffer      
      (while orglinkList
	(insert (concat (pop orglinkList)) "\n"))
      (kill-region (point-min) (point-max))
      (message "Flagged messages copied to kill ring"))))

(defun org-mac-insert-flagged-mail (org-buffer org-heading)
  "Delete only links to messages"
  (interactive "bBuffer in which to insert links: \nsHeading after which to insert links: ")
  (save-excursion
    (set-buffer org-buffer)
    (goto-char (point-min))
    (let ((isearch-forward t)
	  (message-re "\\[\\[\\(message:\\)?\\([^]]+\\)\\]\\(\\[\\([^]]+\\)\\]\\)?\\]"))
      (if (org-goto-local-search-headings org-heading nil t)
	  (if (not (eobp))
	      (progn
		(save-excursion
		  (while (re-search-forward message-re (save-excursion (outline-next-heading)) t)
		
		    (delete-region (match-beginning 0) (match-end 0)))
		  (org-mac-create-flagged-mail)
		  (yank))
		(flush-lines "^$" (point) (outline-next-heading)))
	    (insert "\n")
	    (org-mac-create-flagged-mail)
	    (yank))
	(goto-char (point-max))
	(insert "\n")
	(org-insert-heading)
	(insert (concat org-heading "\n"))
	(org-mac-create-flagged-mail)
	(yank)))))


(provide 'org-mac-flagged-mail)

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



[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 8+ messages in thread

* Re: [ANN] OS X only: Insert links to flagged emails
  2009-03-19 19:07 [ANN] OS X only: Insert links to flagged emails Christopher Suckling
@ 2009-03-20 20:13 ` Carsten Dominik
  2009-03-20 23:22   ` Christopher Suckling
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-03-20 20:13 UTC (permalink / raw)
  To: Christopher Suckling; +Cc: emacs-orgmode Mailinglist

Hi Christopher,

this is nice!  Maybe we could integrate it into org-mac-message.el?

- Carsten

On Mar 19, 2009, at 8:07 PM, Christopher Suckling wrote:

> All,
>
> For various reasons (mainly Spotlight and an excess of HTML mail  
> send by employers), I've migrated back to Mail.app after some time  
> in Mutt (and how I miss the speed and threading).
>
> I habitually flag mails that need attention at a later date, and  
> rather than use both org-mode and Mail.app to keep track of what  
> needs doing, I've written a couple of hybid elisp AppleScript  
> functions to suck links to my flagged email into org-mode.
>
> More details in the attached file.
>
> Comments and improvements welcome.
>
> Best,
>
> Christopher
>
> <org-mac-flagged-mail.el>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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] 8+ messages in thread

* Re: [ANN] OS X only: Insert links to flagged emails
  2009-03-20 20:13 ` Carsten Dominik
@ 2009-03-20 23:22   ` Christopher Suckling
  2009-03-21 12:25     ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Suckling @ 2009-03-20 23:22 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode Mailinglist, Christopher Suckling


On 20 Mar 2009, at 21:13, Carsten Dominik wrote:

> Hi Christopher,
>
> this is nice!  Maybe we could integrate it into org-mac-message.el?
>
> - Carsten

Thanks. I'd be delighted for it to be integrated into org-mac- 
message.el. Would you like me to put a patch together, or would you  
prefer to manage the integration yourself?

Christopher


>
> On Mar 19, 2009, at 8:07 PM, Christopher Suckling wrote:
>
>> All,
>>
>> For various reasons (mainly Spotlight and an excess of HTML mail  
>> send by employers), I've migrated back to Mail.app after some time  
>> in Mutt (and how I miss the speed and threading).
>>
>> I habitually flag mails that need attention at a later date, and  
>> rather than use both org-mode and Mail.app to keep track of what  
>> needs doing, I've written a couple of hybid elisp AppleScript  
>> functions to suck links to my flagged email into org-mode.
>>
>> More details in the attached file.
>>
>> Comments and improvements welcome.
>>
>> Best,
>>
>> Christopher
>>
>> <org-mac-flagged-mail.el>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: 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] 8+ messages in thread

* Re: [ANN] OS X only: Insert links to flagged emails
  2009-03-20 23:22   ` Christopher Suckling
@ 2009-03-21 12:25     ` Carsten Dominik
  2009-03-22 10:36       ` Christopher Suckling
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-03-21 12:25 UTC (permalink / raw)
  To: Christopher Suckling; +Cc: emacs-orgmode Mailinglist


On Mar 21, 2009, at 12:22 AM, Christopher Suckling wrote:

>
> On 20 Mar 2009, at 21:13, Carsten Dominik wrote:
>
>> Hi Christopher,
>>
>> this is nice!  Maybe we could integrate it into org-mac-message.el?
>>
>> - Carsten
>
> Thanks. I'd be delighted for it to be integrated into org-mac- 
> message.el. Would you like me to put a patch together, or would you  
> prefer to manage the integration yourself?

I would be glad if you could provide a patch.

I do remember that you, at some point, filed a copyright assignment,  
but I canot find the mail where you told me that this process was  
completed.  Is it?  We need the assignment for this, because org-mac- 
message.el is in Emacs.

- Carsten

>
> Christopher
>
>
>>
>> On Mar 19, 2009, at 8:07 PM, Christopher Suckling wrote:
>>
>>> All,
>>>
>>> For various reasons (mainly Spotlight and an excess of HTML mail  
>>> send by employers), I've migrated back to Mail.app after some time  
>>> in Mutt (and how I miss the speed and threading).
>>>
>>> I habitually flag mails that need attention at a later date, and  
>>> rather than use both org-mode and Mail.app to keep track of what  
>>> needs doing, I've written a couple of hybid elisp AppleScript  
>>> functions to suck links to my flagged email into org-mode.
>>>
>>> More details in the attached file.
>>>
>>> Comments and improvements welcome.
>>>
>>> Best,
>>>
>>> Christopher
>>>
>>> <org-mac-flagged-mail.el>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: 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] 8+ messages in thread

* Re: [ANN] OS X only: Insert links to flagged emails
  2009-03-21 12:25     ` Carsten Dominik
@ 2009-03-22 10:36       ` Christopher Suckling
  2009-03-22 15:04         ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Suckling @ 2009-03-22 10:36 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode Mailinglist, Christopher Suckling

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


On 21 Mar 2009, at 13:25, Carsten Dominik wrote:

>
> On Mar 21, 2009, at 12:22 AM, Christopher Suckling wrote:
>
>>
>> On 20 Mar 2009, at 21:13, Carsten Dominik wrote:
>>
>>> Hi Christopher,
>>>
>>> this is nice!  Maybe we could integrate it into org-mac-message.el?
>>>
>>> - Carsten
>>
>> Thanks. I'd be delighted for it to be integrated into org-mac- 
>> message.el. Would you like me to put a patch together, or would you  
>> prefer to manage the integration yourself?
>
> I would be glad if you could provide a patch.
>

Attached is the patch.

A thought: at present there are some optional lines (commented out by  
default) that make calls to Growl (http://growl.info) to provide more  
tactile feedback during the sometimes lengthy synchronous search made  
by AppleScript. Growl, however, is under a BSD license. Can these  
lines be included in Emacs?

Christopher


[-- Attachment #2: org-mac-message.patch --]
[-- Type: application/octet-stream, Size: 5180 bytes --]

diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el
index 59b5041..7959ea9 100644
--- a/lisp/org-mac-message.el
+++ b/lisp/org-mac-message.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
-;; Author: John Wiegley <johnw@gnu.org>
+;; Author: John Wiegley <johnw@gnu.org>, Christopher Suckling <suckling at gmail dot com>
 ;; Version: 6.24trans
 ;; Keywords: outlines, hypermedia, calendar, wp
 
@@ -26,10 +26,38 @@
 ;; Org-mode does not load this module by default - if you would actually like
 ;; this to happen then configure the variable `org-modules'.
 
+;; If you would like to create links to all flagged messages in an
+;; Apple Mail account, please customize the variable
+;; org-mac-mail-account and then call one of the following functions:
+
+;; (org-mac-create-flagged-mail) copies a formatted list of links to
+;; the kill ring.
+
+;; (org-mac-insert-flagged-mail) searches within an org-mode buffer
+;; for a specific heading, creating it if it doesn't exist. Any
+;; message:// links within the first level of the heading are deleted
+;; and replaced with links to flagged messages.
+
+;; If you have Growl installed and would like more visual feedback
+;; whilst AppleScript searches for messages, please uncomment lines
+;; 125 to 130.
+
+
+
 ;;; Code:
 
 (require 'org)
 
+(defgroup org-mac-flagged-mail nil
+  "Options concerning linking to flagged Mail.app messages"
+  :tag "Org Mail.app"
+  :group 'org-link)
+
+(defcustom org-mac-mail-account "customize"
+  "The Mail.app account in which to search for flagged messages"
+  :group 'org-mac-flagged-mail
+  :type 'string)
+
 (org-add-link-type "message" 'org-mac-message-open)
 
 ;; In mac.c, removed in Emacs 23.
@@ -77,6 +105,85 @@ end tell")))
 	     (substring message-id 1 (1- (length message-id))))
      (substring subject 1 (1- (length subject))))))
 
+(defun org-mac-create-flagged-mail ()
+  "Create links to flagged messages in a Mail.app account and
+copy them to the kill ring"
+  (interactive)
+  (message "AppleScript: searching mailboxes...")
+  (let* ((as-link-list (do-applescript
+			(concat
+			 "tell application \"Mail\"\n"
+			 "set theMailboxes to every mailbox of account \"" org-mac-mail-account "\"\n"
+			 "set theLinkList to {}\n"
+			 "repeat with aMailbox in theMailboxes\n"
+			 "set theSelection to (every message in aMailbox whose flagged status = true)\n"
+			 "repeat with theMessage in theSelection\n"
+			 "set theID to message id of theMessage\n"
+			 "set theSubject to subject of theMessage\n"
+			 "set theLink to \"message://\" & theID & \"::split::\" & theSubject & \"\n\"\n"
+			 "copy theLink to end of theLinkList\n"
+			 ;; "tell application \"GrowlHelperApp\"\n"
+			 ;; "set the allNotificationsList to {\"FlaggedMail\"}\n"
+			 ;; "set the enabledNotificationsList to allNotificationsList\n"
+			 ;; "register as application \"FlaggedMail\" all notifications allNotificationsList default notifications enabledNotificationsList icon of application \"Mail\"\n"
+			 ;; "notify with name \"FlaggedMail\" title \"Importing flagged message\" description theSubject application name \"FlaggedMail\"\n"
+			 ;; "end tell\n"
+			 "end repeat\n"
+			 "end repeat\n"
+			 "return theLinkList as string\n"
+			 "end tell")))
+	 (link-list (split-string as-link-list "\n"))
+	 split-link
+	 URL
+	 description
+	 orglink
+	 (orglink-list nil))
+    (while link-list
+      (progn
+	(setq split-link (split-string (pop link-list) "::split::"))
+	(setq URL (car split-link))
+	(setq description (cadr split-link))
+	(if (not (string= URL ""))
+	    (progn
+	      (setq orglink (org-make-link-string URL description))
+	      (push orglink orglink-list)))))
+    (with-temp-buffer      
+      (while orglink-list
+	(insert (concat (pop orglink-list)) "\n"))
+      (kill-region (point-min) (point-max))
+      (message "Flagged messages copied to kill ring"))))
+
+(defun org-mac-insert-flagged-mail (org-buffer org-heading)
+  "Asks for an org buffer and a heading within it. If heading
+exists, delete all message:// links within heading's first
+level. If heading doesn't exist, create it at point-max. Insert
+list of message:// links to flagged mail after heading."
+  (interactive "bBuffer in which to insert links: \nsHeading after which to insert links: ")
+  (save-excursion
+    (set-buffer org-buffer)
+    (goto-char (point-min))
+    (let ((isearch-forward t)
+	  (message-re "\\[\\[\\(message:\\)?\\([^]]+\\)\\]\\(\\[\\([^]]+\\)\\]\\)?\\]"))
+      (if (org-goto-local-search-headings org-heading nil t)
+	  (if (not (eobp))
+	      (progn
+		(save-excursion
+		  (while (re-search-forward message-re (save-excursion (outline-next-heading)) t)
+		    
+		    (delete-region (match-beginning 0) (match-end 0)))
+		  (org-mac-create-flagged-mail)
+		  (yank))
+		(flush-lines "^$" (point) (outline-next-heading)))
+	    (insert "\n")
+	    (org-mac-create-flagged-mail)
+	    (yank))
+	(goto-char (point-max))
+	(insert "\n")
+	(org-insert-heading)
+	(insert (concat org-heading "\n"))
+	(org-mac-create-flagged-mail)
+	(yank)))))
+
 (provide 'org-mac-message)
 
 ;; arch-tag: 3806d0c1-abe1-4db6-9c31-f3ed7d4a9b32

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



[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [ANN] OS X only: Insert links to flagged emails
  2009-03-22 10:36       ` Christopher Suckling
@ 2009-03-22 15:04         ` Carsten Dominik
  2009-03-27  9:30           ` Christopher Suckling
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-03-22 15:04 UTC (permalink / raw)
  To: Christopher Suckling; +Cc: emacs-orgmode Mailinglist, Carsten Dominik

Applied, thanks.

Would you like to write a short description/manual of org-mac- 
message.el for

http://orgmode.org/worg/org-contrib/

?

Thanks for your contribution.

- Carsten

On Mar 22, 2009, at 11:36 AM, Christopher Suckling wrote:

>
> On 21 Mar 2009, at 13:25, Carsten Dominik wrote:
>
>>
>> On Mar 21, 2009, at 12:22 AM, Christopher Suckling wrote:
>>
>>>
>>> On 20 Mar 2009, at 21:13, Carsten Dominik wrote:
>>>
>>>> Hi Christopher,
>>>>
>>>> this is nice!  Maybe we could integrate it into org-mac-message.el?
>>>>
>>>> - Carsten
>>>
>>> Thanks. I'd be delighted for it to be integrated into org-mac- 
>>> message.el. Would you like me to put a patch together, or would  
>>> you prefer to manage the integration yourself?
>>
>> I would be glad if you could provide a patch.
>>
>
> Attached is the patch.
>
> A thought: at present there are some optional lines (commented out  
> by default) that make calls to Growl (http://growl.info) to provide  
> more tactile feedback during the sometimes lengthy synchronous  
> search made by AppleScript. Growl, however, is under a BSD license.  
> Can these lines be included in Emacs?
>
> Christopher
>
> <org-mac-message.patch>

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

* Re: [ANN] OS X only: Insert links to flagged emails
  2009-03-22 15:04         ` Carsten Dominik
@ 2009-03-27  9:30           ` Christopher Suckling
  2009-03-27  9:55             ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Suckling @ 2009-03-27  9:30 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode Mailinglist, Christopher Suckling

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


On 22 Mar 2009, at 16:04, Carsten Dominik wrote:

> Applied, thanks.
>
> Would you like to write a short description/manual of org-mac- 
> message.el for
>
> http://orgmode.org/worg/org-contrib/
>
> ?
>

Hopefully I got everything right first time and the manual is making  
it's way to Worg as I write.

Meanwhile, I've rewritten some of the org-mac-message.el code to  
better handle multiple selections in Mail.app. Patch attached.

Christopher


[-- Attachment #2: org-mac-message.patch --]
[-- Type: application/octet-stream, Size: 2556 bytes --]

diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el
index f8c4de2..9abcb58 100644
--- a/lisp/org-mac-message.el
+++ b/lisp/org-mac-message.el
@@ -4,6 +4,7 @@
 
 ;; Author: John Wiegley <johnw@gnu.org>
 ;;         Christopher Suckling <suckling at gmail dot com>
+
 ;; Version: 6.24trans
 ;; Keywords: outlines, hypermedia, calendar, wp
 
@@ -85,24 +86,47 @@ This will use the command `open' with the message URL."
 This will use applescript to get the message-id and the subject of the
 active mail in AppleMail and make a link out of it."
   (interactive)
-  (insert (org-mac-message-get-link)))
+  (org-mac-message-get-link)
+  (yank))
 
 (defun org-mac-message-get-link ()
   "Insert a link to the messages currently selected in Apple Mail.
 This will use applescript to get the message-id and the subject of the
 active mail in AppleMail and make a link out of it."
-  (let ((subject (do-applescript "tell application \"Mail\"
-	set theMessages to selection
-	subject of beginning of theMessages
-end tell"))
-	(message-id (do-applescript "tell application \"Mail\"
-	set theMessages to selection
-	message id of beginning of theMessages
-end tell")))
-    (org-make-link-string
-     (concat "message://"
-	     (substring message-id 1 (1- (length message-id))))
-     (substring subject 1 (1- (length subject))))))
+  (let* ((as-link-list
+	  (do-applescript
+	   (concat
+	    "tell application \"Mail\"\n"
+	    "set theLinkList to {}\n"
+	    "set theSelection to selection\n"
+	    "repeat with theMessage in theSelection\n"
+	    "set theID to message id of theMessage\n"
+	    "set theSubject to subject of theMessage\n"
+	    "set theLink to \"message://\" & theID & \"::split::\" & theSubject & \"\n\"\n"
+	    "copy theLink to end of theLinkList\n"
+	    "end repeat\n"
+	    "return theLinkList as string\n"
+	    "end tell")))
+	 (link-list (split-string as-link-list "\n"))
+	 split-link
+	 URL
+	 description
+	 orglink
+	 orglink-insert
+	 (orglink-list nil))
+    (while link-list
+      (progn
+	(setq split-link (split-string (pop link-list) "::split::"))
+	(setq URL (car split-link))
+	(setq description (cadr split-link))
+	(if (not (string= URL ""))
+	    (progn
+	      (setq orglink (org-make-link-string URL description))
+	      (push orglink orglink-list)))))
+    (with-temp-buffer      
+      (while orglink-list
+	(insert (concat (pop orglink-list)) "\n"))
+      (kill-region (point-min) (point-max)))))
 
 (defun org-mac-create-flagged-mail ()
   "Create links to flagged messages in a Mail.app account and

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



[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [ANN] OS X only: Insert links to flagged emails
  2009-03-27  9:30           ` Christopher Suckling
@ 2009-03-27  9:55             ` Carsten Dominik
  0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-03-27  9:55 UTC (permalink / raw)
  To: Christopher Suckling; +Cc: emacs-orgmode Mailinglist, Carsten Dominik

Applied, thanks.

- Carsten

On Mar 27, 2009, at 10:30 AM, Christopher Suckling wrote:

>
> On 22 Mar 2009, at 16:04, Carsten Dominik wrote:
>
>> Applied, thanks.
>>
>> Would you like to write a short description/manual of org-mac- 
>> message.el for
>>
>> http://orgmode.org/worg/org-contrib/
>>
>> ?
>>
>
> Hopefully I got everything right first time and the manual is making  
> it's way to Worg as I write.
>
> Meanwhile, I've rewritten some of the org-mac-message.el code to  
> better handle multiple selections in Mail.app. Patch attached.
>
> Christopher
>
> <org-mac-message.patch>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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] 8+ messages in thread

end of thread, other threads:[~2009-03-27  9:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-19 19:07 [ANN] OS X only: Insert links to flagged emails Christopher Suckling
2009-03-20 20:13 ` Carsten Dominik
2009-03-20 23:22   ` Christopher Suckling
2009-03-21 12:25     ` Carsten Dominik
2009-03-22 10:36       ` Christopher Suckling
2009-03-22 15:04         ` Carsten Dominik
2009-03-27  9:30           ` Christopher Suckling
2009-03-27  9:55             ` 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).