Commit f79ccab5 authored by Howard Abrams's avatar Howard Abrams
Browse files

Let's have a Save All on my Boxes Hydra

Also, we can remove some duplicate code in favor of the boxes.
parent 45dcd64b
......@@ -191,7 +191,7 @@ if nil,the top of the file."
(interactive)
(org-refile-subtree-to-file org-default-technical-dir))
(define-auto-insert "/personal/" ["personal.org" ha/autoinsert-yas-expand])
(define-auto-insert "/personal/*\\.org" ["personal.org" ha/autoinsert-yas-expand])
(defun org-refile-to-personal-dir ()
"Move the current subtree to a file in the `personal' directory."
......
......@@ -63,7 +63,7 @@
_k_: ↑ previous _t_: tasks _m X_: projects _T_: todo task _g t_: tasks _g X_: projects
_j_: ↓ next _i_: incubate _m P_: personal _S_: schedule _g i_: incubate _g P_: personal
_c_: archive _p_: personal _m T_: technical _D_: deadline _g x_: inbox _g T_: technical
_d_: delete _r_: refile _R_: rename _g n_: notes _g C_: completed
_d_: delete _r_: refile _R_: rename _g n_: notes _g C_: completed
"
("<up>" org-previous-visible-heading)
("<down>" org-next-visible-heading)
......@@ -92,6 +92,7 @@
("g T" (dired org-default-technical-dir))
("g C" (dired org-default-completed-dir))
("[\t]" (org-cycle))
("s" (org-save-all-org-buffers) "save")
("q" nil "quit"))
(setq org-refile-use-outline-path 'file
......
......@@ -180,7 +180,6 @@ See https://github.com/hpdeifel/synosaurus for details."
(define-auto-insert "Sprint.*\\.\\org\\'" ["sprint.org" ha/autoinsert-yas-expand])
(define-auto-insert "test_.*\\.\\rb\\'" ["test_spec.rb" ha/autoinsert-yas-expand])
(define-auto-insert "/personal/" ["personal.org" ha/autoinsert-yas-expand])
(define-auto-insert "/bin/" ["default.sh" ha/autoinsert-yas-expand])))
(defun ha-goodies/post-init-git-timemachine ()
......
......@@ -84,34 +84,6 @@ Use a prefix arg to get regular RET. "
(t
(org-insert-heading-after-current)))))
(defun ha/org-refile-subtree-as-file (dir)
"Archive the org-mode subtree and create an entry in the directory folder specified by DIR.
The formatting, since it is an archive, isn't quite what I want,but it gets it going."
(let* ((header (substring-no-properties (org-get-heading)))
(title (if (string-match ": \\(.*\\)" header)
(match-string 1 header)
header))
(filename (replace-regexp-in-string "\s+" "-" (downcase title)))
(filepath (format "%s/%s.org" dir filename))
(org-archive-location (format "%s::" filepath)))
(org-archive-subtree)
(find-file-other-window filepath)))
(defun ha/org-refile-to-technical ()
"Move the current subtree to a file in the `technical` directory."
(interactive)
(ha/org-refile-subtree-as-file "~/technical"))
(defun ha/org-refile-to-personal ()
"Move the current subtree to a file in the `personal` directory."
(interactive)
(ha/org-refile-subtree-as-file "~/personal"))
(defun ha/org-refile-to-projects ()
"Move the current subtree to a file in the `projects` directory."
(interactive)
(ha/org-refile-subtree-as-file "~/projects"))
;; ----------------------------------------------------------------------
;; Functions that help configure my journal
;; ----------------------------------------------------------------------
......
......@@ -3,6 +3,6 @@
#+AUTHOR: Howard Abrams
#+EMAIL: howard.abrams@gmail.com
#+DATE: 2018-12-27 December
#+TAGS: personal $2
#+FILETAGS: personal $2
$0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment