My-Agenda

1 Background Music

假如我年少有为,不自卑。

2 Tree structure of agenda files

2.1 First level

├── gtd.org  // main agenda file
├── gtd_old.org //cache file
├── images //stock first level image
├── mobileorg.org  // remote org-agenda by Orgzly on android
├── myself.org  // Note Something without Technologies and my job
├── notes.org //Only note My fields

2.2 Second level directories

  • Post

发布或记录一些事情

post
├── LearnNix
├── agenda
├── life-thing
├── music
├── nsm-1
└── traveling
...
  • Course

用来记录和学习的课程书籍的目录

course
├── ELK
├── WGEECN
│   └── resource
├── bro
├── hello-emacs
│   └── Emacs_Redux
├── onlisp-cn
│   ├── auto
│   └── figures
├── osquery
├── pcl-cn
│   └── docsrc
│       ├── chap01
│       ├── chap02
│       ├── ...
├── practical-common-lisp
│   └── practicals
│       ├── Chapter03
│       ├── ...
│       └── libraries
│           └── cl-ppcre-1.2.3
│               └── doc
├── suricata
  • NsmOrg

与我工作相关的目录,做了 org-pulish 到 blog 下的 post

  NSM-GTD
  ├── CVE.org
  ├── NsmOrg.org
  ├── README.md
  ├── README.org
  ├── database.org
  ├── debug.org
  ├── thesis
  │   ├── Deep\ Packet\ Inspection-over-Encrypted-Traffic.pdf
  │   ├── embark.pdf
  │   └── thesisfinal.pdf
  ├── workflow.html
  └── workflow.org
  • archives

用来存放已经完成的事项,保证当前的 agenda list 没有多余的杂项。

archive
├── Memo.org_archive_2018
├── gtd.org_archive_2017
└── gtd.org_archive_2018

  • art

myself.org 文件收集的电影,书籍,书画等分类的事件完成后,refile 到 art 目录下的指定分类文件。

art
├── film.org
└── music.org
...

2.3 organize my configuration file

  • init.org

管理生成 Emacs 相关的配置

  • nix.org

管理生成 NIX 相关的配置

3.1 helm-deft

我喜欢用 helm-deft 链接在 org-notes 以及其他多变目录下的 org 文件 My Emacs configuration -

(setq helm-deft-dir-list '(
			   "~/org-notes/art"
			   "~/org-notes/NSM-GTD"
			   "~/org-notes/post"
			   "~/project/gtrun-profile/dotfiles/wallpaper"
			   "~/project/global-profile/global-doc"
			   )

3.2 org-starter

简单定位和设定 agenda file

(use-package org-starter
  :straight t
  :config
  (org-starter-def "~/org-notes"
    :files
    ("gtd.org" :agenda t :key "g" :refile (:maxlevel . 5))
    ("notes.org" :agenda t :key "n" :refile (:maxlevel .5 ) :required nil)
    ("myself.org" :agenda t)
    )

  (org-starter-def "~/org-notes/NSM-GTD"
    :files
    ("NsmOrg.org" :agenda t)
    ("workflow.org" :agenda t :required nil)
    )
  (org-starter-def "~/.emacs.d"
    :files
    ("init.org" :key "i" :refile (:maxlevel . 5))
    ("nix.org" :key "x" :refile (:maxlevel . 5))
    )
  (org-starter-def "~/project/global-profile/global-doc/global-init.org")
  :bind
  (
   ("C-c e" . org-starter-select-file))
  ;; "C-c e" . org-starter-refile-by-key))
  )

