Compare commits

...

2 Commits

3 changed files with 30 additions and 6 deletions

View File

@ -358,6 +358,7 @@
db/scratch
db/find-user-init-file
db/run-or-hide-ansi-term
db/ement-connect
db/hex-to-ascii
db/text-to-hex
turn-on-lispy-when-available

View File

@ -9,7 +9,7 @@
(defgroup personal-settings nil
"A bunch of functions and variables for personalizing emacs."
"A bunch of functions and variables for personalizing Emacs."
:prefix "db/"
:group 'convenience
:group 'help
@ -20,19 +20,31 @@
:group 'personal-settings
:type 'string)
(defcustom db/matrix-user-id ""
"Main Matrix User ID."
:group 'personal-settings
:type 'string)
(defcustom db/matrix-password-store-entry ""
"Password Store entry for Matrix User ID in `db/matrix-user-id'."
:group 'personal-settings
:type 'string)
(defcustom db/important-documents-path "~/Documents/library/"
"Path to look for documents that can be listed in extended
search commands like `db/helm-shortcuts."
"Path to look for important documents.
These documents can then be listed in extended search commands
like `db/helm-shortcuts."
:group 'personal-settings
:type 'string)
(defcustom db/path-to-onenote "c:/Program Files (x86)/Microsoft Office/Office15/ONENOTE.EXE"
"Path to OneNote executable, for opening corresponding org-mode links."
"Path to OneNote executable, for opening corresponding Org mode links."
:group 'personal-settings
:type 'file)
(defcustom db/path-to-outlook "c:/Program Files (x86)/Microsoft Office/Office15/OUTLOOK.EXE"
"Path to Outlook executable, for opening corresponding org-mode links."
"Path to Outlook executable, for opening corresponding Org mode links."
:group 'personal-settings
:type 'file)
@ -53,7 +65,8 @@ are assumed to be of the form *.crt."
:set #'db/update-cert-file-directory)
(defcustom db/rfc-cache-path nil
"Path where RFC documents are automatically downloaded to when opening rfc: links.
"Path where documents are automatically downloaded to when opening rfc: links.
If this path is not set, i.e., is null, no automatic download will happen."
:group 'personal-settings
:type '(choice (const nil) file))

View File

@ -105,6 +105,16 @@ With ARG, switch to `default-directory' of the current buffer first."
(insert (format "cd '%s'" current-dir))
(comint-send-input)))))
(defun db/ement-connect ()
"Connect to my matrix account."
(interactive)
(require 'ement)
(let ((password (password-store-get db/matrix-password-store-entry)))
(unless password
(user-error "No pass entry for Matrix password at “%s”" db/matrix-password-store-entry))
(ement-connect :user-id db/matrix-user-id
:password password)))
;;; General Utilities