* Problem with org-mac-message.el @ 2009-04-01 20:21 Ed Hirgelt 2009-04-03 14:49 ` Christopher Suckling 0 siblings, 1 reply; 9+ messages in thread From: Ed Hirgelt @ 2009-04-01 20:21 UTC (permalink / raw) To: emacs-orgmode emacs-orgmode I've found that org-mac-message-get-link has a problem inserting [["]] as the first item. The following change makes it better... diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el index 4e10062..e8697c4 100644 --- a/lisp/org-mac-message.el +++ b/lisp/org-mac-message.el @@ -119,7 +119,7 @@ active mail in AppleMail and make a link out of it." (setq split-link (split-string (pop link-list) "::split::")) (setq URL (car split-link)) (setq description (cadr split-link)) - (if (not (string= URL "")) + (if (not (string= URL "\"")) (progn (setq orglink (org-make-link-string URL description)) (push orglink orglink-list))))) Thanks, Ed ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-01 20:21 Problem with org-mac-message.el Ed Hirgelt @ 2009-04-03 14:49 ` Christopher Suckling 2009-04-03 16:58 ` Carsten Dominik 0 siblings, 1 reply; 9+ messages in thread From: Christopher Suckling @ 2009-04-03 14:49 UTC (permalink / raw) To: Ed Hirgelt; +Cc: emacs-orgmode emacs-orgmode On 1 Apr 2009, at 21:21, Ed Hirgelt wrote: > I've found that org-mac-message-get-link has a problem inserting > [["]] as the first item. I can't replicate this. Could you provide an example? > The following change makes it better... Unfortunately, this change breaks the code for all other possibilities, and, if I understand the problem correctly, simply omits a link that begins [[" My beginner's elisp is rather clumsy; I'm going to attempt to tidy up the code anyway, so I'll be on the lookout for your difficulty whilst I do so. Best, Christopher > > diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el > index 4e10062..e8697c4 100644 > --- a/lisp/org-mac-message.el > +++ b/lisp/org-mac-message.el > @@ -119,7 +119,7 @@ active mail in AppleMail and make a link out of > it." > (setq split-link (split-string (pop link-list) "::split::")) > (setq URL (car split-link)) > (setq description (cadr split-link)) > - (if (not (string= URL "")) > + (if (not (string= URL "\"")) > (progn > (setq orglink (org-make-link-string URL description)) > (push orglink orglink-list))))) > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-03 14:49 ` Christopher Suckling @ 2009-04-03 16:58 ` Carsten Dominik 2009-04-04 7:18 ` Christopher Suckling 0 siblings, 1 reply; 9+ messages in thread From: Carsten Dominik @ 2009-04-03 16:58 UTC (permalink / raw) To: Christopher Suckling; +Cc: emacs-orgmode emacs-orgmode On Apr 3, 2009, at 4:49 PM, Christopher Suckling wrote: > > On 1 Apr 2009, at 21:21, Ed Hirgelt wrote: > >> I've found that org-mac-message-get-link has a problem inserting >> [["]] as the first item. > > I can't replicate this. Could you provide an example? > >> The following change makes it better... > > Unfortunately, this change breaks the code for all other > possibilities, and, if I understand the problem correctly, simply > omits a link that begins [[" > > My beginner's elisp is rather clumsy; I'm going to attempt to tidy > up the code anyway, so I'll be on the lookout for your difficulty > whilst I do so. I think I already fixed it..... - Carsten > > Best, > > Christopher > >> >> diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el >> index 4e10062..e8697c4 100644 >> --- a/lisp/org-mac-message.el >> +++ b/lisp/org-mac-message.el >> @@ -119,7 +119,7 @@ active mail in AppleMail and make a link out of >> it." >> (setq split-link (split-string (pop link-list) "::split::")) >> (setq URL (car split-link)) >> (setq description (cadr split-link)) >> - (if (not (string= URL "")) >> + (if (not (string= URL "\"")) >> (progn >> (setq orglink (org-make-link-string URL description)) >> (push orglink orglink-list))))) >> > > > > _______________________________________________ > 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] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-03 16:58 ` Carsten Dominik @ 2009-04-04 7:18 ` Christopher Suckling 2009-04-04 8:25 ` Carsten Dominik 0 siblings, 1 reply; 9+ messages in thread From: Christopher Suckling @ 2009-04-04 7:18 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode emacs-orgmode, Christopher Suckling [-- Attachment #1: Type: text/plain, Size: 1403 bytes --] On 3 Apr 2009, at 17:58, Carsten Dominik wrote: > > On Apr 3, 2009, at 4:49 PM, Christopher Suckling wrote: > >> >> On 1 Apr 2009, at 21:21, Ed Hirgelt wrote: >> >>> I've found that org-mac-message-get-link has a problem inserting >>> [["]] as the first item. >> >> I can't replicate this. Could you provide an example? >> >>> The following change makes it better... >> >> Unfortunately, this change breaks the code for all other >> possibilities, and, if I understand the problem correctly, simply >> omits a link that begins [[" >> >> My beginner's elisp is rather clumsy; I'm going to attempt to tidy >> up the code anyway, so I'll be on the lookout for your difficulty >> whilst I do so. > > I think I already fixed it..... > Thanks! I've never used mapcar before... I've made things more modular so that your changes are reflected in searches for both selected and flagged mail. In doing so, I may have been rather naughty - I've changed the function names so that they are consistent: (org-mac-message-insert-link) becomes (org-mac-message-insert-selected) (org-mac-create-flagged-mail) becomes (org-mac-message-insert-flagged) both of which call the function (org-mac-message-get-links) to do their stuff. If this is not on, then I'll resubmit the patch with the original function names. Otherwise, new documentation is primed for pushing to Worg. Best, Christopher [-- Attachment #2: org-mac-message.patch --] [-- Type: application/octet-stream, Size: 6583 bytes --] diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el index 87cdea5..720b7e5 100644 --- a/lisp/org-mac-message.el +++ b/lisp/org-mac-message.el @@ -42,7 +42,7 @@ ;; If you have Growl installed and would like more visual feedback ;; whilst AppleScript searches for messages, please uncomment lines -;; 125 to 130. +;; 114 to 119. ;;; Code: @@ -81,64 +81,25 @@ This will use the command `open' with the message URL." (start-process (concat "open message:" message-id) nil "open" (concat "message://<" (substring message-id 2) ">"))) -(defun org-mac-message-insert-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." - (interactive) - (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* ((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 - (mapcar - (lambda (x) (if (string-match "\\`\"\\(.*\\)\"\\'" x) (setq x (match-string 1 x))) x) - (split-string as-link-list "[\r\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)) - (current-kill 0)))) - -(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 +(defun as-get-selected-mail () + "AppleScript to create links to selected messages in Mail.app" + (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"))) + +(defun as-get-flagged-mail () + "AppleScript to create links to flagged messages in Mail.app" + (do-applescript (concat "tell application \"Mail\"\n" "set theMailboxes to every mailbox of account \"" org-mac-mail-account "\"\n" @@ -160,28 +121,53 @@ copy them to the kill ring" "end repeat\n" "return theLinkList as string\n" "end tell"))) - (link-list (split-string as-link-list "\n")) + +(defun org-mac-message-get-links (select-or-flag) + "Create links to the messages currently selected or flagged in +Mail.app. This will use AppleScript to get the message-id and +the subject of the message in Mail.app and make a link out +of it." + (interactive "sLink to (s)elected or (f)lagged messages: ") + (message "AppleScript: searching mailboxes...") + (let* ((as-link-list + (if (string= select-or-flag "s") + (as-get-selected-mail) + (if (string= select-or-flag "f") + (as-get-flagged-mail) + (error "Please select \"s\" or \"f\"")))) + (link-list + (mapcar + (lambda (x) (if (string-match "\\`\"\\(.*\\)\"\\'" x) (setq x (match-string 1 x))) x) + (split-string as-link-list "[\r\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))))) + (setq split-link (split-string (pop link-list) "::split::")) + (setq URL (car split-link)) + (setq description (cadr split-link)) + (when (not (string= URL "")) + (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")))) + (current-kill 0))) + (message "Messages copied to kill-ring")) + +(defun org-mac-message-insert-selected () + "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." + (interactive) + (org-mac-message-get-links "s") + (yank)) -(defun org-mac-insert-flagged-mail (org-buffer org-heading) +(defun org-mac-message-insert-flagged (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 @@ -199,17 +185,17 @@ list of message:// links to flagged mail after heading." (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) + (org-mac-message-get-links "f") (yank)) (flush-lines "^$" (point) (outline-next-heading))) (insert "\n") - (org-mac-create-flagged-mail) + (org-mac-message-get-links "f") (yank)) (goto-char (point-max)) (insert "\n") (org-insert-heading) (insert (concat org-heading "\n")) - (org-mac-create-flagged-mail) + (org-mac-message-get-links "f") (yank))))) (provide 'org-mac-message) [-- 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] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-04 7:18 ` Christopher Suckling @ 2009-04-04 8:25 ` Carsten Dominik 2009-04-04 8:52 ` Christopher Suckling 0 siblings, 1 reply; 9+ messages in thread From: Carsten Dominik @ 2009-04-04 8:25 UTC (permalink / raw) To: Christopher Suckling; +Cc: emacs-orgmode emacs-orgmode Hi Christopher, the patch and the abstraction looks good. However, I am sure that there are quite a few people who have remember templates which call %(org-mac-message-insert-link) Let's not break their setup. Could you modify your patch so that this function still works? Thanks. - Carsten On Apr 4, 2009, at 9:18 AM, Christopher Suckling wrote: > > On 3 Apr 2009, at 17:58, Carsten Dominik wrote: > >> >> On Apr 3, 2009, at 4:49 PM, Christopher Suckling wrote: >> >>> >>> On 1 Apr 2009, at 21:21, Ed Hirgelt wrote: >>> >>>> I've found that org-mac-message-get-link has a problem inserting >>>> [["]] as the first item. >>> >>> I can't replicate this. Could you provide an example? >>> >>>> The following change makes it better... >>> >>> Unfortunately, this change breaks the code for all other >>> possibilities, and, if I understand the problem correctly, simply >>> omits a link that begins [[" >>> >>> My beginner's elisp is rather clumsy; I'm going to attempt to tidy >>> up the code anyway, so I'll be on the lookout for your difficulty >>> whilst I do so. >> >> I think I already fixed it..... >> > > Thanks! I've never used mapcar before... > > I've made things more modular so that your changes are reflected in > searches for both selected and flagged mail. > > In doing so, I may have been rather naughty - I've changed the > function names so that they are consistent: > > (org-mac-message-insert-link) becomes (org-mac-message-insert- > selected) > (org-mac-create-flagged-mail) becomes (org-mac-message-insert-flagged) > > both of which call the function (org-mac-message-get-links) to do > their stuff. > > If this is not on, then I'll resubmit the patch with the original > function names. > Otherwise, new documentation is primed for pushing to Worg. > > Best, > > Christopher > > > <org-mac-message.patch> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-04 8:25 ` Carsten Dominik @ 2009-04-04 8:52 ` Christopher Suckling 2009-04-04 10:33 ` Carsten Dominik 0 siblings, 1 reply; 9+ messages in thread From: Christopher Suckling @ 2009-04-04 8:52 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode emacs-orgmode, Christopher Suckling [-- Attachment #1: Type: text/plain, Size: 354 bytes --] On 4 Apr 2009, at 09:25, Carsten Dominik wrote: > > the patch and the abstraction looks good. However, I am sure that > there are quite a few people who have remember templates which call > > %(org-mac-message-insert-link) > > Let's not break their setup. Could you modify your patch so that this > function still works? > Here you go. Christopher [-- Attachment #2: org-mac-message.patch --] [-- Type: application/octet-stream, Size: 6579 bytes --] diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el index 87cdea5..0d1dc29 100644 --- a/lisp/org-mac-message.el +++ b/lisp/org-mac-message.el @@ -42,7 +42,7 @@ ;; If you have Growl installed and would like more visual feedback ;; whilst AppleScript searches for messages, please uncomment lines -;; 125 to 130. +;; 114 to 119. ;;; Code: @@ -81,64 +81,25 @@ This will use the command `open' with the message URL." (start-process (concat "open message:" message-id) nil "open" (concat "message://<" (substring message-id 2) ">"))) -(defun org-mac-message-insert-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." - (interactive) - (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* ((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 - (mapcar - (lambda (x) (if (string-match "\\`\"\\(.*\\)\"\\'" x) (setq x (match-string 1 x))) x) - (split-string as-link-list "[\r\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)) - (current-kill 0)))) - -(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 +(defun as-get-selected-mail () + "AppleScript to create links to selected messages in Mail.app" + (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"))) + +(defun as-get-flagged-mail () + "AppleScript to create links to flagged messages in Mail.app" + (do-applescript (concat "tell application \"Mail\"\n" "set theMailboxes to every mailbox of account \"" org-mac-mail-account "\"\n" @@ -160,28 +121,53 @@ copy them to the kill ring" "end repeat\n" "return theLinkList as string\n" "end tell"))) - (link-list (split-string as-link-list "\n")) + +(defun org-mac-message-get-links (select-or-flag) + "Create links to the messages currently selected or flagged in +Mail.app. This will use AppleScript to get the message-id and +the subject of the message in Mail.app and make a link out +of it." + (interactive "sLink to (s)elected or (f)lagged messages: ") + (message "AppleScript: searching mailboxes...") + (let* ((as-link-list + (if (string= select-or-flag "s") + (as-get-selected-mail) + (if (string= select-or-flag "f") + (as-get-flagged-mail) + (error "Please select \"s\" or \"f\"")))) + (link-list + (mapcar + (lambda (x) (if (string-match "\\`\"\\(.*\\)\"\\'" x) (setq x (match-string 1 x))) x) + (split-string as-link-list "[\r\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))))) + (setq split-link (split-string (pop link-list) "::split::")) + (setq URL (car split-link)) + (setq description (cadr split-link)) + (when (not (string= URL "")) + (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")))) + (current-kill 0))) + (message "Messages copied to kill-ring")) + +(defun org-mac-message-insert-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." + (interactive) + (org-mac-message-get-links "s") + (yank)) -(defun org-mac-insert-flagged-mail (org-buffer org-heading) +(defun org-mac-message-insert-flagged (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 @@ -199,17 +185,17 @@ list of message:// links to flagged mail after heading." (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) + (org-mac-message-get-links "f") (yank)) (flush-lines "^$" (point) (outline-next-heading))) (insert "\n") - (org-mac-create-flagged-mail) + (org-mac-message-get-links "f") (yank)) (goto-char (point-max)) (insert "\n") (org-insert-heading) (insert (concat org-heading "\n")) - (org-mac-create-flagged-mail) + (org-mac-message-get-links "f") (yank))))) (provide 'org-mac-message) [-- 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] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-04 8:52 ` Christopher Suckling @ 2009-04-04 10:33 ` Carsten Dominik 2009-04-05 21:43 ` Christopher Suckling 0 siblings, 1 reply; 9+ messages in thread From: Carsten Dominik @ 2009-04-04 10:33 UTC (permalink / raw) To: Christopher Suckling; +Cc: emacs-orgmode emacs-orgmode Hi Christopher, I have applied the patch, thanks. Also I made the following modification: The new function is defined as org-mac-message-insert-selected, and then the old name org-mac-message-insert-link is introduced as an alias. So you get your consisten function naming, and compatibility as well. I believe the file commentary may not be fully correct anymore, it still mentions the old function names. I have already pushed the new version, if you fix the commentary, please diff against that new version. Thanks. - Carsten On Apr 4, 2009, at 10:52 AM, Christopher Suckling wrote: > On 4 Apr 2009, at 09:25, Carsten Dominik wrote: > >> >> the patch and the abstraction looks good. However, I am sure that >> there are quite a few people who have remember templates which call >> >> %(org-mac-message-insert-link) >> >> Let's not break their setup. Could you modify your patch so that >> this >> function still works? >> > > Here you go. > > Christopher > > <org-mac-message.patch> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-04 10:33 ` Carsten Dominik @ 2009-04-05 21:43 ` Christopher Suckling 2009-04-06 4:44 ` Carsten Dominik 0 siblings, 1 reply; 9+ messages in thread From: Christopher Suckling @ 2009-04-05 21:43 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode emacs-orgmode, Christopher Suckling [-- Attachment #1: Type: text/plain, Size: 691 bytes --] On 4 Apr 2009, at 11:33, Carsten Dominik wrote: > Hi Christopher, > > I have applied the patch, thanks. > > Also I made the following modification: > > The new function is defined as org-mac-message-insert-selected, > and then the old name org-mac-message-insert-link is introduced > as an alias. So you get your consisten function naming, and > compatibility as well. > > I believe the file commentary may not be fully correct anymore, > it still mentions the old function names. I have already pushed the > new version, if you fix the commentary, please diff against that new > version. Thanks, Carsten. Here's the fixed commentary. Changes to Worg have been pushed. Christopher [-- Attachment #2: org-mac-message.patch --] [-- Type: application/octet-stream, Size: 2063 bytes --] diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el index fb71ebd..3ea55d8 100644 --- a/lisp/org-mac-message.el +++ b/lisp/org-mac-message.el @@ -1,4 +1,4 @@ -;;; org-mac-message.el --- Links to Apple Mail messages from within Org-mode +;;; org-mac-message.el --- Links to Apple Mail.app messages from within Org-mode ;; Copyright (C) 2008, 2009 Free Software Foundation, Inc. @@ -24,18 +24,18 @@ ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: -;; This file implements links to Apple Mail messages from within Org-mode. +;; This file implements links to Apple Mail.app messages from within Org-mode. ;; 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 +;; Mail.app 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-message-insert-selected) inserts at point links to any +;; messages selected in Mail.app. -;; (org-mac-insert-flagged-mail) searches within an org-mode buffer +;; (org-mac-message-insert-flagged) 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. @@ -160,9 +160,9 @@ of it." (message "Messages copied to kill-ring")) (defun org-mac-message-insert-selected () - "Insert a link to the messages currently selected in Apple Mail. + "Insert a link to the messages currently selected in Mail.app. 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." +active mail in Mail.app and make a link out of it." (interactive) (org-mac-message-get-links "s") (yank)) [-- 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] 9+ messages in thread
* Re: Problem with org-mac-message.el 2009-04-05 21:43 ` Christopher Suckling @ 2009-04-06 4:44 ` Carsten Dominik 0 siblings, 0 replies; 9+ messages in thread From: Carsten Dominik @ 2009-04-06 4:44 UTC (permalink / raw) To: Christopher Suckling; +Cc: emacs-orgmode emacs-orgmode Applied, thanks. - Carsten On Apr 5, 2009, at 11:43 PM, Christopher Suckling wrote: > > On 4 Apr 2009, at 11:33, Carsten Dominik wrote: > >> Hi Christopher, >> >> I have applied the patch, thanks. >> >> Also I made the following modification: >> >> The new function is defined as org-mac-message-insert-selected, >> and then the old name org-mac-message-insert-link is introduced >> as an alias. So you get your consisten function naming, and >> compatibility as well. >> >> I believe the file commentary may not be fully correct anymore, >> it still mentions the old function names. I have already pushed the >> new version, if you fix the commentary, please diff against that >> new version. > > Thanks, Carsten. > > Here's the fixed commentary. Changes to Worg have been pushed. > > Christopher > > <org-mac-message.patch> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-04-06 6:02 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-04-01 20:21 Problem with org-mac-message.el Ed Hirgelt 2009-04-03 14:49 ` Christopher Suckling 2009-04-03 16:58 ` Carsten Dominik 2009-04-04 7:18 ` Christopher Suckling 2009-04-04 8:25 ` Carsten Dominik 2009-04-04 8:52 ` Christopher Suckling 2009-04-04 10:33 ` Carsten Dominik 2009-04-05 21:43 ` Christopher Suckling 2009-04-06 4:44 ` 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).