emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updated eudcb-mab.el


From: Thomas Fitzsimmons
Subject: Re: Updated eudcb-mab.el
Date: Thu, 19 Feb 2015 21:52:09 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Danie Roux <address@hidden> 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 <address@hidden> writes:
>> Danie Roux <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]