.
,(regexp-opt
'("Key translations"
- "Global Bindings"
+ "Global Bindings:"
"Function key map translations"
"pixel-scroll-precision-mode"
"context-menu-mode")))))
(defun esy/clone (remote)
(interactive "sClone: ")
- (vc-clone remote 'Git
- (expand-file-name
- (file-name-base (car (url-path-and-query
- (url-generic-parse-url remote))))
- "~/checkouts"))))
+ (let ((dir (expand-file-name
+ (file-name-base (car (url-path-and-query
+ (url-generic-parse-url remote))))
+ "~/checkouts")))
+ (vc-clone remote 'Git dir)
+ (find-file dir))))
(esy/init-step auto-exec-permissions
"Ensure scripts ran with `executable-interpret' are executable."
sub-directory of `esy/projects-directory' using the selected name
as the initial input for completion, and return that directory."
(let* ((name-dir-alist
- (mapcar (lambda (dir)
- (cons (project-name (project-current nil dir))
- dir))
- (project-known-project-roots)))
+ (delete
+ nil
+ (mapcar (lambda (dir)
+ (when-let ((proj (project-current nil dir)))
+ (cons (project-name proj) dir)))
+ (project-known-project-roots))))
(current (project-current))
(default (and current (project-name current)))
(name (completing-read (format-prompt "Project" default)
"Configure SQL connections."
(with-eval-after-load 'sql
(setq sql-connection-alist (let* ((a (auth-source-search :port 5432
- :max 6
+ :max 7
:require '(:user :port :secret :host)))
(d (nth 0 a))
(p (nth 1 a))
(c (nth 2 a))
(e (nth 3 a))
(f (nth 4 a))
- (i (nth 5 a)))
+ (i (nth 5 a))
+ (g (nth 6 a)))
`((dev
(sql-product 'postgres)
(sql-user ,(plist-get d :user))
(sql-port 5432)
(sql-password ,(funcall (plist-get i :secret)))
(sql-server ,(cadr (split-string (plist-get i :host) (rx "^"))))
- (sql-database ,(car (split-string (plist-get i :host) (rx "^"))))))))
+ (sql-database ,(car (split-string (plist-get i :host) (rx "^")))))
+ (fin
+ (sql-product 'postgres)
+ (sql-user ,(plist-get g :user))
+ (sql-port 5432)
+ (sql-password ,(funcall (plist-get g :secret)))
+ (sql-server ,(cadr (split-string (plist-get g :host) (rx "^"))))
+ (sql-database ,(car (split-string (plist-get g :host) (rx "^"))))))))
(add-hook 'sql-interactive-mode-hook #'toggle-truncate-lines)
(define-key sql-mode-map (kbd "C-c C-f") #'sqlformat)
(define-advice sql-comint-postgres (:around (fun &rest args) use-sql-password)
(add-hook 'kill-emacs-hook #'esy/compile-config 10))
+(esy/init-step dict
+ "Configure dictionary servers."
+ (with-eval-after-load 'dict
+ (setq dict-server-host "dict.org"
+ dict-dictionary "gcide"
+ dict-strategy "prefix")))
+
(esy/init-step elfeed
"Configure news feeds."
(with-eval-after-load 'elfeed