diff options
Diffstat (limited to '.emacs.d/site-lisp')
-rw-r--r-- | .emacs.d/site-lisp/gnus-init.el | 2 | ||||
-rw-r--r-- | .emacs.d/site-lisp/my-smt.el | 14 | ||||
-rw-r--r-- | .emacs.d/site-lisp/org-init.el | 25 |
3 files changed, 31 insertions, 10 deletions
diff --git a/.emacs.d/site-lisp/gnus-init.el b/.emacs.d/site-lisp/gnus-init.el index 5e6919e..60093c4 100644 --- a/.emacs.d/site-lisp/gnus-init.el +++ b/.emacs.d/site-lisp/gnus-init.el @@ -78,3 +78,5 @@ (ispell-change-dictionary "nl")) (t (ispell-change-dictionary "en"))))) (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) + +(setq message-kill-buffer-on-exit t) diff --git a/.emacs.d/site-lisp/my-smt.el b/.emacs.d/site-lisp/my-smt.el index 1010ddb..32009a2 100644 --- a/.emacs.d/site-lisp/my-smt.el +++ b/.emacs.d/site-lisp/my-smt.el @@ -83,19 +83,29 @@ WIDGET is ignored." ispell-local-dictionary flyspell-default-dictionary))))) +(smt/defwidget my-smt-position + :text (lambda (widget) + (ignore widget) + (format-mode-line "%l/%c:%p"))) + (smt/defrow my-smt-right :prototype 'default-right :widgets '(my-smt-jabber-activity major-mode my-smt-current-dictionary my-smt-flycheck-errors - version-control minor-modes)) + version-control minor-modes) + :margin 16) (smt/defrow my-smt-left :prototype 'default-left :widgets '(buffer-info my-smt-buffer-identification my-smt-po-counters which-function)) +(smt/defrow my-smt-position + :prototype 'default-position + :widgets '(my-smt-position)) + (defun my-smt-major-mode-style (widget) (ignore widget) '(:fill "#ccc" :font-family "Fantasque Sans" :filter nil @@ -107,7 +117,7 @@ WIDGET is ignored." (smt/make-widget :prototype 'major-mode :style 'my-smt-major-mode-style))) - :rows '(my-smt-left default-position my-smt-right)) + :rows '(my-smt-left my-smt-position my-smt-right)) (provide 'my-smt) ;;; my-smt.el ends here diff --git a/.emacs.d/site-lisp/org-init.el b/.emacs.d/site-lisp/org-init.el index 5a4d804..6a5c908 100644 --- a/.emacs.d/site-lisp/org-init.el +++ b/.emacs.d/site-lisp/org-init.el @@ -40,6 +40,9 @@ (with-eval-after-load 'org-crypt (org-crypt-use-before-save-magic)) +(eval-and-compile + (add-to-list 'load-path "~/.emacs.d/vendor-lisp/habitrpg.el")) + (defun tagify (str) "Remove dots, replace - with _ in STR." (replace-regexp-in-string @@ -77,12 +80,14 @@ (defun org-init-skip-tags () "Skip the \"ex\" and \"unconfirmed\" tags." - (let ((tags (org-entry-get (point) "TAGS"))) - (when (and tags (string-match-p - (rx (and ":" (or "ex" "unconfirmed") ":")) tags)) + (let ((tags (org-get-tags-at (point)))) + (when (or (member "ex" tags) + (member "unconfirmed" tags)) (save-excursion - (org-forward-element) - (point))))) + (or + (ignore-errors (org-forward-element) + (point)) + (point-max)))))) (defun org-init-get-tag-name () "Get the name for a new tag for the currently loaded desktop." @@ -94,8 +99,6 @@ "")) ""))) -(setq org-agenda-files '("~/documents/org/tasks")) - (setq org-agenda-cmp-user-defined (lambda (a b) 1)) (setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s") @@ -112,7 +115,7 @@ (setq org-directory (expand-file-name "~/documents/org")) (setq org-default-notes-file (concat org-directory "/org")) (setq org-capture-templates - `(("t" "Task" entry (file "~/documents/org/tasks") + `(("t" "Task" entry (file+headline "~/documents/org/tasks" "Task Queue") "* TODO %? %(org-init-get-tag-name)" :empty-lines-before 1) ("T" "Linked task" entry (file "~/documents/org/tasks") @@ -179,5 +182,11 @@ (org-agenda-to-appt) (ad-activate 'org-agenda-redo) +(require 'habitrpg) +(add-hook 'org-after-todo-state-change-hook 'habitrpg-add 'append) + +(setq org-mobile-directory "~/ownCloud/MobileOrg" + org-mobile-inbox-for-pull "~/documents/org/inbox.org") + (provide 'org-init) ;;; org-init.el ends here |