On 12/11/15 3:56 PM, Tomi Ollila wrote: >> +static const char* >> +_notmuch_database_get_gpg_path (notmuch_database_t *notmuch) >> +{ >> +#define try_gpg_path(z) if (!access(z, X_OK)) return z >> + try_gpg_path("/usr/bin/gpg2"); >> + try_gpg_path("/bin/gpg2"); >> + try_gpg_path("/usr/bin/gpg"); >> + try_gpg_path("/bin/gpg"); >> + return NULL; >> +} > > If this were to survive longer, BSD folks would like to have > /usr/local/bin checked... > (i don't know (yet) about os x I'm not following closely, but seeing paths to programs hard coded in the source never seems like a good idea; invariably someone will have the program in an unanticipated location. I'm using pkgsrc on OS X, and my gpg is at /opt/pkg/bin/gpg. How about a Notmuch configuration file item specifying the location of the program? Or if not that, how about a configuration option at build time to specify the location of gpg that then gets hard coded in the source? Or if not that, how about an environment variable that will specify the location of the program (e.g. like OpenSSH's SSH_ASKPASS environment variable)? Regards, Lewis