branch: externals/pq commit 795260553ad4252f74f90bbcc7b4a00fc2b76166 Author: Mario Rodas <mar...@users.noreply.github.com> Commit: Mario Rodas <mar...@users.noreply.github.com>
Use load-path in test.el To avoid hard coding library path --- test.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test.el b/test.el index cf7e92e6e9..c999567ef2 100644 --- a/test.el +++ b/test.el @@ -1,4 +1,8 @@ -(load-library "~/src/emacs-module-postgres/pq.so") +(add-to-list 'load-path + (file-name-directory (or #$ (expand-file-name (buffer-file-name))))) + +(require 'pq) + (setq con (pq:connectdb "port=5433 dbname=smith")) (pq:query con "select version()") ;; ("PostgreSQL 9.4.8 on i686-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 32-bit")