From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: Thomas Fitzsimmons <fitzsim@fitzsim.org>,
Jean-Christophe Helary
<jean.christophe.helary@traduction-libre.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Proposal] New EUDC backend for macOS address book
Date: Wed, 06 May 2020 17:14:59 +0200 [thread overview]
Message-ID: <8da7df5281e91d8a351f97c0837d79b7@condition-alpha.com> (raw)
In-Reply-To: <m3k11u48c3.fsf@fitzsim.org>
[-- Attachment #1: Type: text/plain, Size: 2702 bytes --]
Hello Thomas, Jean-Christophe,
Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>>> [...]
>>> Do you have a sense for how far back the AppleScript method will work?
>>> [...]
>> The application that is called in the applescript is called "Contacts".
>>
>> Before July 2012, when macos 10.8 was released, it was called "Address Book".
>>
>> So if the script wants to support machines with an OS older that 10.8
>> there will be a need to check the OS version and change the name of
>> the application that is called.
> [...]
> Alexander, I see you report an error if osascript is not present. Can
> you add a separate check via AppleScript for whether "Contacts" (or
> failing that, "Address Book") is running and accessible? Then the user
> would get a clear error if osascript can't access the application for
> whatever reason.
Thomas, thanks for pointing out the subtlety about the app naming which
I had happily ignored ;-). Luckily, Apple provide a
forward-compatibility-catchall in that when I do a `tell application
"Address Book"` on a current macOS, it will "translate" this and connect
to the right app (i.e. Contacts). This is of course to support legacy
scripts (hidden goodness). Therefore, we can simply use `tell
application "Address Book"`, and it will work on all 10.x macOS-es.
> Can you also use the AppleScript line continuation character (U+00AC,
> from what I can tell from some online searches) to wrap the longest line
> to under 80 columns?
I didn't know about U+00AC; cool. Done.
> [...]
> Alexander, given Jean-Christophe's research, and once the above
> AppleScript-related comments are sorted out, I think this is fine to go
> in, code-wise.
Agree. I have added both above suggestions ("Contacts" vs. "Address
Book", and U+00AC) to the attached, updated version. I have also amended
the diagnostic error message to be more specific about the problem
encountered. I have also folded the lengthy error message line to be
below the 80 limit. Not sure whether this would be considered good
practice?
> Would you be able to write a section in the EUDC manual describing the
> backend and how it relates to eudcb-mab.el?
>
> I don't think it hurts to offer both backends, provided they're
> documented and contrasted in the EUDC manual.
Yes, I'll be happy to write up a text for the manual. I agree that it
would be good to offer both backends for a transition period.
> [...]
> diff --git a/lisp/net/eudcb-macos-contacts.el b/lisp/net/eudcb-macos-contacts.el
> [...]
Thanks for these improvements. All applied in the attached, updated
version; except for the last one, which I solved differently.
Many thanks and looking forward to your thoughts,
--alexander
[-- Attachment #2: eudcb-macos-contacts.el --]
[-- Type: application/emacs-lisp, Size: 4092 bytes --]
next prev parent reply other threads:[~2020-05-06 15:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 15:09 [Proposal] New EUDC backend for macOS address book Alexander Adolf
2020-04-27 16:10 ` Thomas Fitzsimmons
2020-04-27 16:41 ` Jean-Christophe Helary
2020-05-02 16:20 ` Thomas Fitzsimmons
2020-05-06 15:14 ` Alexander Adolf [this message]
2020-05-06 17:41 ` Thomas Fitzsimmons
2020-05-07 16:03 ` Alexander Adolf
2020-05-07 18:29 ` Thomas Fitzsimmons
2020-05-08 12:17 ` Alexander Adolf
2020-05-08 13:44 ` Thomas Fitzsimmons
2020-06-08 20:41 ` Alexander Adolf
2020-06-10 5:03 ` Thomas Fitzsimmons
2020-06-29 13:38 ` Alexander Adolf
2020-07-09 15:12 ` Alexander Adolf
2020-07-09 20:29 ` Thomas Fitzsimmons
2020-07-10 13:36 ` Alexander Adolf
2020-07-10 3:53 ` Richard Stallman
2020-07-14 14:46 ` Thomas Fitzsimmons
2020-07-15 3:49 ` Jean-Christophe Helary
2020-07-17 0:56 ` Richard Stallman
2020-08-09 1:57 ` Richard Stallman
2020-09-06 3:00 ` Thomas Fitzsimmons
2020-05-05 14:47 ` Alexander Adolf
2020-04-27 20:00 ` chad
2020-05-05 13:30 ` Alexander Adolf
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8da7df5281e91d8a351f97c0837d79b7@condition-alpha.com \
--to=alexander.adolf@condition-alpha.com \
--cc=emacs-devel@gnu.org \
--cc=fitzsim@fitzsim.org \
--cc=jean.christophe.helary@traduction-libre.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.