emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mike McLean <mike.mclean@pobox.com>
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Fwd: Patch - Org Mac Outlook - Fix Call to Outlook in some cases
Date: Mon, 14 Dec 2015 11:22:35 -0500	[thread overview]
Message-ID: <CANid5Q6e-WxL3tS=h7drrOGaViEufbG0S4vYoYbzCFRBjrC4Zg@mail.gmail.com> (raw)
In-Reply-To: <m2k2vc5bq6.fsf@polytechnique.org>


[-- Attachment #1.1: Type: text/plain, Size: 817 bytes --]

Earlier in this thread, Rasmus suggested “Perhaps it should be a defcustom?”

With a new version (2016) of Microsoft Outlook for Mac that does not
install inside of a "Microsoft Office 2011" directory, this indeed should
be a defcustom.

This patch accomplishes that change. (It also changes the default to
/Applications/Microsoft Outlook.app which is the filesystem path of Outlook
2016.


On Wed, Jun 10, 2015 at 2:17 AM, Alan Schmitt <
alan.schmitt@polytechnique.org> wrote:

> On 2015-06-09 22:20, Mike McLean <mike.mclean@pobox.com> writes:
>
> > Here is a version of the patch with a (hopefully) correct Changelog
> format
>
> Applied and pushed, thanks!
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm
>

[-- Attachment #1.2: Type: text/html, Size: 1479 bytes --]

[-- Attachment #2: 0001-org-mac-link.el-Make-path-to-Microsoft-Outlook-custo.patch --]
[-- Type: application/octet-stream, Size: 2483 bytes --]

From a5e8c7f4463de7c3d25ca2569cba40e60604b0c7 Mon Sep 17 00:00:00 2001
From: Mike McLean <mike.mclean@pobox.com>
Date: Mon, 14 Dec 2015 11:09:03 -0500
Subject: [PATCH] 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
---
 contrib/lisp/org-mac-link.el | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index 01556f7..25f47e1 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. Do not escape spaces as this string will quoted in the AppleScript call."
+  :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"
-- 
2.6.4


  reply	other threads:[~2015-12-14 16:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-20 20:34 Patch - Org Mac Outlook - Fix Call to Outlook in some cases Mike McLean
2015-04-09 13:59 ` Fwd: " Mike McLean
2015-04-09 14:17   ` Rasmus
2015-04-09 17:11   ` Fwd: " Alan Schmitt
2015-04-09 21:27     ` Mike McLean
2015-06-09 20:20       ` Mike McLean
2015-06-10  6:17         ` Alan Schmitt
2015-12-14 16:22           ` Mike McLean [this message]
2015-12-15 10:00             ` Alan Schmitt
2015-04-09 17:14   ` Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANid5Q6e-WxL3tS=h7drrOGaViEufbG0S4vYoYbzCFRBjrC4Zg@mail.gmail.com' \
    --to=mike.mclean@pobox.com \
    --cc=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).