about summary refs log tree commit diff
path: root/configs/shared/.emacs.d/wpc/dotfiles.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-08T15·16+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-17T10·56+0000
commitca8cb3fe218fab23ddb6e3a8262b7aa294e124cb (patch)
tree83888a4b1c6600855fdfa4f127b78992d9c20f46 /configs/shared/.emacs.d/wpc/dotfiles.el
parenta51afca1cc823d76470c0d04dbc7ddb3fa00d04a (diff)
Support utils for finding Emacs dotfiles and Org files
Defined `dotfiles/find-emacs-file` and `org-helpers/find-file`, to clean up some
of the `find-file` calls I have with long path names. This DRYs things up as
well so that the path can be changed without breaking many other things.
Diffstat (limited to 'configs/shared/.emacs.d/wpc/dotfiles.el')
-rw-r--r--configs/shared/.emacs.d/wpc/dotfiles.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/dotfiles.el b/configs/shared/.emacs.d/wpc/dotfiles.el
index f6deb82f16a7..ba15fd4d6b5b 100644
--- a/configs/shared/.emacs.d/wpc/dotfiles.el
+++ b/configs/shared/.emacs.d/wpc/dotfiles.el
@@ -6,7 +6,12 @@
 
 ;;; Code:
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 (require 'macros)
+(require 'f)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; API
@@ -39,6 +44,11 @@
    dotfiles/whitelist
    :action (>> cdr find-file)))
 
+(defun dotfiles/find-emacs-file (name)
+  "Call `find-file' on NAME located in dotfiles's emacs.d directory."
+  (find-file
+   (f-join "~/Dropbox/dotfiles/configs/shared/.emacs.d" name)))
+
 (when dotfiles/install-kbds?
   (evil-leader/set-key "J" #'dotfiles/edit))