Browse Source

more cleanup in org configs

master
Marc Pohling 6 years ago
parent
commit
74f23c8a0e
1 changed files with 45 additions and 65 deletions
  1. 110
      config.org

110
config.org

@ -627,38 +627,14 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
(setq org-agenda-files (list(concat PATH_ORG_FILES "notes.org") (setq org-agenda-files (list(concat PATH_ORG_FILES "notes.org")
(concat PATH_ORG_FILES "projects.org") (concat PATH_ORG_FILES "projects.org")
(concat PATH_ORG_FILES "todo.org")))))) (concat PATH_ORG_FILES "todo.org"))))))
#+END_SRC
*** Org key bindings
Set up some global key bindings that integrate with Org mode features
#+BEGIN_SRC emacs-lisp
(bind-key "C-c l" 'org-store-link)
(bind-key "C-c c" 'org-capture)
(bind-key "C-c a" 'org-agenda)
#+END_SRC
Org overwrites RET and C-j, so I need to disable the rebinds
#+BEGIN_SRC emacs-lisp
(define-key org-mode-map (kbd "RET") nil) ;;org-return
(define-key org-mode-map (kbd "C-j") nil) ;;org-return-indent
(setq org-id-locations-file (concat PATH_USER_LOCAL ".org-id-locations"))
#+END_SRC #+END_SRC
*** Org agenda
For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e473368adb1f63e582a6595450fcd0e787c/Sacha.org#org-agenda][see here]].
BEGIN_SRC emacs-lisp
(setq org-agenda-files
(delq nil
(mapcar (lambda (x) (and (file-exists-p x) x))
'("~/Archiv/Dokumente/Agenda"))
)
)
END_SRC
*** Org capture
Speed commands are a nice and quick way to perform certain actions while at the beginning of a heading. It's not activated by default.
*** Settings
Speed commands are a nice and quick way to perform certain actions while at the beginning of a heading. It's not activated by default.
See the doc for speed keys by checking out the documentation for speed keys in Org mode.
See the doc for speed keys by checking out the documentation for speed keys in Org mode.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-use-speed-commands t) (setq org-use-speed-commands t)
@ -672,53 +648,49 @@ END_SRC
(setq org-hide-emphasis-markers t) (setq org-hide-emphasis-markers t)
#+END_SRC #+END_SRC
Sort org agenda by deadline and priority
The default value for the org tag column is -77, which is weird for smaller width windows. I'd rather have the tags align horizontally with the header.
45 is a good column number to do that.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-agenda-sorting-strategy
(quote
((agenda deadline-up priority-down)
(todo priority-down category-keep)
(tags priority-down category-keep)
(search category-keep)))
)
(setq org-tags-column 45)
#+END_SRC #+END_SRC
Custom todo-keywords, depending on environment
*** Org key bindings
Set up some global key bindings that integrate with Org mode features
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(if (string-equal user-login-name "POH")
(setq org-todo-keywords
'((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE")))
)
(bind-key "C-c l" 'org-store-link)
(bind-key "C-c c" 'org-capture)
(bind-key "C-c a" 'org-agenda)
#+END_SRC
Org overwrites RET and C-j, so I need to disable the rebinds
#+BEGIN_SRC emacs-lisp
(define-key org-mode-map (kbd "RET") nil) ;;org-return
(define-key org-mode-map (kbd "C-j") nil) ;;org-return-indent
#+END_SRC #+END_SRC
Set locations of some org files
*** Org agenda
For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e473368adb1f63e582a6595450fcd0e787c/Sacha.org#org-agenda][see here]].
Custom todo-keywords, depending on environment
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(if (string-equal user-login-name "POH")
(progn
(setq org-default-notes-file (concat PATH_ORG_FILES "notes.org"))
(setq org-agenda-files (list(concat PATH_ORG_FILES "notes.org")
(concat PATH_ORG_FILES "projects.org")
(concat PATH_ORG_FILES "todo.org"))))
)
(setq org-id-locations-file (concat PATH_USER_LOCAL ".org-id-locations"))
(if (string-equal my/whoami "work_remote")
(setq org-todo-keywords
'((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE")))
)
#+END_SRC #+END_SRC
Work specific org-capture-templates
Sort org agenda by deadline and priority
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(if (string-equal user-login-name "POH")
(setq org-capture-templates
'(("t" "todo" entry (file (concat PATH_ORG_FILES "todo.org"))
"** TODO %\\n%u\n%a\n")
("n" "note" entry (file org-default-notes-file))
("p" "project" entry (file (concat PATH_ORG_FILES "projects.org"))
"** OPEN %?\n%u\n** Beschreibung\n** Zu erledigen\n*** \n** Verlauf\n***" :clock-in t :clock-resume t)
("u" "Unterbrechung" entry (file org-default-notes-file)
"* Unterbrechnung durch %? :Unterbrechung:\n%t" :clock-in t :clock-resume t)))
(setq org-agenda-sorting-strategy
(quote
((agenda deadline-up priority-down)
(todo priority-down category-keep)
(tags priority-down category-keep)
(search category-keep)))
) )
#+END_SRC #+END_SRC
@ -752,12 +724,20 @@ END_SRC
) )
#+END_SRC #+END_SRC
** Org tags
The default value is -77, which is weird for smaller width windows. I'd rather have the tags align horizontally with the header.
45 is a good column number to do that.
*** Org capture
Work specific org-capture-templates
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-tags-column 45)
(if (string-equal my/whoami "work_remote")
(setq org-capture-templates
'(("t" "todo" entry (file (concat PATH_ORG_FILES "todo.org"))
"** TODO %\\n%u\n%a\n")
("n" "note" entry (file org-default-notes-file))
("p" "project" entry (file (concat PATH_ORG_FILES "projects.org"))
"** OPEN %?\n%u\n** Beschreibung\n** Zu erledigen\n*** \n** Verlauf\n***" :clock-in t :clock-resume t)
("u" "Unterbrechung" entry (file org-default-notes-file)
"* Unterbrechnung durch %? :Unterbrechung:\n%t" :clock-in t :clock-resume t)))
)
#+END_SRC #+END_SRC
** Org babel languages ** Org babel languages

Loading…
Cancel
Save