summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike McLean <mike.mclean@pobox.com>2015-12-14 11:09:03 -0500
committerAlan Schmitt <alan.schmitt@polytechnique.org>2015-12-18 11:15:36 +0100
commitaee0498f3fbfe219f25a8b420f536ca67f1c8dd8 (patch)
tree5606afd8d0585fcfd600a645b18b875f411e0cad
parent077fe86ad7575ca04ede12909be81786002b6c43 (diff)
downloadorg-mode-aee0498f3fbfe219f25a8b420f536ca67f1c8dd8.tar.gz
org-mac-link.el: Make path to Microsoft Outlook customizable
* org-mac-link.el (org-mac-outlook-path): New Custom String to hold the file system path to Microsoft Outlook (org-mac-outlook-message-open, org-as-get-selected-outlook-mail): Use the new custom string instead of hard-coding the path to Outlook Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
-rw-r--r--contrib/lisp/org-mac-link.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index 01556f7..e04fb80 100644
--- a/contrib/lisp/org-mac-link.el
+++ b/contrib/lisp/org-mac-link.el
@@ -21,7 +21,11 @@
;; Version: 1.3
;; Author: Alan Schmitt <alan.schmitt@polytechnique.org>
;; Consistently use `org-mac-paste-applescript-links'
-;;
+;;
+;; Version 1.4
+;; Author: Mike McLean <mike.mclean@pobox.com>
+;; Make the path to Microsoft Outlook a `defcustom'
+;;
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
@@ -113,6 +117,12 @@
:group 'org-mac-link
:type 'boolean)
+(defcustom org-mac-outlook-path "/Applications/Microsoft Outlook.app"
+ "The path to the installed copy of Microsoft Outlook.app. Do not escape spaces as the AppleScript call will quote this string."
+ :tag "Path to Microsoft Outlook"
+ :group 'org-mac-link
+ :type 'string)
+
(defcustom org-mac-grab-devonthink-app-p t
"Add menu option [d]EVONthink to grab links from DEVONthink Pro Office.app."
:tag "Grab DEVONthink Pro Office.app links"
@@ -610,7 +620,7 @@ The links are of the form <link>::split::<name>."
"Open a message in Outlook"
(do-applescript
(concat
- "tell application \"/Applications/Microsoft Office 2011/Microsoft Outlook.app\"\n"
+ "tell application \"" org-mac-outlook-path "\"\n"
(format "open message id %s\n" (substring-no-properties msgid))
"activate\n"
"end tell")))
@@ -619,7 +629,7 @@ The links are of the form <link>::split::<name>."
"AppleScript to create links to selected messages in Microsoft Outlook.app."
(do-applescript
(concat
- "tell application \"/Applications/Microsoft Office 2011/Microsoft Outlook.app\"\n"
+ "tell application \"" org-mac-outlook-path "\"\n"
"set msgCount to count current messages\n"
"if (msgCount < 1) then\n"
"return\n"