<commit_before>#+TITLE: Org Mode Workflow
#+PROPERTY: header-args:emacs-lisp :tangle ./.emacs.d/lisp/dw-workflow.el

This file contains the description and configuration of the productivity workflow I use with Org Mode.

* Table of Contents
:PROPERTIES:
:TOC:      :include all :ignore this
:END:
:CONTENTS:
- [[#principles][Principles]]
  - [[#dont-look-at-org-files-to-find-the-next-task-use-the-agenda-view][Don't look at Org files to find the next task, use the agenda view]]
  - [[#ensure-sufficient-metadata-on-tasks-for-effective-filtering][Ensure sufficient metadata on tasks for effective filtering]]
  - [[#keep-a-daily-log-of-work-being-done][Keep a daily log of work being done]]
- [[#tasks][Tasks]]
  - [[#figure-out-how-to-refile-tasks-to-an-org-capture-target][Figure out how to refile tasks to an org-capture target]]
- [[#file-paths][File Paths]]
- [[#workflow-states][Workflow States]]
- [[#tags][Tags]]
- [[#agendas][Agendas]]
- [[#capture-templates][Capture Templates]]
- [[#old-configuration][Old Configuration]]
  - [[#agenda][Agenda]]
  - [[#tags][Tags]]
  - [[#tasks][Tasks]]
  - [[#capture-templates][Capture Templates]]
- [[#module-setup][Module Setup]]
:END:

* Principles

** Don't look at Org files to find the next task, use the agenda view
** Ensure sufficient metadata on tasks for effective filtering
** Keep a daily log of work being done
* Tasks

Here are some things I need to do to make this workflow even more effective:

** TODO Figure out how to refile tasks to an org-capture target
I want to put them in the "Completed Tasks" entry of that day

* File Paths

The location where my =Notes= folder lives changes in some cases

#+begin_src emacs-lisp

  (setq org-directory
    (if dw/is-termux
        "~/storage/shared/Notes"
        "~/Notes"))

  (setq org-agenda-files `(,org-directory))

  (defun dw/org-path (path)<commit_msg>emacs: Build org-agenda-list from Org Roam files<commit_after>#+TITLE: Org Mode Workflow
#+PROPERTY: header-args:emacs-lisp :tangle ./.emacs.d/lisp/dw-workflow.el

This file contains the description and configuration of the productivity workflow I use with Org Mode.

* Table of Contents
:PROPERTIES:
:TOC:      :include all :ignore this
:END:
:CONTENTS:
- [[#principles][Principles]]
  - [[#dont-look-at-org-files-to-find-the-next-task-use-the-agenda-view][Don't look at Org files to find the next task, use the agenda view]]
  - [[#ensure-sufficient-metadata-on-tasks-for-effective-filtering][Ensure sufficient metadata on tasks for effective filtering]]
  - [[#keep-a-daily-log-of-work-being-done][Keep a daily log of work being done]]
- [[#tasks][Tasks]]
  - [[#figure-out-how-to-refile-tasks-to-an-org-capture-target][Figure out how to refile tasks to an org-capture target]]
- [[#file-paths][File Paths]]
- [[#workflow-states][Workflow States]]
- [[#tags][Tags]]
- [[#agendas][Agendas]]
- [[#capture-templates][Capture Templates]]
- [[#old-configuration][Old Configuration]]
  - [[#agenda][Agenda]]
  - [[#tags][Tags]]
  - [[#tasks][Tasks]]
  - [[#capture-templates][Capture Templates]]
- [[#module-setup][Module Setup]]
:END:

* Principles

** Don't look at Org files to find the next task, use the agenda view
** Ensure sufficient metadata on tasks for effective filtering
** Keep a daily log of work being done

* Tasks

Here are some things I need to do to make this workflow even more effective:

** TODO Figure out how to refile tasks to an org-capture target
I want to put them in the "Completed Tasks" entry of that day

* File Paths

The location where my =Notes= folder lives changes in some cases

#+begin_src emacs-lisp

  (setq org-directory
    (if dw/is-termux
        "~/storage/shared/Notes"
        "~/Notes"))

  ;; (setq org-agenda-files `(,org-directory))

  ;; Inspired by this great article:
  ;; https://d12frosted.io/posts/2021-01-16-task-management-with-roam-vol5.html
  (defun dw/org-roam-project-files ()
    "Return a list of note files containing Project tag."
    (seq-filter
      #'identity
      (seq-map
        #'car
        (org-roam-db-query
          [:select file
          :from tags
          :where (like tags (quote "%\"Project\"%"))]))))

  (defun dw/update-org-agenda-files ()
    (interactive)
    (setq org-agenda-files (dw/org-roam-project-files)))

  (with-eval-after-load 'org-roam
    (dw/update-org-agenda-files))

  (defun dw/org-path (path)
{'fraction_non_alphanumeric': 0.14635261833981247, 'fraction_numerical': 0.002515435627715527, 'mean_word_length': 3.790799561883899, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3652499', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1428, 'n_words': 431}