From: Andreas Gerler Date: Tue, 13 Sep 2022 07:43:51 +0000 (+0200) Subject: make my-sql-connect optional X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=0c3df01f80e052f1ac007da876b0a6b2af2e1a55;p=emacsconfig.git make my-sql-connect optional Signed-off-by: Andreas Gerler --- diff --git a/bba.org b/bba.org index 51012784..3888f43c 100644 --- a/bba.org +++ b/bba.org @@ -3331,6 +3331,7 @@ have a look in [[file:/Applications/Emacs.app/Contents/Resources/lisp/progmodes/ starting sql-connect. #+BEGIN_SRC emacs-lisp + (if (file-exists-p "~/.emacs_secrets.el.gpg") (defun my-sql-connect () (interactive) (require 'my-password "~/.emacs_secrets.el.gpg") @@ -3342,7 +3343,7 @@ starting sql-connect. (if current-prefix-arg (sql-connect connection connection) (sql-connect connection)))) - (global-set-key (kbd "s-s") 'my-sql-connect) + (global-set-key (kbd "s-s") 'my-sql-connect)) #+END_SRC your =~/.emacs_secrets.el.gpg= might look like: