diff options
-rw-r--r-- | emacs/custom/fcuny-navigation.el | 23 | ||||
-rw-r--r-- | emacs/custom/fcuny-org.el | 53 | ||||
-rw-r--r-- | emacs/custom/fcuny-tramp.el | 5 | ||||
-rw-r--r-- | emacs/init.el | 1 | ||||
-rw-r--r-- | emacs/lisp/fcuny-org-custom.el | 10 |
5 files changed, 74 insertions, 18 deletions
diff --git a/emacs/custom/fcuny-navigation.el b/emacs/custom/fcuny-navigation.el index 49309a5..42027fd 100644 --- a/emacs/custom/fcuny-navigation.el +++ b/emacs/custom/fcuny-navigation.el @@ -70,6 +70,29 @@ (use-package rg :ensure t + :config + (rg-define-search fcuny/grep-git-or-dir + :query ask + :format regexp + :files "everything" + :confirm prefix + :flags ("--hidden -g !.git") + :dir (let ((vc (magit-toplevel))) + (if vc + vc + default-directory))) + (rg-define-search fcuny/grep-git-or-dir-todos + :query "TODO\|FIXME\|XXX" + :format regexp + :files "everything" + :confirm prefix + :flags ("--hidden -g !.git") + :dir (let ((vc (magit-toplevel))) + (if vc + vc + default-directory))) + :bind (("M-s g" . fcuny/grep-git-or-dir) + ("M-s t" . fcuny/grep-git-or-dir-todos)) :custom (rg-group-result t) (rg-show-columns t) diff --git a/emacs/custom/fcuny-org.el b/emacs/custom/fcuny-org.el index dded47a..d993f0b 100644 --- a/emacs/custom/fcuny-org.el +++ b/emacs/custom/fcuny-org.el @@ -20,9 +20,15 @@ (defvar fcuny/org-personal-notes-file (concat fcuny/org-directory "/personal.org")) +(defvar fcuny/org-personal-journal-file + (concat fcuny/org-directory "/journals/personal.org")) + (defvar fcuny/org-work-notes-file (concat fcuny/org-directory "/twitter.org")) +(defvar fcuny/org-work-journal-file + (concat fcuny/org-directory "/journals/twitter.org")) + (use-package htmlize :ensure t) @@ -63,6 +69,15 @@ (org-startup-indented t) + (org-ellipsis "↴") + (org-cycle-separator-lines 0) + (org-startup-folded 'content) + (org-todo-keywords '((type "TODO" "STARTED" "WAITING" "|" "DONE" "CANCELED"))) + (org-todo-keyword-faces + '(("TODO" . (:foreground "red" :weight bold)) + ("STARTED" . (:foreground "red" :weight bold)) + ("WAITING" . (:foreground "blue" :weight bold)))) + ;; priorities (org-priority-start-cycle-with-default nil) ;; Start one over/under default value. (org-highest-priority ?1) @@ -73,7 +88,10 @@ (calendar-week-start-day 1) ;; org-mode uses calendar for the date picker, and I want this to start on Monday (org-agenda-start-on-weekday 1) ;; this is specific to org-agenda (org-agenda-files `(,fcuny/org-personal-notes-file - ,fcuny/org-work-notes-file)) + ,fcuny/org-personal-journal-file + ,fcuny/org-work-notes-file + ,fcuny/org-work-journal-file + ,fcuny/org-references-file)) ;; refile (org-refile-use-cache nil) @@ -122,32 +140,43 @@ (("Personal" :keys "p" :file fcuny/org-personal-notes-file :clock-in t :clock-resume t :children (("Task" :keys "t" :todo-state "TODO" :headline "Tasks" :template ("* %{todo-state} [#3] %^{Description}" - ":PROPERTIES:" ":CREATED: %U" ":END:" + ":PROPERTIES:" ":CREATED: %T" ":END:" "%?")) ("Note" :keys "n" :headline "Notes" :type entry :template ("* %^{Description}" - ":PROPERTIES:" ":CREATED: %U" ":END:" + ":PROPERTIES:" ":CREATED: %T" ":END:" "%?")) ("Reading" :keys "r" :todo-state "TODO" :headline "Reading" :template ("* %{todo-state} %^{Description}" - ":PROPERTIES:" ":CREATED: %U" ":END:" - "%a")) + ":PROPERTIES:" ":CREATED: %T" ":END:" + "%?")) ("Journal" :keys "j" :type entry :datetree t :tree-type week - :template ("* %^{Description}" - ":PROPERTIES:" ":CREATED: %U" ":END:" + :file fcuny/org-personal-journal-file + :template ("* journal" + ":PROPERTIES:" ":CREATED: %T" ":END:" "%?")))) ("Work" :keys "w" :file fcuny/org-work-notes-file :clock-in t :clock-resume t :children (("Tasks" :keys "t" :todo-state "TODO" :headline "Tasks" :template ("* %{todo-state} [#3] %^{Description}" - ":PROPERTIES:" ":CREATED: %U" ":END:" + ":PROPERTIES:" ":CREATED: %T" ":END:" "%?")) ("Note" :keys "n" :headline "Notes" :type entry :template ("* %^{Description}" - ":PROPERTIES:" ":CREATED: %U" ":END:" + ":PROPERTIES:" ":CREATED: %T" ":END:" + "%?")) + ("Reading" :keys "r" :todo-state "TODO" :headline "Reading" + :template ("* %{todo-state} %^{Description}" + ":PROPERTIES:" ":CREATED: %T" ":END:" + "%?")) + ("Journal" :keys "j" :type entry :datetree t :tree-type month + :file fcuny/org-work-journal-file + :template ("* %U journal" + ":PROPERTIES:" ":CREATED: %T" ":END:" "%?")) - ("Meeting" :keys "m" :type entry :datetree t :tree-type week - :template ("* meeting: %^{Description}" - ":PROPERTIES:" ":CREATED: %U" ":END:" + ("Meeting" :keys "m" :type entry :datetree t :tree-type month + :file fcuny/org-work-journal-file + :template ("* %U meeting: %^{Description}" + ":PROPERTIES:" ":CREATED: %T" ":END:" "%?"))))))))) (provide 'fcuny-org) diff --git a/emacs/custom/fcuny-tramp.el b/emacs/custom/fcuny-tramp.el new file mode 100644 index 0000000..52c035a --- /dev/null +++ b/emacs/custom/fcuny-tramp.el @@ -0,0 +1,5 @@ +(use-package tramp + :custom + (tramp-default-method "ssh")) + +(provide 'fcuny-tramp) diff --git a/emacs/init.el b/emacs/init.el index 6a9e142..e103956 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -38,4 +38,5 @@ (require 'fcuny-flycheck) (require 'fcuny-prog) (require 'fcuny-eshell) +(require 'fcuny-tramp) (require 'fcuny-twitter) diff --git a/emacs/lisp/fcuny-org-custom.el b/emacs/lisp/fcuny-org-custom.el index d1b30cd..8992f2d 100644 --- a/emacs/lisp/fcuny-org-custom.el +++ b/emacs/lisp/fcuny-org-custom.el @@ -5,7 +5,7 @@ (calendar-gregorian-from-absolute (org-today)) 'subtree-at-point)) -(defun org-refile-to-datetree (&optional file) +(defun fcuny/org-refile-to-datetree (&optional file) "Refile a subtree to a datetree corresponding to it's timestamp. The current time is used if the entry has no timestamp. If FILE is nil, refile in the current file. A datetree within a subheading @@ -13,13 +13,12 @@ is possible if the heading has a property of DATE_TREE." (interactive "f") (let* ((datetree-date (or (org-entry-get nil "TIMESTAMP" t) (org-read-date t nil "now"))) - (date (org-date-to-gregorian datetree-date)) - ) + (date (org-date-to-gregorian datetree-date))) (save-excursion (with-current-buffer (current-buffer) (org-cut-subtree) (if file (find-file file)) - (widen) + (widen) (org-datetree-find-date-create date) (org-narrow-to-subtree) (show-subtree) @@ -27,7 +26,6 @@ is possible if the heading has a property of DATE_TREE." (newline) (goto-char (point-max)) (org-paste-subtree (+ org-datetree-base-level 3)) - (widen) - )))) + (widen))))) (provide 'fcuny-org-custom) |