org-ql queries

Table of Contents

1. org-ql queries

1.1. org-super-agenda

:ID: 921b32c0-d726-4a83-a361-eff92f7862e7

(setq org-super-agenda-groups
       '(
         (:name "Today"
                :time-grid t
                :date today
                :scheduled today
                :deadline today
                :order 1)
         (:name "Habit"
                :habit t
                :order 1)))

1.1.1. SOMEDAY Poner un org-super-agenda groups que me agrupe en base a las tags que he definido para ONGOING

Por ejemplo los libros que estoy leyendo todos juntos en vez de por archivo, las areas y los proyectos

1.1.2. SOMEDAY Poner una agrupación por estado de TODO y por archivo

1.2. custom predicates

1.2.1. maybe-work

(org-ql-defpred maybe-work ()
  "Search for headlines with tag work if and only if WORK_ENV is activated"
  :body (and (xor (not WORK_ENV) (tags "work")) (or (not (tags "jira")) (and  (tags "jira") (tags "ejira_assigned")))))

;; blank

1.2.2. todo-actionable

(org-ql-defpred todo-actionable ()
  "Search for headlines with TODO state which is not MAYBE/SOMEDAY/DEFINED"
  :body (and (todo) (not (todo "MAYBE" "SOMEDAY" "DEFINED" "REFILE"))))

;; blank
it.todo .i.maybe .i.someday .i.defined .i.refile

1.2.3. todo-more-actionable

(org-ql-defpred todo-more-actionable ()
  "Search for headlines with TODO state which is not MAYBE/SOMEDAY/DEFINED or TICKLER"
  :body (and (todo) (not (todo "MAYBE" "SOMEDAY" "DEFINED" "REFILE" "TICKLER"))))

;; blank
it.todo .i.maybe .i.someday .i.defined .i.refile .i.tickler

1.2.4. todo-more-more-actionable

(org-ql-defpred todo-more-more-actionable ()
  "Search for headlines with TODO state which is not MAYBE/SOMEDAY/DEFINED, TICKLER nor REFILE"
  :body (and (todo) (not (todo "MAYBE" "SOMEDAY" "DEFINED" "REFILE" "TICKLER" "HOLD"))))

;; blank
it.todo .i.maybe .i.someday .i.defined .i.refile .i.tickler i.hold

1.2.5. maybe-deadline [1/3]   idea

