(setq org-startup-indented 1)
(if (equal "work" (getenv "SYSENV"))
- (setq org-agenda-files (list "~/workorg/work.org"
- "~/org/notes.org"
- "~/org/emacs.org"
- "~/org/private.org"
- "~/org/it.org"
- "~/org/refile.org"
- "~/org/workhours.org"
- ))
- (setq org-agenda-files (list "~/org/work.org"
- "~/org/notes.org"
- "~/org/emacs.org"
- "~/org/private.org"
- "~/org/it.org"
- "~/org/refile.org"
- "~/org/workhours.org"
- ))
- )
+ (setq org-agenda-files (list "~/workorg/work.org"
+ "~/org/todo.org"
+ "~/org/notes.org"
+ "~/org/emacs.org"
+ "~/org/it.org"
+ "~/org/refile.org"))
+ (setq org-agenda-files (list "~/org/work.org"
+ "~/org/todo.org"
+ "~/org/notes.org"
+ "~/org/emacs.org"
+ "~/org/it.org"
+ "~/org/refile.org")))
#+END_SRC
+** org sync to icloud
+[2022-09-07 Wed 11:11]
+
+With [[https://beorgapp.com][beorg]] we can have our tasks with us.
+As it supports icloud drive we can use a git hook to sync files after commit:
+
+#+begin_src sh :eval never
+ #!/bin/bash
+
+ for file in notes todo motorcycles; do
+ rsync -tuvq ~/org/${file}.org ~/Library/Mobile\ Documents/iCloud~com~appsonthemove~beorg/Documents/org/${file}.org
+ rsync -tuvq ~/Library/Mobile\ Documents/iCloud~com~appsonthemove~beorg/Documents/org/${file}.org ~/org/${file}.org
+ done
+#+end_src
+
+However sometimes it's nice to sync manually as well.
+Why leave Emacs for that?
+
+#+begin_src emacs-lisp
+ (defun isync ()
+ "sync org files to and from icloud drive."
+ (interactive)
+ (save-some-buffers)
+ (shell-command "git --work-tree ~/org/ --git-dir ~/org/.git commit -a -m 'autocommit'"))
+ (define-key global-map (kbd "S-<f1>") 'isync)
+#+end_src
+
** org-man
[2018-08-28 Tue 16:57]
#+END_SRC
+** org-capture
+
#+BEGIN_SRC emacs-lisp
;; (setq org-clock-persist 'history)
(define-key global-map "\C-cc" 'org-capture)
(setq org-capture-templates
-
- '(("t" "todo" entry (file+headline "~/org/refile.org" "Tasks")
+ '(("t" "todo" entry (file+headline "~/org/todo.org" "Tasks")
"* TODO %^{Task}\n%U\n
%i\n
%a\n
%?
- ")
+ " :prepend t)
("m" "Meeting" entry (file "~/org/refile.org")
"* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t)
%a")
("w" "work todo" entry (file+headline "~/workorg/work.org" "Tasks")
- "* TODO %^{Task}\n%U\n
+ "* TODO %? %^{Task}\n%U\n
%i\n
- %a\n
- %?
- ")
+ %a\n\n" :prepend t)
- ("j" "Journal" entry (file+datetree "~/git/org/diary.org")
+ ("j" "Journal" entry (file+datetree "~/org/diary.org")
"* %?\n%U\n" :clock-in t :clock-resume t)
("l" "Links (it)" entry (file+headline "~/org/refile.org" "Links")
("C" "Cookbook" entry (file+headline "~/org/kitchen.org" "[[http://allrecipes.com][AllRecipes.com]]")
"%(org-chef-get-recipe-from-url)"
:empty-lines 1)))
-
#+END_SRC
** Define some handy link abbreviations
#+BEGIN_SRC emacs-lisp
(if (equal "work" (getenv "SYSENV"))
- (progn (split-window-below)
+ (progn (org-agenda-list)
+ (split-window-right)
(other-window 1)
(find-file "~/org/workhours.org")
(goto-char (point-min))
(org-shifttab 3)
- (if (re-search-forward (concat "^\*\* "(format-time-string "%Y-%m")) nil t)
- (org-beginning-of-line)
- (progn
- (goto-char (point-min))
- (org-next-visible-heading '1)
- (org-meta-return)
- (insert (format-time-string "%Y-%m"))
- ))
+ (if (re-search-forward (concat "^\*\* "(format-time-string "%Y-%m")) nil t)
+ (org-beginning-of-line)
+ (progn
+ (goto-char (point-min))
+ (org-next-visible-heading '1)
+ (org-meta-return)
+ (insert (format-time-string "%Y-%m"))
+ ))
))
#+END_SRC
'(magit-log-margin '(t "%Y-%m-%d %H:%M " magit-log-margin-width t 18))
'(magit-pull-arguments nil)
'(magit-repo-dirs '("~/git"))
- '(org-agenda-files
- (quote
- ("~/workorg/work.org" "~/org/notes.org" "~/org/emacs.org" "~/org/it.org" "~/org/refile.org" "~/org/workhours.org")))
'(package-selected-packages
- (quote
- (yasnippet with-editor treepy transient simple-httpd request markdown-mode magit-popup hydra htmlize hl-todo helm git-commit f elfeed dash-functional dash clomacs clojure-mode async magit org lsp-mode git-link eglot helm-org biblio parsebib parseedn lv yaml-mode xah-lookup x-path-walker visual-regexp visual-ascii-mode vertica-snippets undo-tree twittering-mode tt-mode tldr terraform-mode tabulated-list sx string-inflection string-edit sqlup-mode sokoban smartparens sicp s3ed rhtml-mode restclient-helm rainbow-mode rainbow-delimiters puppet-mode paradox pacmacs&nbsbsp;debian-changelog-mode csv-nav csv-mode command-log-mode color-identifiers-mode centered-cursor-mode bug-hunter aws-snippets avy ascii artbollocks-mode apples-mode ac-helm)))
+ '(german-holidays jenkinsfile-mode cider company seq flymake log4e annotate a magit-section bicycle beacon alert graphviz-dot-mode helm-core apache-mode groovy-mode kubel solarized-theme lsp-ui docker-tramp dockerfile-mode yasnippet with-editor treepy transient simple-httpd request markdown-mode magit-popup hydra htmlize hl-todo helm git-commit f elfeed dash-functional dash clomacs clojure-mode async magit org lsp-mode git-link eglot helm-org biblio parsebib parseedn lv helm-aws guide-key graphql go-snippets go-mode gnuplot git-timemachine ghub ggtags fullscreen-mode fullframe flymake-yaml flymake-puppet flymake-perlcritic flymake-json flycheck fast-scroll expand-region ess epoch-view engine-mode elfeed-org ejc-sql editorconfig edit-indirect dired-narrow dired+ demo-it debian-changelog-mode csv-nav csv-mode command-log-mode color-identifiers-mode centered-cursor-mode bug-hunter aws-snippets avy ascii artbollocks-mode apples-mode ac-helm))
'(package-user-dir "~/.emacs.d/elpa")
'(paradox-github-token t)
'(safe-local-variable-values (quote ((bba-keep-whitespaces . 1))))