more cleaning

This commit is contained in:
petrucci4prez 2018-05-19 15:09:15 -04:00
parent a574085746
commit 3f55f7bac0
2 changed files with 98 additions and 102 deletions

View File

@ -312,8 +312,6 @@ event of an error or nonlocal exit."
(advice-add #'org-fast-tag-selection :around #'nd/org-tag-window-advice) (advice-add #'org-fast-tag-selection :around #'nd/org-tag-window-advice)
;;(add-hook 'org-capture-mode-hook 'evil-append)
(setq org-src-window-setup 'current-window) (setq org-src-window-setup 'current-window)
(setq org-src-fontify-natively t) (setq org-src-fontify-natively t)
(setq org-edit-src-content-indentation 0) (setq org-edit-src-content-indentation 0)
@ -350,12 +348,12 @@ event of an error or nonlocal exit."
(sequence "WAIT(w@/!)" "HOLD(h@/!)" "|" "CANC(c@/!)"))) (sequence "WAIT(w@/!)" "HOLD(h@/!)" "|" "CANC(c@/!)")))
(setq org-todo-keyword-faces (setq org-todo-keyword-faces
(quote (("TODO" :foreground "light coral" :weight bold) '(("TODO" :foreground "light coral" :weight bold)
("NEXT" :foreground "khaki" :weight bold) ("NEXT" :foreground "khaki" :weight bold)
("DONE" :foreground "light green" :weight bold) ("DONE" :foreground "light green" :weight bold)
("WAIT" :foreground "orange" :weight bold) ("WAIT" :foreground "orange" :weight bold)
("HOLD" :foreground "violet" :weight bold) ("HOLD" :foreground "violet" :weight bold)
("CANC" :foreground "deep sky blue" :weight bold)))) ("CANC" :foreground "deep sky blue" :weight bold)))
(defun nd/filter-list-prefix (prefix str-list) (defun nd/filter-list-prefix (prefix str-list)
"Return a subset of tags-list whose first character matches prefix.' "Return a subset of tags-list whose first character matches prefix.'

View File

@ -288,6 +288,16 @@ event of an error or nonlocal exit."
`(advice-remove ,(car adform) ,(nth 2 adform))) `(advice-remove ,(car adform) ,(nth 2 adform)))
adlist)))) adlist))))
#+END_SRC #+END_SRC
** functions
#+BEGIN_SRC emacs-lisp
(defun nd/filter-list-prefix (prefix str-list)
"Return a subset of tags-list whose first character matches prefix.'
tags-list defaults to org-tag-alist if not given"
(seq-filter (lambda (i)
(and (stringp i)
(string-prefix-p prefix i)))
str-list))
#+END_SRC
* custom functions * custom functions
** follow window splitting ** follow window splitting
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -461,10 +471,6 @@ By default, the tag selection window obliterates all but the current window...ho
(advice-add #'org-fast-tag-selection :around #'nd/org-tag-window-advice) (advice-add #'org-fast-tag-selection :around #'nd/org-tag-window-advice)
#+END_SRC #+END_SRC
** evil modes
#+BEGIN_SRC emacs-lisp
;;(add-hook 'org-capture-mode-hook 'evil-append)
#+END_SRC
** src ** src
*** basic *** basic
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -518,12 +524,12 @@ By default, the tag selection window obliterates all but the current window...ho
*** colors *** colors
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-todo-keyword-faces (setq org-todo-keyword-faces
(quote (("TODO" :foreground "light coral" :weight bold) '(("TODO" :foreground "light coral" :weight bold)
("NEXT" :foreground "khaki" :weight bold) ("NEXT" :foreground "khaki" :weight bold)
("DONE" :foreground "light green" :weight bold) ("DONE" :foreground "light green" :weight bold)
("WAIT" :foreground "orange" :weight bold) ("WAIT" :foreground "orange" :weight bold)
("HOLD" :foreground "violet" :weight bold) ("HOLD" :foreground "violet" :weight bold)
("CANC" :foreground "deep sky blue" :weight bold)))) ("CANC" :foreground "deep sky blue" :weight bold)))
#+END_SRC #+END_SRC
** tags ** tags
I use tags for agenda filtering. Very fast and simple. I use tags for agenda filtering. Very fast and simple.
@ -536,14 +542,6 @@ There are several types of tags I use:
- attribute: useful flags for filtering; these start with "%" - attribute: useful flags for filtering; these start with "%"
- life areas: key areas of life which define priorities and goals; these start with "_" - life areas: key areas of life which define priorities and goals; these start with "_"
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun nd/filter-list-prefix (prefix str-list)
"Return a subset of tags-list whose first character matches prefix.'
tags-list defaults to org-tag-alist if not given"
(seq-filter (lambda (i)
(and (stringp i)
(string-prefix-p prefix i)))
str-list))
(defun nd/add-tag-face (fg-name prefix) (defun nd/add-tag-face (fg-name prefix)
"Adds list of cons cells to org-tag-faces with foreground set to fg-name. "Adds list of cons cells to org-tag-faces with foreground set to fg-name.
Start and end specify the positions in org-tag-alist which define the tags Start and end specify the positions in org-tag-alist which define the tags