[emacs-berlin] A new header arg option for SQL source blocks

Andreas Röhler andreas.roehler at easy-emacs.de
Thu Sep 26 11:58:52 UTC 2019


Hi Stefano,

that was very interesting, thanks a lot. Special thanks also to Gary and 
our host.

Emacs feels like an eternal advent calendar, opening doors all over the 
year ;)


Am 26.09.19 um 10:01 schrieb Stefano Rodighiero:
> Hi all,
>
> thank you for the meeting last evening!
>
> I think my illustration of the patch for Org-mode Babel was a
> bit rushed, and that I didn't make the two parts I presented
> clear enough. Moreover, someone expressed interest in seeing
> the code, so here some explanations.
>
> 1. There will be a new feature in org-mode allowing users to specify
> a `:dbconnection` header arg for SQL source blocks. This way,
> instead of writing connection parameters directly in the header,
> which is tedious, error-prone and exposes credentials as plain-text
> content, one can use `sql-connection-alist`, a data structure users
> can redefine (defined in `sql.el`, practically a dictionary of
> names -> connection params, used for example in `sql-connect`).
> Org-mode maintainers kindly merged my patch 
> (https://code.orgmode.org/bzg/org-mode/src/master/lisp/ob-sql.el#L179) 
> so it will available at some point
> in the future.
>
> 2. "How can I maintain `sql-connection-alist`?"
> There are many options.  In my configuration there's a mechanism
> that keeps `sql-connection-alist` in sync with `~/.pgpass`.
> You can see it starting from here: 
> https://github.com/larsen/emacs-configuration/blob/master/larsen-sql.el#L70
>
> s.
>
>
> -- 
> www.stefanorodighiero.net <http://www.stefanorodighiero.net>
>
> _______________________________________________
> emacs-berlin mailing list
> emacs-berlin at emacs-berlin.org
> https://mailb.org/mailman/listinfo/emacs-berlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailb.org/pipermail/emacs-berlin/attachments/20190926/485df33a/attachment.html>


More information about the emacs-berlin mailing list