From 9b2a4837bb9f6b033c8b9ef8e0b1b92ead31eda7 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 12 Feb 2021 09:38:24 -0800 Subject: emacs: initial configuration for tramp --- emacs/custom/fcuny-tramp.el | 5 +++++ emacs/init.el | 1 + 2 files changed, 6 insertions(+) create mode 100644 emacs/custom/fcuny-tramp.el 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) -- cgit 1.4.1 From 29fa4498bc47a49050cac9fec53b6ca275f7ca2b Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 12 Feb 2021 09:38:51 -0800 Subject: emacs: slight changes to theme settings --- emacs/custom/fcuny-ui.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/emacs/custom/fcuny-ui.el b/emacs/custom/fcuny-ui.el index 5daef2e..3fae95a 100644 --- a/emacs/custom/fcuny-ui.el +++ b/emacs/custom/fcuny-ui.el @@ -34,13 +34,8 @@ (modus-themes-completions nil) (modus-themes-region 'bg-only-no-extend) (modus-themes-diffs 'bg-only) - (modus-themes-variable-pitch-headings t) - (modus-themes-scale-headings t) - (modus-themes-scale-1 1.1) - (modus-themes-scale-2 1.15) - (modus-themes-scale-3 1.21) - (modus-themes-scale-4 1.27) - (modus-themes-scale-5 1.33)) + (modus-themes-variable-pitch-headings nil) + (modus-themes-scale-headings nil)) (use-package diminish :ensure t) -- cgit 1.4.1 From 17bb229122768fa1fc601aaabca26909173f859e Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 12 Feb 2021 09:39:05 -0800 Subject: emacs: new defined search for rg --- emacs/custom/fcuny-navigation.el | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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) -- cgit 1.4.1 From 38f3546fbaa764bce165c0e5c9f94793174ae648 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 12 Feb 2021 11:36:26 -0800 Subject: org: fix some of the capture templates --- emacs/custom/fcuny-org.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emacs/custom/fcuny-org.el b/emacs/custom/fcuny-org.el index dded47a..95a77b5 100644 --- a/emacs/custom/fcuny-org.el +++ b/emacs/custom/fcuny-org.el @@ -63,6 +63,8 @@ (org-startup-indented t) + (org-todo-keywords '((type "TODO" "STARTED" "WAITING" "|" "DONE" "CANCELED"))) + ;; priorities (org-priority-start-cycle-with-default nil) ;; Start one over/under default value. (org-highest-priority ?1) @@ -131,7 +133,7 @@ ("Reading" :keys "r" :todo-state "TODO" :headline "Reading" :template ("* %{todo-state} %^{Description}" ":PROPERTIES:" ":CREATED: %U" ":END:" - "%a")) + "%?")) ("Journal" :keys "j" :type entry :datetree t :tree-type week :template ("* %^{Description}" ":PROPERTIES:" ":CREATED: %U" ":END:" @@ -145,6 +147,10 @@ :template ("* %^{Description}" ":PROPERTIES:" ":CREATED: %U" ":END:" "%?")) + ("Reading" :keys "r" :todo-state "TODO" :headline "Reading" + :template ("* %{todo-state} %^{Description}" + ":PROPERTIES:" ":CREATED: %U" ":END:" + "%?")) ("Meeting" :keys "m" :type entry :datetree t :tree-type week :template ("* meeting: %^{Description}" ":PROPERTIES:" ":CREATED: %U" ":END:" -- cgit 1.4.1 From 6d4098efed84da2a27fb1cb838634341b3de054d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 12 Feb 2021 14:52:39 -0800 Subject: org: more updates for captures --- emacs/custom/fcuny-org.el | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/emacs/custom/fcuny-org.el b/emacs/custom/fcuny-org.el index 95a77b5..abf4d2c 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) @@ -75,7 +81,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) @@ -124,36 +133,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:" + ":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: %U" ":END:" + ":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) -- cgit 1.4.1 From d6148fd8754efc7ca7e5e427203c8762664c713b Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 12 Feb 2021 14:57:18 -0800 Subject: elisp: clean up indentation --- emacs/lisp/fcuny-org-custom.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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) -- cgit 1.4.1 From 8b7ffe545b1f5621caf48e4e2d85e794a682cb01 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 12 Feb 2021 17:12:49 -0800 Subject: emacs: some updates to org's ui --- emacs/custom/fcuny-org.el | 7 +++++++ emacs/custom/fcuny-ui.el | 1 + 2 files changed, 8 insertions(+) diff --git a/emacs/custom/fcuny-org.el b/emacs/custom/fcuny-org.el index abf4d2c..d993f0b 100644 --- a/emacs/custom/fcuny-org.el +++ b/emacs/custom/fcuny-org.el @@ -69,7 +69,14 @@ (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. diff --git a/emacs/custom/fcuny-ui.el b/emacs/custom/fcuny-ui.el index 3fae95a..0bb9054 100644 --- a/emacs/custom/fcuny-ui.el +++ b/emacs/custom/fcuny-ui.el @@ -34,6 +34,7 @@ (modus-themes-completions nil) (modus-themes-region 'bg-only-no-extend) (modus-themes-diffs 'bg-only) + (modus-themes-org-blocks 'grayscale) (modus-themes-variable-pitch-headings nil) (modus-themes-scale-headings nil)) -- cgit 1.4.1