Quiero hacer una función que utilize deadline o scheduled para poder cambiar entre las dos

  • [X] Creo que hay que ponerle una función delante, así: (org-ql--normalize-query '(planning 0))
  • [ ] Ahora funciona pero saca todas las entradas, filtrar bien
  • [ ] Hay que ver como manejar que days no exista
(org-ql-defpred maybe-deadline (&optional days)
  "Use either exclusivelly deadline, or both scheduled deadline"
  :body (or (xor (not USE_DEADLINE) (org-ql--normalize-query '(deadline days))) (xor USE_DEADLINE (org-ql--normalize-query '(planning days)))))


(org-ql-defpred deadline-test ()
  "Use either exclusivelly deadline, or both scheduled deadline"
  :body (org-ql--normalize-query '(deadline 100)))

;; blank

1.3. Sort function

(defun sort-ql-func (a b) (< (string-to-number (or (org-element-property :SORT a) "1.0e+INF")) (string-to-number (or (org-element-property :SORT b) "1.0e+INF"))))
1.3.0.1. SOMEDAY Hacer una función que ordene automáticamente en base a una lista

La idea es que tenga un nodo con una id concreta en la que pongo una lista, y al reordenar esa lista se modifica una propiedad custom (por ejemplo :SORT:), de tal manera
Se podría hacer también en el propio buffer de org-ql-view? Si es así quizás plantearlo como algo a mergear en el código de org-ql / org-super-agenda
Tienes que definir qué hacer cuando un elemento pasa de ONGOING a DONE por ejemplo. Puede que se quede en la lista, porque la lista no se ordena, pero está desactualizada y tendrías que eliminarlo al ejecutar la query por ejemplo

(org-link-open-from-string "[[id:391f339c-7273-4d5d-a5ea-960e57f39d59]]") ;; Funciona, pero no te devuelve el contenido exactamente, porque si ya has abierto el archivo te deja el cursor donde lo tenías abierto, no encima de ese nodo con esa id
org-link-parameters is a variable defined in ol.el:
  "id" :follow org-roam-id-open :complete org-id-complete-link

org-roam-id-find es el bueno
devuelve algo como:

("/home/julian/org/0PARA.org" . 152) ;; byte offset
Y ahora tiene que parsear el elemento que esté en esa línea

1.4. SOMEDAY custom org-super-agenda–def-auto-group

Los autogrupos que vienen por defecto o bien son de por archivo, o bien son por jerarquía pero hace cosas extrañas
Hacer un autogrupo que me muestre archivo si no hay ningún outline/path

;; Está pillando atributos la fuente (tiene el nivel correcto) porque los va heredando
(org-super-agenda--def-auto-group outline-file-path "their outline paths / file"
  :key-form (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item)
              (if (org-up-heading-safe)
                (concat (make-string (/ (org-current-level) 2) 32 ) (buffer-name) ">"
                  (s-join "/" (org-get-outline-path)))
                (buffer-name))))

El auto-parent sí que pilla la jerarquía bien, pero mezcla cosas de distintos headlines
El auto-outline-path pilla bien el path pero no tiene indentación, y TAB no me funciona

1.4.1. SOMEDAY Que encuentre el proyecto correspondiente

Sería ir subiendo hasta que encuentre el headline que tenga ONGOING/project, y si no el que tiene por encima y ya está

1.4.2. Otras agrupaciones interesantes

Por headline padre
Por el primer padre que sea tenga tag project
Por archivo
Por tag → auto-tag

1.4.3. Agrupación por tag project o no

(org-super-agenda--def-auto-group tag-project
  "whether they have tag project or not"
  :keyword :auto-tag-project
  :key-form (or (car (member "project" (mapcar #'substring-no-properties (org-super-agenda--get-tags item)))) "habit" )
  :key-sort-fn string<)

1.5. SOMEDAY Corregir que me muestre la fecha en OnGoing Projects y varios sitios más

Parece que la está cogiendo del LOGBOOK en queries como OnGoing Projects que no tendría que salir la fecha

1.6. SOMEDAY Corregir la fecha de DEADLINE vs SCHEDULED

En las de Today, Next 3 days, Week me tendría que sacar también lo de mantenimiento (que está en event/active timestamp) y Educación Auditiva que está DEADLINE pero no SCHEDULED, pero me saca sólo las SCHEDULED

1.7. SOMEDAY Añadir un not ARCHIVE a todas las tags

1.8. org-ql-views

1.8.1. Beggining

(setq org-ql-views
      '(

        ;; ("" :buffers-files
        ;;  org-agenda-files
        ;;  :query
        ;;  :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "")

;; blank
[

1.8.2. Today

("Today" :buffers-files
         org-agenda-files
         :query (and (todo-actionable) (or (planning 1) (ts-a :to today)))
         :sort (date) :narrow nil :super-groups ((:auto-ts))  nil :title "Today")
;; blank
  {
    "name": "Today",
    "query": "s.today {{ todo-actionable }} o.sched"
  },
1.8.2.1. Por qué ver todo (Trabajo+Personal) en el día?

Porque es la unidad de organización, me tengo que llevar todo lo que me hace falta ese día, o prepararlo, salvo que haga viajes más largos

1.8.3. Next 3 days

#+end_src

        ("Next 3 days" :buffers-files
         org-agenda-files
         :query (and (todo-actionable) (not (tags "tareas" "habits" "mantenimiento")) (or (planning 3) (ts-a :to 3)))
         :sort (date) :narrow nil :super-groups ((:auto-ts)) :title "Next 3 days")
;; blank
  {
    "name": "Next 3 days",
    "query": "{{ todo-actionable }} .i.maybe .i.someday  .t.tareas .t.habits .b.Mantenimiento .b.Hábitos s.ge.today ad.3 o.sched"
  },

1.8.4. Week

        ("Week" :buffers-files
         org-agenda-files
         :query (and (todo-actionable) (not (tags "tareas" "habits" "mantenimiento")) (or (planning 7) (ts-a :to 7)) (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-ts)) :title "Week")
;; blank
  {
    "name": "Week",
    "query": "{{ todo-actionable }} .t.tareas .t.habit .b.Mantenimiento .b.Hábitos ad.7 o.sched"
  },

1.8.5. Lista de antes de irme

        ("Lista de antes de irme" :buffers-files
         org-agenda-files
         :query (property "ID" "e95d62e7-b012-492d-8516-31d9e4a10e02")
         :narrow nil :title "Lista de antes de irme")
;; blank
  {
    "name": "Lista de antes de irme",
    "query": ":ID:       e95d62e7-b012-492d-8516-31d9e4a10e02"
  },

1.8.6. To Do (by file)

#+end_src

        ("To Do (by file)" :buffers-files
         org-agenda-files
         :query (and (todo-more-more-actionable) (not (todo "ONGOING")) (not (tags "tareas" "habits" "mantenimiento")) (maybe-work))
         :narrow nil :sort (priority) :super-groups ((:auto-category)) :title "To Do (by file)")
;; blank
  {
    "name": "To Do (by file)",
    "query": "{{ todo-more-more-actionable }} .t.tareas .t.habit .b.Mantenimiento .b.Hábitos .t.work .b.Trabajo o.s o.book"
  },

1.8.7. To Do (by parent)

#+end_src

        ("To Do (by parent)" :buffers-files
         org-agenda-files
         :query (and (todo-more-more-actionable) (not (todo "ONGOING")) (not (tags "tareas" "habits" "mantenimiento")) (maybe-work))
         :narrow nil :super-groups ((:auto-parent)) :title "To Do (by parent)")
;; blank

1.8.8. To Do (by planning)

#+end_src

        ("To Do (by planning)" :buffers-files
         org-agenda-files
         :query (and (planning) (ts-a) (todo-more-more-actionable) (not (todo "ONGOING")) (not (tags "tareas" "habits" "mantenimiento")) (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "To Do (by planning)")
;; blank
  {
    "name": "To Do (by date)",
    "query": "{{ todo-more-more-actionable }} .t.tareas .t.habit .b.Mantenimiento .b.Hábitos .t.work .b.Trabajo o.s o.book"
  },

1.8.9. OnGoing

        ("OnGoing" :buffers-files
         org-agenda-files
         :query (and (todo "ONGOING") (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-category)) :title "OnGoing")
;; blank
  {
    "name": "OnGoing",
    "query": "i.ongoing .t.work .b.Trabajo o.book"
  },

1.8.10. OnGoing Sorted

        ("OnGoing Sorted" :buffers-files
         org-agenda-files
         :query (and (todo "ONGOING") (maybe-work))
         :sort sort-ql-func
          :narrow nil :super-groups ((:auto-tag-project)) :title "OnGoing Sorted")
;; blank

1.8.11. All Projects Sorted

        ("All Projects Sorted" :buffers-files
         org-agenda-files
         :query (and (or (todo "ONGOING") (ltags "project")) (maybe-work))
         :sort sort-ql-func
         :narrow nil :super-groups ((:auto-tag-project)) :title "All Projects Sorted")
;; blank

1.8.12. OnGoing Projects

        ("OnGoing Projects" :buffers-files
         org-agenda-files
         :query (and (todo "ONGOING") (ltags "project") (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-category)) :title "Ongoing Proj")
;; blank
  {
    "name": "Ongoing Projects",
    "query": "i.ongoing .t.work .b.Trabajo tn.project o.book"
  },

1.8.13. Next Projects

        ("Next Projects" :buffers-files
         org-agenda-files
         :query (and (todo "NEXT") (ltags "project") (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-category)) :title "Next Proj")
;; blank
  {
    "name": "Next Projects",
    "query": "i.next .t.work .b.Trabajo tn.project o.book"
  },

1.8.14. On Hold Projects

        ("On Hold Projects" :buffers-files
         org-agenda-files
         :query (and (todo "HOLD") (ltags "project") (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-category)) :title "On Hold Proj")
;; blank
  {
    "name": "On Hold Projects",
    "query": "i.hold .t.work .b.Trabajo tn.project o.book"
  },

1.8.15. Stopped Projects

("Stopped Projects" :buffers-files org-agenda-files
  :query (and (ltags "project") (not (todo "ONGOING" "DONE" "CANCELLED")) (maybe-work))
  :sort (date) :super-groups ((:auto-category))
  :title "Stopped Proj")
;; blank
  {
    "name": "Stopped Projects",
    "query": "tn.project .i.ongoing .i.done .i.cancelled .t.work .b.Trabajo o.book"
  },

1.8.16. OnGoing Left

        ("OnGoing Left" :buffers-files
         org-agenda-files
         :query (and (todo "ONGOING") (not (ltags "project")))
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "OnGoing Left")
;; blank
  {
    "name": "OnGoing Left",
    "query": "i.ongoing .t.project o.book"
  },

1.8.17. OnGoing Books

        ("OnGoing Books" :buffers-files
         org-agenda-files
         :query (and (todo "ONGOING") (tags "book")) :narrow nil :title "OnGoing Books")
;; blank
  {
    "name": "Ongoing Books",
    "query": "i.ongoing t.book o.book"
  },
1.8.17.1. SOMEDAY Definir mejor las categorías de libros

Puedo hacer un agrupamiento de org-super-agenda que me saque los libros por tema, un poco lo que tengo ahora
Idealmente me agrupa por todas las tags que no sean book y quita de algunas tags predefinidas (por ejemplo project y area no quiero que cuenten para hacer la agrupación)

1.8.18. Someday/Maybe (by file)

        ("Someday/Maybe (by file)" :buffers-files
         org-agenda-files
         :query (and (todo "SOMEDAY" "MAYBE") (maybe-work))
         :narrow nil :sort (priority) :super-groups ((:auto-category)) :title "Someday/Maybe")
;; blank
  {
    "name": "Someday/Maybe",
    "query": "(i.someday or i.maybe) .t.work .b.Trabajo o.book"
  },

1.8.19. Someday/Maybe (by parent)

        ("Someday/Maybe (by parent)" :buffers-files
         org-agenda-files
         :query (and (todo "SOMEDAY" "MAYBE") (maybe-work))
         :narrow nil :super-groups ((:auto-outline-file-path)) :title "Someday/Maybe (by parent)")
;; blank

1.8.20. Defined (by parent)

        ("Defined (by parent)" :buffers-files
         org-agenda-files
         :query (and (todo "DEFINED") (maybe-work))
         :narrow nil :super-groups ((:auto-outline-file-path)) :title "Defined (by parent)")
;; blank

1.8.21. Hold (by file)

        ("Hold (by file)" :buffers-files
         org-agenda-files
         :query (and (todo "HOLD") (maybe-work))
         :narrow nil :super-groups ((:auto-category)) :title "Hold")
;; blank
  {
    "name": "Someday/Maybe",
    "query": "i.hold .t.work .b.Trabajo o.book"
  },

1.8.22. Hold (by parent)

        ("Hold (by parent)" :buffers-files
         org-agenda-files
         :query (and (todo "HOLD") (maybe-work))
         :narrow nil :super-groups ((:auto-outline-file-path)) :title "Hold (by parent)")
;; blank

1.8.23. Next actions

        ("Next actions" :buffers-files
         org-agenda-files
         :query (and (todo-more-actionable) (tags "project") (not (ltags "project")) (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-outline-file-path))  :title "Next actions")
;; blank
  {
    "name": "Next actions",
    "query": "{{ todo-more-actionable }} .t.work .b.Trabajo o.book"
  },

1.8.24. Refile

        ("Refile" :buffers-files
         org-agenda-files
         :query (and (todo "REFILE"))
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "Refile")
;; blank
  {
    "name": "Refile",
    "query": "i.refile"
  },

1.8.25. Refile not Inbox

        ("Refile not Inbox" :buffers-files
         org-agenda-files
         :query (and (todo "REFILE") (not (tags "inbox")))
         :sort (date) :narrow nil :super-groups ((:auto-category)) :title "Refile not Inbox")
;; blank
  {
    "name": "Refile not Inbox",
    "query": "i.refile .b.Inbox"
  },

1.8.26. Work (by file)

        ("Work (by file)" :buffers-files
         org-agenda-files
         :query (and (todo-more-more-actionable) (tags "work"))
         :sort (priority) :super-groups ((:auto-category)) :narrow nil :title "Work (by file)")
;; blank
  {
    "name": "Work",
    "query": "{{ todo-more-more-actionable }} (t.work or b.Trabajo) o.book o.s"
  },

1.8.27. Work (by planning)

        ("Work (by planning)" :buffers-files
         org-agenda-files
         :query (and (todo-actionable) (tags "work"))
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "Work (by planning)")
;; blank
  {
    "name": "Work",
    "query": "{{ todo-more-more-actionable }} (t.work or b.Trabajo) o.sched o.book o.s"
  },

1.8.28. Research

        ("Research" :buffers-files
         org-agenda-files
         :query (and (not (todo)) (not (tags "ARCHIVE")) (ltags "research"))
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "Research")
;; blank
  {
    "name": "Research",
    "query": ".it.done .t.ARCHIVE tn.research"
  },

1.8.29. Learn

        ("Learn" :buffers-files
         org-agenda-files
         :query (and (not (todo)) (not (tags "ARCHIVE")) (ltags "learn" "indepth"))
         :sort (date) :narrow nil :super-groups ((:auto-category)) :title "Learn")
;; blank
  {
    "name": "Learn",
    "query": ".it.done .t.ARCHIVE (tn.learn or tn.indepth)"
  },

1.8.30. Try

        ("Try" :buffers-files
         org-agenda-files
         :query
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "Try")
;; blank
  {
    "name": "Try",
    "query": ".it.done .t.ARCHIVE tn.try"
  },

1.8.31. In Depth

        ("In Depth" :buffers-files
         org-agenda-files
         :query (and (not (todo)) (not (tags "ARCHIVE")) (ltags "indepth"))
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "In Depth")
;; blank
  {
    "name": "InDepth",
    "query": ".it.done .t.ARCHIVE tn.indepth"
  },

1.8.32. Process

        ("Process" :buffers-files
         org-agenda-files
         :query (and (ltags "process") (maybe-work))
         :narrow nil :sort (priority) :super-groups ((:auto-category)) :title "Process")
;; blank

1.8.33. Verify

        ("Verify" :buffers-files
         org-agenda-files
         :query (and (todo "VERIFY") (maybe-work))
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "Verify")
;; blank
  {
    "name": "Verify",
    "query": "i.verify"
  },

1.8.34. Templates

        ("Templates" :buffers-files
         org-agenda-files
         :query (ltags "template")
         :sort (date) :narrow nil :super-groups ((:auto-planning)) :title "Templates")
;; blank

1.8.35. Habits

        ("Habits" :buffers-files
         org-agenda-files
         :query
         (or
          (tags "habit")
          (property "STYLE" "habit"))
         :sort (date) :narrow nil :super-groups org-super-agenda-groups :title "Habits")
;; blank
  {
    "name": "Hábitos",
    "query": "(b.Hábitos or tn.habit) it.todo"
  },

1.8.36. projects

1.8.36.1. Emacs
;; Para generarlo:
;; (mapcar (lambda (x) (expand-file-name (concat org-directory x)))
;;  '("projects/emacs.org" "projects/orgzly_integrations.org" "projects/annotation.org" "projects/orgzly_android.org"))
        ("project :: emacs" :buffers-files
         ("/home/julian/org/projects/emacs.org"  "/home/julian/org/projects/org_mode.org" "/home/julian/org/projects/orgzly_integrations.org" "/home/julian/org/projects/annotation.org" "/home/julian/org/projects/orgzly_android.org" "/home/julian/org/projects/aprender_lisp.org")
         :query (todo-actionable)
         :sort (priority) :narrow nil :title "project :: emacs")
        ("someday/maybe :: emacs" :buffers-files
         ("/home/julian/org/projects/emacs.org"  "/home/julian/org/projects/org_mode.org" "/home/julian/org/projects/orgzly_integrations.org" "/home/julian/org/projects/annotation.org" "/home/julian/org/projects/orgzly_android.org" "/home/julian/org/projects/aprender_lisp.org")
         :query (todo "SOMEDAY" "MAYBE")
         :sort (priority) :narrow nil :super-groups ((:auto-category)) :title "someday/maybe :: emacs")
;; blank
1.8.36.2. Trabajo
        ("Trabajo" :buffers-files
         ("/home/julian/org/Trabajo.org"
          "/home/julian/Work/01_Projects/Workstation ML/Workstation ML.org"
          "/home/julian/org/projects/cecoa.org"
          "/home/julian/org/projects/acciona_agua.org"
          "/home/julian/org/projects/heliostatos.org"
          "/home/julian/org/projects/desaladora_hong_kong.org"
          "/home/julian/org/projects/motosharing.org"
          "/home/julian/org/projects/trello_mobility.org"
          )
         :query (todo-more-more-actionable)
         :sort (priority) :super-groups ((:auto-category)) :narrow nil :title "Trabajo")
;; blank
1.8.36.3. RETO
        ("RETO" :buffers-files
         org-agenda-files
         :query (ltags "RETO")
         :sort (date) :narrow nil  :title "RETO")

1.8.37. areas

        ("Areas" :buffers-files
         org-agenda-files
         :query
          (ltags "area")
         :sort (priority) :narrow nil :super-groups ((:auto-category)) :title "Areas")
;; blank

1.8.38. git merge conflict

        ("git merge conflict" :buffers-files
         org-agenda-files
         :query (regexp ">>>")
         :title "git merge conflict")
;; blank
  {
    "name": "git merge conflict",
    "query": ">>>"
  }

1.8.39. Resources

        ("Resources" :buffers-files
         org-agenda-files
         :query
          (and (not (tags "area" "project" "habit")) (not (todo)) (eq (car (org-heading-components)) 1))
         :sort (priority) :narrow nil :super-groups ((:auto-category)) :title "Resources")
;; blank

1.8.40. End

        )
      )
]

1.9. org-ql-sparse-tree

(defun lytex/org-sparse-tree-full ()
  "TODOs+MAYBE+SOMEDAY+DEFINED+idea+project"
  ;; "All TODOs including MAYBE, SOMEDAY, DEFINED, :idea: and project"
  (interactive)
  (org-ql-sparse-tree '(or (todo) (ltags "idea") (ltags "project"))))

(defun lytex/org-sparse-tree-almost-full ()
  "TODOs+MAYBE+SOMEDAY-idea-project"
  ;; "All TODOs including MAYBE, SOMEDAY, DEFINED, but not :idea: nor :project:"
  (interactive)
  (org-ql-sparse-tree '(todo)))

(defun lytex/org-sparse-tree-trimmed ()
  "TODOs-MAYBE-SOMEDAY-DEFINED"
  ;; "All TODOs excluding MAYBE, SOMEDAY and DEFINED"
  (interactive)
  (org-ql-sparse-tree '(and (todo-actionable))))

(defun lytex/org-sparse-sparse-tree ()
  "TODOs-MAYBE-SOMEDAY-DEFINED-TICKLER"
  ;; "All TODOs excluding MAYBE, SOMEDAY, DEFINED and TICKLER"
  (interactive)
  (org-ql-sparse-tree '(and (todo-more-actionable))))

(defun lytex/org-sparse-sparse-sparse-tree ()
  "TODOs-MAYBE-SOMEDAY-DEFINED-TICKLER-REFILE"
  ;; "All TODOs excluding MAYBE, SOMEDAY, DEFINED, TICKLER and REFILE"
  (interactive)
  (org-ql-sparse-tree '(and (todo-more-more-actionable))))

(defun lytex/org-jira-assigned ()
  ;; "All TODOs with ejira_assigned tag
  (interactive)
  (org-ql-sparse-tree '(and (todo) (property "assignee" "Julian Lopez Carballal"))))

1.9.1. MAYBE Hacer un sparse tree más pelado todavía

Que tenga sólo ONGOING/TODO (si eso NEXT/BLOCK?) sin TICKLER, VERIFY

1.10. org-tag-alist

cd /home/julian/org && grep -hEor  " (:#[0-9a-Z_-]+:)+" | grep -v "Binary file"  | sed "s/:/\n/g" | sort | uniq | grep -Ev "[A-Z]+" | xargs -I _ echo '("_" . nil)'

(“#bluebox” . nil)
(“#dokuwiki” . nil)
(“#kia” . nil)
(“#linux_backup” . nil)
(“#movil” . nil)
(“#oculus” . nil)
(“#ordenador_personal” . nil)
(“#ordenador_trabajo” . nil)
(“#orgwiki” . nil)
(“#pinephone” . nil)
(“#pinetime_abierto” . nil)
(“#pinetime_sellado” . nil)
(“#rpi3” . nil)
(“#rpi4” . nil)
(“#tablet” . nil)

Se pueden utilizar las tags con nombre con C-c C-c sobre un heading y luego enter

(setq org-tag-alist '((:startgroup . nil)
                      ("try" . ?t)
                      ("learn" . ?l)
                      ("research" . ?r)
                      ("build" . ?b)
                      ("buy" . ?y)
                      ("track" . ?k)
                      ("process" . nil)
                      ("read" . nil)
                      (:endgroup . nil)
                      ("indepth". nil)
                      ("idea". ?i)
                      ("fact". nil)
                      (:startgroup . nil)
                      ("project" . ?p)
                      (:endgroup . nil)
                      ("area" . ?a)
                      ("habit" . ?h)
                      ("work" . ?w)
                      ("def" . ?d)
                      {{ device-tags() }}
                      ;; Creadas con:
                      ;; cd /home/julian/org && grep -hEor  " (:[0-9a-Z_-]+:)+" | grep -v "Binary file"  | sed "s/:/\n/g" | sort | uniq | grep -Ev "[A-Z]+" | xargs -I _ echo '("_" . nil)' | nvim
                      ("argumentos" . nil)
                      ("arima" . nil)
                      ("art" . nil)
                      ("arxiv" . nil)
                      ("bash" . nil)
                      ("book" . nil)
                      ("calendario" . nil)
                      ("code" . nil)
                      ("comida" . nil)
                      ("complex_systems" . nil)
                      ("computer" . nil)
                      ("debate" . nil)
                      ("def" . nil)
                      ("devops" . nil)
                      ("distraccion" . nil)
                      ("docker" . nil)
                      ("dokuwiki" . nil)
                      ("dynamical_systems" . nil)
                      ("economy" . nil)
                      ("endofnotes" . nil)
                      ("engineering" . nil)
                      ("esp" . nil)
                      ("essential" . nil)
                      ("example" . nil)
                      ("filosofía" . nil)
                      ("gambling" . nil)
                      ("git" . nil)
                      ("habit" . nil)
                      ("holografía" . nil)
                      ("jazz" . nil)
                      ("kaizen" . nil)
                      ("key" . nil)
                      ("learn" . nil)
                      ("left_right" . nil)
                      ("lifestyle" . nil)
                      ("limpieza" . nil)
                      ("links" . nil)
                      ("linux" . nil)
                      ("lluvia" . nil)
                      ("long" . nil)
                      ("manos" . nil)
                      ("mantenimiento" . nil)
                      ("mapas" . nil)
                      ("marco_tavora" . nil)
                      ("maths" . nil)
                      ("meeting" . nil)
                      ("mejora_personal" . nil)
                      ("mejora_profesional" . nil)
                      ("meta" . nil)
                      ("misc" . nil)
                      ("ml_physics" . nil)
                      ("music" . nil)
                      ("new" . nil)
                      ("nth" . nil)
                      ("official" . nil)
                      ("opinion" . nil)
                      ("orgwiki" . nil)
                      ("overengineering" . nil)
                      ("pandas" . nil)
                      ("physics" . nil)
                      ("private" . nil)
                      ("productivity" . nil)
                      ("project" . nil)
                      ("psicology" . nil)
                      ("python" . nil)
                      ("qft" . nil)
                      ("qm" . nil)
                      ("quantum_computers" . nil)
                      ("quantum_thermo" . nil)
                      ("quote" . nil)
                      ("receta" . nil)
                      ("relaciones" . nil)
                      ("research" . nil)
                      ("robotics" . nil)
                      ("science" . nil)
                      ("software_architecture" . nil)
                      ("statistics" . nil)
                      ("streaming" . nil)
                      ("tag" . nil)
                      ("tareas" . nil)
                      ("template" . nil)
                      ("tendencias" . nil)
                      ("tests" . nil)
                      ("tfg" . nil)
                      ("time_tracking" . nil)
                      ("urgent" . nil)
                      ("use" . nil)
                      ("visualization" . nil)
                      ("website" . nil)
                      ("work" . nil)
                      ("xkcd" . nil)
                      ("youtube" . nil)
))

1.11. org-capture-templates

Con C-0 (que expande a C-u 0) SPC X (que llama a org-capture) se inserta en el sitio actual
Saca las templates de todos los archivos org-mode que tengan

    ;; (org-set-tags (remove "template" (org-get-tags nil t))))
;; ("i" "inbox" entry
;; (file "Inbox.org")
;;   "* REFILE %?\n:PROPERTIES:\n:CREATED: [%<%Y-%m-%d %a %H:%M>]\n:END:" :unnarrowed t)

1.12. Todas las tags

(mapcar (lambda (x) (concat "\n,* :" (car x) ":")) (-filter (lambda (x) (char-or-string-p (car x))) org-tag-alist))

(
,* :try:
,* :learn:
,* :research:
,* :build:
,* :buy:
,* :track:
,* :process:
,* :read:
,* :indepth:
,* :idea:
,* :fact:
,* :project:
,* :area:
,* :habit:
,* :work:
,* :def:
,* :#bici:
,* :#bluebox:
,* :#carbon:
,* :#fad9:
,* :#kia:
,* :#linux_backup:
,* :#movil:
,* :#oculus:
,* :#ordenador_personal:
,* :#ordenador_trabajo:
,* :#orgwiki:
,* :#piano:
,* :#pinephone:
,* :#pinetime_abierto:
,* :#pinetime_sellado:
,* :#rpi3:
,* :#rpi4:
,* :#tablet:
,* :#walkman:
,* :argumentos:
,* :arima:
,* :art:
,* :arxiv:
,* :bash:
,* :book:
,* :calendario:
,* :code:
,* :comida:
,* :complex_systems:
,* :computer:
,* :debate:
,* :def:
,* :devops:
,* :distraccion:
,* :docker:
,* :dokuwiki:
,* :dynamical_systems:
,* :economy:
,* :endofnotes:
,* :engineering:
,* :esp:
,* :essential:
,* :example:
,* :filosofía:
,* :gambling:
,* :git:
,* :habit:
,* :holografía:
,* :jazz:
,* :kaizen:
,* :key:
,* :learn:
,* :left_right:
,* :lifestyle:
,* :limpieza:
,* :links:
,* :linux:
,* :lluvia:
,* :long:
,* :manos:
,* :mantenimiento:
,* :mapas:
,* :marco_tavora:
,* :maths:
,* :meeting:
,* :mejora_personal:
,* :mejora_profesional:
,* :meta:
,* :misc:
,* :ml_physics:
,* :music:
,* :new:
,* :nth:
,* :official:
,* :opinion:
,* :orgwiki:
,* :overengineering:
,* :pandas:
,* :physics:
,* :private:
,* :productivity:
,* :project:
,* :psicology:
,* :python:
,* :qft:
,* :qm:
,* :quantum_computers:
,* :quantum_thermo:
,* :quote:
,* :receta:
,* :relaciones:
,* :research:
,* :robotics:
,* :science:
,* :software_architecture:
,* :statistics:
,* :streaming:
,* :tag:
,* :tareas:
,* :template:
,* :tendencias:
,* :tests:
,* :tfg:
,* :time_tracking:
,* :urgent:
,* :use:
,* :visualization:
,* :website:
,* :work:
,* :xkcd:
,* :youtube:)

Author: Julian Lopez Carballal

Created: 2023-01-25 Wed 03:31