Support current-project variable

DRYs up configuration...

This value is used to set:
  - my initial buffer
  - where <leader>-p jumps to
This commit is contained in:
William Carroll 2018-06-15 14:23:41 -04:00
parent 519be4dca1
commit 30cdf1e941
3 changed files with 6 additions and 2 deletions

View file

@ -34,7 +34,7 @@
(set-register ?o '(file . "~/Dropbox/org/")) (set-register ?o '(file . "~/Dropbox/org/"))
(set-register ?c '(file . "~/Dropbox/org/chains.org")) (set-register ?c '(file . "~/Dropbox/org/chains.org"))
(set-register ?b '(file . "~/Dropbox/org/backlog.org")) (set-register ?b '(file . "~/Dropbox/org/backlog.org"))
(set-register ?p '(file . "~/urbint/grid-client")) (set-register ?p `(file . ,wpc/current-project))
;; persist history etc b/w Emacs sessions ;; persist history etc b/w Emacs sessions
(setq desktop-save 'if-exists) (setq desktop-save 'if-exists)

View file

@ -54,7 +54,7 @@
;;(add-hook 'after-init-hook (lambda () (set-face-foreground 'linum "#da5468"))) ;;(add-hook 'after-init-hook (lambda () (set-face-foreground 'linum "#da5468")))
;; set default buffer for Emacs ;; set default buffer for Emacs
(setq initial-buffer-choice "~/urbint/grid-client") (setq initial-buffer-choice wpc/current-project)
;; transparent Emacs ;; transparent Emacs
(set-frame-parameter (selected-frame) 'alpha '(100 . 100)) (set-frame-parameter (selected-frame) 'alpha '(100 . 100))

View file

@ -6,6 +6,10 @@
;;; Code: ;;; Code:
(defconst wpc/current-project
"~/urbint/grid/"
"Variable holding the directory for my currently active project.")
(defvar wpc/mouse-kbds (defvar wpc/mouse-kbds
'([mouse-1] [down-mouse-1] [drag-mouse-1] [double-mouse-1] [triple-mouse-1] '([mouse-1] [down-mouse-1] [drag-mouse-1] [double-mouse-1] [triple-mouse-1]
[mouse-2] [down-mouse-2] [drag-mouse-2] [double-mouse-2] [triple-mouse-2] [mouse-2] [down-mouse-2] [drag-mouse-2] [double-mouse-2] [triple-mouse-2]