3.3 org-push-project

  (setq org-publish-project-alist
        '(("NSM"
           :base-directory "~/org-notes/NSM-GTD"
           :publishing-function org-html-publish-to-html
           :publishing-directory "~/Dropbox/application/Bitcron/gtrun.bitcron.com/custom"
           :include ["workflow.org"]
           )
          ("init"
           :base-directory "~/.emacs.d"
           :publishing-function org-html-publish-to-html
           :publishing-directory "~/Dropbox/application/Bitcron/gtrun.bitcron.com/custom"
           )
          ("art"
           :base-directory "~/org-notes/art"
           :publishing-function org-html-publish-to-html
           :publishing-directory "~/Dropbox/application/Bitcron/gtrun.bitcron.com/custom"
           )
          ("course"
           :base-directory "~/org-notes/course"
           :publishing-function org-html-publish-to-html
           :publishing-directory "~/Dropbox/application/Bitcron/gtrun.bitcron.com/custom"
           )
          ))

4 Design Super-agenda

4.1 Setting


  (require 'org-habit)
  ;; (setq org-agenda-time-grid
  ;;       '((daily today)
  ;;         ))
  (setq
   org-agenda-skip-scheduled-if-done t
   org-agenda-skip-deadline-if-done t
   org-agenda-include-deadlines t
   org-agenda-include-diary nil
   org-agenda-block-separator nil
   org-agenda-compact-blo0cks t
   org-agenda-start-with-log-mode t)



  (setq org-agenda-custom-commands
        '(("z" "GtruN Agenda"
           ((agenda "" ((org-agenda-span 'day)
                        (org-super-agenda-groups
                         '((:habit t)
                           (:log t)
                           (:name "Today List"
                                  :time-grid t
                                  :date today
                                  :todo "☞ TODO"
                                  :scheduled today
                                  :order 1)))))
            (alltodo "" ((org-agenda-overriding-header "")
                         (org-super-agenda-groups
                          '((:name "Next to do"
                                   :priority>= "B"
                                   :order 1)
                            (:name "Important"
                                   :todo "✰ Important"
                                   :order 6)
                            (:name "Due Today"
                                   :deadline today
                                   :order 2)
                            (:name "Due Soon"
                                   :deadline future
                                   :order 8)
                            (:name "Overdue"
                                   :deadline past
                                   :order 7)
                            (:name "Issues"
                                   :tag "Issue"
                                   :order 12)
                            (:name "Projects"
                                   :tag "Project"
                                   :order 14)
                            (:name "Emacs"
                                   :tag "Emacs"
                                   :order 13)
                            (:name "Research"
                                   :tag "Research"
                                   :order 15)
                            (:name "To read"
                                   :tag "BOOK"
                                   :order 30)
                            (:name "Waiting"
                                   :todo "⚑ WAITING"
                                   :order 20)
                            (:name "trivial"
                                   :priority<= "C"
                                   :todo ("SOMEDAY")
                                   :order 90)
                            (:discard (:tag ("Chore" "Routine" "Daily")))))))))

          ("b" . "BOOK")

          ("bb" "Search tags in todo, note, and archives"
           search "+{:book\\|books:}")

          ("bd" "BOOK TODO List"
           search "+{^\\*+\\s-+\\(STARTED\\|☞ TODO\\|WAITING\\)\\s-} +{book\\|books}")

          ("d" "ALL DONE OF TASKS"
           search "+{^\\*+\\s-+\\(DONE\\|✘ CANCELED\\)\\s-}")
          ))
  ;; WARNING double //
  ;;  +{^\*+\s-+\(TODO\|WAITING\):(book):\s-}  +(TODO\|WAITING\) +{:book\|books:}
  ;; +{^*+ -+(DONE|WAITING) -}

5 org clock


port Org-clock

5.1 Exporting Clock Entries from org-mode to CSV | Unconstant Conjunction

6 org search system

I recommended your use Notdeft as org-files search system.there are some reasons following:

  1. Support xapian quickly and clearly
  2. query language to filter with tags or TODO status to org.
  3. Support chinese CJK search
  4. that’s a good way to organize your agenda and tasks

7 Dump Emacs org-mode agendas and todo lists to the command line | Kokoko

8 NsmOrg

Avatar
Guangtao Zhang
Threat Intelligence Analyst

My research interests include IDS, Monitoring system and Data analysis