linux - How to use unix login user names in Emacs lisp/config? -
i wondering if possible use current login user name in emacs config files (in elisp)?
for example, times username , default database postgresql database same current login unix/linux user name in many multi-user environment. when configuring emacs sql mode , supplying user , database connect to, following can used in emacs config.
(setq sql-postgres-login-params '((user :default "postgres") (database :default "postgres") (server :default "localhost") (port :default 5432)))
how can replace username
, database
"postgres"
value of $(whoami)
in linux/unix?
that user-login-name. in case don't know, sure no write inside quoted list. can use backquote:
`((user :default ,user-login-name))
Comments
Post a Comment