all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Danie Roux <lists@danieroux.com>
Cc: John Wiegley <johnw@newartisans.com>, emacs-devel@gnu.org
Subject: Re: Updated eudcb-mab.el
Date: Thu, 19 Feb 2015 21:52:09 -0500	[thread overview]
Message-ID: <m3y4ntnvl2.fsf@fitzsim.org> (raw)
In-Reply-To: <m2twyjvvrz.fsf@danieroux.com> (Danie Roux's message of "Wed, 18 Feb 2015 21:56:16 +0200")

Danie Roux <lists@danieroux.com> writes:

[...]

> Please find attached a new version and a sql file.

Thanks.  A few more comments:

- `eudc-mab-sqlite3-dump-mac-addressbook' should not be interactive: in
  general I'd like to reduce, or at least not grow, the number of
  interactive entry points into EUDC

- there are some blank line additions that don't need to be there

- eventually I think we'll want `eudc-contacts-file' to become a
  defcustom and be renamed/aliased to `eudc-mab-contacts-file', but for
  now your patch does the right thing.  The name change can be part of a
  bigger EUDC settings migration I'm planning

> Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>> Danie Roux <lists@danieroux.com> writes:
>>> I've updated eudcb-mab.el to directly query the contacts database,
>>> instead of using an external application.
>>
>> It looks like you're still relying on an external application, sqlite3,
>> instead of "contacts", right?
>
> Yes, thank you for picking that up. By external I meant "no additional
> software".

OK, I was thinking in terms of "external to Emacs".

It's probably best not to mention OS X in the commentary, just leave it
at:

;;    This library provides an interface to use the Mac's AddressBook,
;;    by querying a database file using the external program `sqlite3'.

People could be migrating from OS X to GNU/Linux and bringing their
contacts database with them.

>> It probably makes sense to change eudcb-mab in the way you're
>> suggesting rather than providing a new backend eudcb-mab-sqlite,
>> right?
>
> Yes.

OK.

>> Is this patch backward compatible with the "contacts" format?  If not,
>> do you have a sense for how common the "contacts" format is these
>> days?  Would it make sense to obsolete the contacts format and support
>> only the sqlite3 format in Emacs 25?
>
> That would be my suggestion. I have no feel for how many people use the
> "contacts" external application. This should be a seamless change
> because it was never possible to set the location or the format to the
> "contacts" application

OK, sounds good.

>>> Please find the changed version attached.
>>
>> Are you able to provide a test database file with example data and a
>> test procedure for using it for completion?  That would be a useful
>> addition.  I haven't been able to test the MAB backend myself because I
>> don't have access to a Mac OS or GNUstep system.
>
> Please find attached an anonymized and stripped contacts.sql file to be
> used:
>
> $ sqlite3 /tmp/test-contacts.db < contacts.sql
>
> And:
>
> (setq eudc-contacts-file "/tmp/test-contacts.db")
> (eudc-set-server "dummy" 'mab t)
>
> In a scratch buffer: (eudc-mab-sqlite3-dump-mac-addressbook)
>
> Searching for "Richard" or "Anton" should be interesting:
>
> (eudc-query-form)

I tested it out.  That's useful, thanks.

Thomas



  reply	other threads:[~2015-02-20  2:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 13:50 Updated eudcb-mab.el Danie Roux
2015-02-17 14:52 ` Thomas Fitzsimmons
2015-02-18 19:56   ` Danie Roux
2015-02-20  2:52     ` Thomas Fitzsimmons [this message]
2015-02-21 15:57       ` Danie Roux
2015-02-22  0:40         ` Thomas Fitzsimmons

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=m3y4ntnvl2.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=emacs-devel@gnu.org \
    --cc=johnw@newartisans.com \
    --cc=lists@danieroux.com \
    /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.