Remove references to prot-org
I will copy over everything from my own config as and when I need it.
This commit is contained in:
parent
03024fa9d4
commit
416d8242c2
2 changed files with 176 additions and 582 deletions
|
@ -3357,9 +3357,6 @@ done at a specific time, such as coaching sessions ([[#h:f8f06938-0dfe-45c3-b4cf
|
|||
(with-eval-after-load 'org-agenda
|
||||
(appt-activate 1)
|
||||
|
||||
;; NOTE 2021-12-07: In my `prot-org.el' (see further below), I add
|
||||
;; `org-agenda-to-appt' to various relevant hooks.
|
||||
;;
|
||||
;; Create reminders for tasks with a due date when this file is read.
|
||||
(org-agenda-to-appt)))
|
||||
#+end_src
|
||||
|
@ -3433,14 +3430,8 @@ on how I use Org.
|
|||
:map narrow-map
|
||||
("b" . org-narrow-to-block)
|
||||
("e" . org-narrow-to-element)
|
||||
("s" . org-narrow-to-subtree)
|
||||
:map ctl-x-x-map
|
||||
("i" . prot-org-id-headlines)
|
||||
("h" . prot-org-ox-html))
|
||||
("s" . org-narrow-to-subtree))
|
||||
:config
|
||||
;; My custom extras, which I use for the agenda and a few other Org features.
|
||||
(require 'prot-org)
|
||||
|
||||
;;;; general settings
|
||||
(setq org-ellipsis "⮧")
|
||||
(setq org-adapt-indentation nil) ; No, non, nein, όχι!
|
||||
|
@ -3555,10 +3546,6 @@ the capture phase ([[#h:f8f06938-0dfe-45c3-b4cf-996d36cba82d][The =unravel-org.e
|
|||
(setq org-refile-allow-creating-parent-nodes 'confirm)
|
||||
(setq org-refile-use-cache t)
|
||||
(setq org-reverse-note-order nil)
|
||||
;; ;; NOTE 2023-04-07: Leaving this here for demo purposes.
|
||||
;; (setq org-todo-keywords
|
||||
;; '((sequence "TODO(t)" "MAYBE(m)" "WAIT(w@/!)" "|" "CANCEL(c@)" "DONE(d!)")
|
||||
;; (sequence "COACH(k)" "|" "COACHED(K!)")))
|
||||
(setq org-todo-keywords
|
||||
'((sequence "TODO(t)" "|" "CANCEL(c@)" "DONE(d!)")))
|
||||
|
||||
|
@ -3639,6 +3626,7 @@ mistakes or figure out intent in the absence of further clarification
|
|||
:CUSTOM_ID: h:da8ce883-7f21-4a6e-a41f-d668ad762b41
|
||||
:END:
|
||||
|
||||
#+begin_quote
|
||||
One of the nice things about Org is its flexible linking mechanism. It
|
||||
can produce links to a variety of file types or buffers and even
|
||||
navigate to a section therein.
|
||||
|
@ -3650,30 +3638,7 @@ file, as documented in the manual. Evaluate this inside of Emacs:
|
|||
#+begin_example emacs-lisp
|
||||
(info "(org) Search Options")
|
||||
#+end_example
|
||||
|
||||
Links to buffers are also common and valuable. For example, we can
|
||||
have a link to a page produced by the ~man~ command, which gives us
|
||||
quick access to the documentation of some program. When Org follows
|
||||
that link, it opens the buffer in the appropriate major mode. For me,
|
||||
the most common scenario is a link to an email, which I typically
|
||||
associate with a task that shows up in my agenda:
|
||||
|
||||
- [[#h:f8f06938-0dfe-45c3-b4cf-996d36cba82d][The =unravel-org.el= Org capture templates (~org-capture~)]]
|
||||
- [[#h:49890997-448e-408d-bebe-2003259bb125][The =unravel-notmuch.el= glue code for ~org-capture~ (=ol-notmuch.el=)]]
|
||||
|
||||
Org supports lots of link types out-of-the-box, though more can be
|
||||
added by packages. My Denote does this: it defines a =denote= link
|
||||
type which behaves the same way as the =file= type except that it uses
|
||||
the identifier of the file instead of its full path (so eve if the
|
||||
file is renamed, the link will work for as long as the identifier
|
||||
remains the same).
|
||||
|
||||
Links can be generated automatically as part of an ~org-capture~
|
||||
template. The command ~org-store-link~ produces one manually, storing
|
||||
it to a special data structure from which it can be retrieved later
|
||||
for insertion with the command ~org-insert-link~. The latter command
|
||||
can also create new links, simply by receiving data that is different
|
||||
from what was already stored.
|
||||
#+end_quote
|
||||
|
||||
I bind ~org-store-link~ in main section of the Org configuration:
|
||||
[[#h:e03df1e0-b43e-49b5-978e-6a511165617c][The =unravel-org.el= section with basic Org settings]].
|
||||
|
@ -3683,8 +3648,6 @@ I bind ~org-store-link~ in main section of the Org configuration:
|
|||
(use-package org
|
||||
:ensure nil
|
||||
:config
|
||||
(require 'prot-org) ; for the above commands
|
||||
|
||||
(setq org-link-context-for-files t)
|
||||
(setq org-link-keep-stored-after-insertion nil)
|
||||
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id))
|
||||
|
@ -3695,19 +3658,7 @@ I bind ~org-store-link~ in main section of the Org configuration:
|
|||
:CUSTOM_ID: h:1f5a0d46-5202-48dd-8048-b48ce17f3df8
|
||||
:END:
|
||||
|
||||
This document benefits from Org's ability to combine prose with code,
|
||||
by placing the latter inside of a block that is delimited by
|
||||
=#+BEGIN_SRC= and =#+END_SRC= lines.
|
||||
|
||||
Code blocks can use the syntax highlighting ("fontification" in Emacs
|
||||
parlance) of a given major mode. They can also have optional
|
||||
parameters passed to their header, which expand the capabilities of
|
||||
the block. For instance, the following code block with my actual
|
||||
configuration uses the fontification of the ~emacs-lisp-mode~ and has
|
||||
a =:tangle= parameter with a value of a file system path. When I
|
||||
invoke the command ~org-babel-tangle~, the contents of this block will
|
||||
be added to that file, creating the file if necessary.
|
||||
|
||||
#+begin_quote
|
||||
More generally, Org is capable of evaluating code blocks and passing
|
||||
their return value to other code blocks. It is thus possible to write
|
||||
a fully fledged program as an Org document. This paradigm is known as
|
||||
|
@ -3736,24 +3687,7 @@ something like the following:
|
|||
;; Settings here
|
||||
)
|
||||
#+end_example
|
||||
|
||||
I seldom need to work with Org Babel, so I do not load any language
|
||||
automatically. Note that Emacs Lisp is loaded by default.
|
||||
|
||||
To evaluate a code block, we type Org's omnipotent =C-c C-c=. The
|
||||
results will be produced below the code block. There is an optional
|
||||
parameter that controls how---or even if---the results are displayed.
|
||||
|
||||
There are many other types of block apart from =SRC=. Those do
|
||||
different things, such as:
|
||||
|
||||
- =#+BEGIN_QUOTE= :: Treat the contents as a block quote or equivalent.
|
||||
- =#+BEGIN_VERSE= :: Do not reflow any like breaks (for poetry and such).
|
||||
- =#+BEGIN_EXPORT= :: Evaluate the code for the given export target
|
||||
(like =html= or =latex=), optionally replacing it with its results
|
||||
or keeping both of them ([[#h:bd11d4d8-6e9f-4536-87a4-4018783bf8f5][The =unravel-org.el= Org export settings]]).
|
||||
|
||||
This is a wonderful world of possibilities!
|
||||
#+end_quote
|
||||
|
||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||
;;;; code blocks
|
||||
|
@ -3774,20 +3708,6 @@ This is a wonderful world of possibilities!
|
|||
:CUSTOM_ID: h:bd11d4d8-6e9f-4536-87a4-4018783bf8f5
|
||||
:END:
|
||||
|
||||
Org is a capable authoring tool in no small part because it can be
|
||||
converted to other file formats. A typical example is to write a
|
||||
technical document in Org and then export it to a PDF. Another
|
||||
use-case is what I commonly do with the Emacs packages I maintain,
|
||||
which I export to an Info manual (texinfo format) and an HTML web
|
||||
page.
|
||||
|
||||
The default set of export targets is specified in the value of the
|
||||
user option ~org-export-backends~. It is one of those rare cases where
|
||||
it has to be evaluated before the package is loaded. Other than that,
|
||||
we can load an export backend by finding the correspond =ox-FORMAT.el=
|
||||
file and either ~require~ it or load it with ~use-package~, like what
|
||||
I showed for Org Babel ([[#h:1f5a0d46-5202-48dd-8048-b48ce17f3df8][The =unravel-org.el= Org code block settings]]).
|
||||
|
||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||
;;;; export
|
||||
(use-package org
|
||||
|
@ -3810,154 +3730,20 @@ I showed for Org Babel ([[#h:1f5a0d46-5202-48dd-8048-b48ce17f3df8][The =unravel-
|
|||
:CUSTOM_ID: h:f8f06938-0dfe-45c3-b4cf-996d36cba82d
|
||||
:END:
|
||||
|
||||
#+begin_quote
|
||||
The ~org-capture~ command allows us to quickly store data in some
|
||||
structured way. This is done with the help of a templating system
|
||||
where we can, for example, record the date the entry was recorded,
|
||||
prompt for user input, automatically use the email's subject as the
|
||||
title of the task, and the like. The documentation string of
|
||||
~org-capture-templates~ covers the technicalities.
|
||||
|
||||
I use two Org files for my tasks. The one is =tasks.org=, which
|
||||
contains the bulk of my entries. The other is =coach.org=, which is
|
||||
specific to my coaching work: https://protesilaos.com/coach.
|
||||
|
||||
The =tasks.org= consists of several top-level headings. Each contains
|
||||
subheadings I need to review. You will notice how most of my
|
||||
entries in ~org-capture-templates~ involve this file. With Org, it is
|
||||
perfectly fine to work in a single file because we can fold headings
|
||||
or narrow to them with ~org-narrow-to-subtree~. Furthermore, we can
|
||||
navigate directly to a heading using minibuffer completion, such as
|
||||
with the general purpose command ~prot-search-outline~
|
||||
([[#h:b902e6a3-cdd2-420f-bc99-3d973c37cd20][The =unravel-search.el= extras provided by the =prot-search.el= library]]).
|
||||
|
||||
Despite the fact that Org copes well with large files, I still choose
|
||||
to keep my coaching work in a separate file as a contingency plan.
|
||||
Because =coach.org= includes information about appointments, I need to
|
||||
be able to read it with ease from anywhere. This includes different
|
||||
types of hardware, but also any kind of generic text editor or
|
||||
terminal pager. I do not want to depend on features like folding,
|
||||
narrowing, and the like, in times when something has gone awry.
|
||||
Granted, this has never happened, though the idea makes sense.
|
||||
Besides, two files are not hard to manage in this case. The
|
||||
=coach.org= has a simple structure: each appointment is stored as a
|
||||
top-level heading.
|
||||
|
||||
As for my workflow, here is an overview:
|
||||
|
||||
- When I want to capture data that I am not yet sure about, I add it
|
||||
to the =tasks.org= "Unprocessed" heading. I periodically review
|
||||
those to decide if I want to do something with them or not. If I do
|
||||
not want them, I delete them. Otherwise, I file them under another
|
||||
heading in the same file using the ~org-refile~ command ([[#h:024dd541-0061-4a10-b10b-b17dcd4794b9][The =unravel-org.el= Org to-do and refile settings]]).
|
||||
Not everything goes into the "Unprocessed" headings, as I often
|
||||
known in advance what an item is about. This is just a fallback for
|
||||
those cases when I need more information to decide on the
|
||||
appropriate action.
|
||||
|
||||
- Tasks that have an inherent time component are given a =SCHEDULED=
|
||||
or =DEADLINE= timestamp (set those on demand with the commands
|
||||
~org-schedule~ and ~org-deadline~, respectively). These are the only
|
||||
tasks I want to see on my daily agenda ([[#h:7fe87b83-2815-4617-a5f9-d3417dd9d248][The =unravel-org.el= Org agenda settings]]).
|
||||
The difference between =SCHEDULED= and =DEADLINE= is that the former
|
||||
has no strict start or end time and so is flexible, while the latter
|
||||
is more rigid. For example, "visit the vet today" does not have a
|
||||
strict time associated with it because the doctor often deals with
|
||||
emergency situations and thus their agenda is fluid. While a
|
||||
coaching session of mine like "work on Emacs with PERSON" has to
|
||||
start at the agreed upon time.
|
||||
|
||||
- I do not arbitrarily assign timestamps to tasks. If something does
|
||||
not have a scheduled date or a deadline, then it does not belong on
|
||||
the agenda. Otherwise, those arbitrarily defined "events" accumulate
|
||||
in the agenda and crowd out the actual time-sensitive tasks. As a
|
||||
result, the cognitive load is heavier and things will not be done.
|
||||
So when I want to do something at some point, but have no specific
|
||||
plan for it, I add is to the =tasks.org= "Wishlist". When I have
|
||||
free time, I review my wishlist and pick something to work on from
|
||||
there depending on my available time and mood. This keeps my
|
||||
workflow both focused and stress-free.
|
||||
|
||||
- Finally, my =coach.org= only has time-sensitive appointments with a
|
||||
=DEADLINE= associated with them. I organise the rest of my
|
||||
activities in the given day based on those.
|
||||
#+end_quote
|
||||
|
||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||
;;;; capture
|
||||
(use-package org-capture
|
||||
:ensure nil
|
||||
:bind ("C-c c" . org-capture)
|
||||
:config
|
||||
(require 'prot-org)
|
||||
|
||||
(setq org-capture-templates
|
||||
`(("u" "Unprocessed" entry
|
||||
(file+headline "tasks.org" "Unprocessed")
|
||||
,(concat "* %^{Title}\n"
|
||||
":PROPERTIES:\n"
|
||||
":CAPTURED: %U\n"
|
||||
":END:\n\n"
|
||||
"%a\n%i%?")
|
||||
:empty-lines-after 1)
|
||||
;; ("e" "Email note (unprocessed)" entry ; Also see `org-capture-templates-contexts'
|
||||
;; (file+headline "tasks.org" "Unprocessed")
|
||||
;; ,(concat "* TODO %:subject :mail:\n"
|
||||
;; ":PROPERTIES:\n"
|
||||
;; ":CAPTURED: %U\n"
|
||||
;; ":END:\n\n"
|
||||
;; "%a\n%i%?")
|
||||
;; :empty-lines-after 1)
|
||||
("w" "Add to the wishlist (may do some day)" entry
|
||||
(file+headline "tasks.org" "Wishlist")
|
||||
,(concat "* %^{Title}\n"
|
||||
":PROPERTIES:\n"
|
||||
":CAPTURED: %U\n"
|
||||
":END:\n\n"
|
||||
"%a%?")
|
||||
:empty-lines-after 1)
|
||||
("c" "Clock in and do immediately" entry
|
||||
(file+headline "tasks.org" "Clocked tasks")
|
||||
,(concat "* TODO %^{Title}\n"
|
||||
":PROPERTIES:\n"
|
||||
":EFFORT: %^{Effort estimate in minutes|5|10|15|30|45|60|90|120}\n"
|
||||
":END:\n\n"
|
||||
"%a\n")
|
||||
:prepend t
|
||||
:clock-in t
|
||||
:clock-keep t
|
||||
:immediate-finish t
|
||||
:empty-lines-after 1)
|
||||
("t" "Time-sensitive task" entry
|
||||
(file+headline "tasks.org" "Tasks with a date")
|
||||
,(concat "* TODO %^{Title} %^g\n"
|
||||
"%^{How time sensitive it is||SCHEDULED|DEADLINE}: %^t\n"
|
||||
":PROPERTIES:\n"
|
||||
":CAPTURED: %U\n"
|
||||
":END:\n\n"
|
||||
"%a%?")
|
||||
:empty-lines-after 1)
|
||||
("p" "Private lesson or service" entry
|
||||
(file "coach.org")
|
||||
#'prot-org-capture-coach
|
||||
:prepend t
|
||||
:empty-lines 1)
|
||||
("P" "Private service clocked" entry
|
||||
(file+headline "coach.org" "Clocked services")
|
||||
#'prot-org-capture-coach-clock
|
||||
:prepend t
|
||||
:clock-in t
|
||||
:clock-keep t
|
||||
:immediate-finish t
|
||||
:empty-lines 1)))
|
||||
|
||||
;; NOTE 2024-11-10: I realised that I was not using this enough, so
|
||||
;; I decided to simplify my setup. Keeping it here, in case I need
|
||||
;; it again.
|
||||
|
||||
;; (setq org-capture-templates-contexts
|
||||
;; '(("e" ((in-mode . "notmuch-search-mode")
|
||||
;; (in-mode . "notmuch-show-mode")
|
||||
;; (in-mode . "notmuch-tree-mode")))))
|
||||
)
|
||||
:bind ("C-c c" . org-capture))
|
||||
#+end_src
|
||||
|
||||
** The =unravel-org.el= Org agenda settings
|
||||
|
@ -3968,80 +3754,15 @@ As for my workflow, here is an overview:
|
|||
[ Watch Prot's talk: [[https://protesilaos.com/codelog/2021-12-09-emacs-org-block-agenda/][Demo of my custom Org block agenda]] (2021-12-09). It has
|
||||
changed a bit since then, but the idea is the same. ]
|
||||
|
||||
With the Org agenda, we can visualise the tasks we have collected in
|
||||
our Org files or, more specifically, in the list of files specified in
|
||||
the user option ~org-agenda-files~. In my workflow, only the files in
|
||||
the ~org-directory~ can feed data into the agenda. Though Org provides
|
||||
commands to add/remove the current file on demand: ~org-remove-file~,
|
||||
and ~org-agenda-file-to-front~. If I ever need to write a task that is
|
||||
specific to a certain file or buffer, then I use Org's linking
|
||||
mechanism to point to the relevant context, but otherwise store my
|
||||
task in the usual place ([[#h:f8f06938-0dfe-45c3-b4cf-996d36cba82d][The =unravel-org.el= Org capture templates (~org-capture~)]]).
|
||||
|
||||
By default, Org provides many so-called "views" for the agenda. One of
|
||||
the them is the daily/weekly agenda. Others show only the headings
|
||||
with =TODO= keywords, or some other kind of search criteria. I
|
||||
personally never use those views. I have my own custom agenda view,
|
||||
which consolidates in a single buffer the following blocks on data, in
|
||||
this order ([[#h:9974eac8-2167-45c4-90e0-12dd877403da][The =prot-org.el= library]]).:
|
||||
|
||||
- Important tasks without a date :: When I add a top priority to
|
||||
something, but there is no inherent deadline to it.
|
||||
|
||||
- Pending scheduled tasks :: Tasks with a =SCHEDULED= date may
|
||||
sometimes not be done when they ought to. So they need to be closer
|
||||
to the top for me to do them as soon as I can.
|
||||
|
||||
- Today's agenda :: What I am actually working on. Because I only
|
||||
assign a timestamp to tasks that are indeed time-sensitive, this
|
||||
always reflects the commitments I have for the day.
|
||||
|
||||
- Next three days :: Like the above, but for the near future.
|
||||
|
||||
- Upcoming deadlines (+14d) :: These are the deadlines I need to be
|
||||
aware of for the 14 days after the next three days I am only
|
||||
informed about.
|
||||
|
||||
The Org agenda has lots of other extras, such as to filter the view.
|
||||
Though I never use them. My custom agenda does exactly what I need
|
||||
from it and thus keeps me focused.
|
||||
|
||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||
;;;; agenda
|
||||
(use-package org-agenda
|
||||
:ensure nil
|
||||
:bind
|
||||
;; I bind `org-agenda' to C-c A, so this one puts me straight into my
|
||||
;; custom block agenda.
|
||||
( :map global-map
|
||||
("C-c A" . org-agenda)
|
||||
("C-c a" . (lambda ()
|
||||
"Call Org agenda with `prot-org-custom-daily-agenda' configuration."
|
||||
(interactive)
|
||||
(org-agenda nil "A"))))
|
||||
("C-c a" . org-agenda)
|
||||
:config
|
||||
;;;;; Custom agenda blocks
|
||||
|
||||
(setq org-agenda-format-date #'prot-org-agenda-format-date-aligned)
|
||||
|
||||
;; Check the variable `prot-org-custom-daily-agenda' in prot-org.el
|
||||
(setq org-agenda-custom-commands
|
||||
`(("A" "Daily agenda and top priority tasks"
|
||||
,prot-org-custom-daily-agenda
|
||||
((org-agenda-fontify-priorities nil)
|
||||
(org-agenda-prefix-format " %t %s")
|
||||
(org-agenda-dim-blocked-tasks nil)))
|
||||
("P" "Plain text daily agenda and top priorities"
|
||||
,prot-org-custom-daily-agenda
|
||||
((org-agenda-with-colors nil)
|
||||
(org-agenda-prefix-format "%t %s")
|
||||
(org-agenda-current-time-string ,(car (last org-agenda-time-grid)))
|
||||
(org-agenda-fontify-priorities nil)
|
||||
(org-agenda-remove-tags t))
|
||||
("agenda.txt"))))
|
||||
|
||||
;;;;; Basic agenda setup
|
||||
(setq org-default-notes-file (make-temp-file "emacs-org-notes-")) ; send it to oblivion
|
||||
(setq org-agenda-files `(,org-directory))
|
||||
(setq org-agenda-span 'week)
|
||||
(setq org-agenda-start-on-weekday 1) ; Monday
|
||||
|
@ -4211,20 +3932,11 @@ from it and thus keeps me focused.
|
|||
)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||
(use-package prot-coach
|
||||
:ensure nil
|
||||
:commands (prot-coach-done-sessions-with-person))
|
||||
#+end_src
|
||||
|
||||
** The =unravel-org.el= call to ~provide~
|
||||
** Finally, we provide the =unravel-org.el= module
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:62eb7ca3-2f79-45a6-a018-38238b486e98
|
||||
:END:
|
||||
|
||||
Finally, we ~provide~ the module. This is the mirror function of
|
||||
~require~ ([[#h:e6c4acf5-5b51-4b38-a86a-bf3f698ac872][The init.el final part to load the individual modules]]).
|
||||
|
||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||
(provide 'unravel-org)
|
||||
#+end_src
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
(with-eval-after-load 'org-agenda
|
||||
(appt-activate 1)
|
||||
|
||||
;; NOTE 2021-12-07: In my `prot-org.el' (see further below), I add
|
||||
;; `org-agenda-to-appt' to various relevant hooks.
|
||||
;;
|
||||
;; Create reminders for tasks with a due date when this file is read.
|
||||
(org-agenda-to-appt)))
|
||||
|
||||
|
@ -71,14 +68,8 @@
|
|||
:map narrow-map
|
||||
("b" . org-narrow-to-block)
|
||||
("e" . org-narrow-to-element)
|
||||
("s" . org-narrow-to-subtree)
|
||||
:map ctl-x-x-map
|
||||
("i" . prot-org-id-headlines)
|
||||
("h" . prot-org-ox-html))
|
||||
("s" . org-narrow-to-subtree))
|
||||
:config
|
||||
;; My custom extras, which I use for the agenda and a few other Org features.
|
||||
(require 'prot-org)
|
||||
|
||||
;;;; general settings
|
||||
(setq org-ellipsis "⮧")
|
||||
(setq org-adapt-indentation nil) ; No, non, nein, όχι!
|
||||
|
@ -126,10 +117,6 @@
|
|||
(setq org-refile-allow-creating-parent-nodes 'confirm)
|
||||
(setq org-refile-use-cache t)
|
||||
(setq org-reverse-note-order nil)
|
||||
;; ;; NOTE 2023-04-07: Leaving this here for demo purposes.
|
||||
;; (setq org-todo-keywords
|
||||
;; '((sequence "TODO(t)" "MAYBE(m)" "WAIT(w@/!)" "|" "CANCEL(c@)" "DONE(d!)")
|
||||
;; (sequence "COACH(k)" "|" "COACHED(K!)")))
|
||||
(setq org-todo-keywords
|
||||
'((sequence "TODO(t)" "|" "CANCEL(c@)" "DONE(d!)")))
|
||||
|
||||
|
@ -169,8 +156,6 @@
|
|||
(use-package org
|
||||
:ensure nil
|
||||
:config
|
||||
(require 'prot-org) ; for the above commands
|
||||
|
||||
(setq org-link-context-for-files t)
|
||||
(setq org-link-keep-stored-after-insertion nil)
|
||||
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id))
|
||||
|
@ -205,115 +190,16 @@
|
|||
;;;; capture
|
||||
(use-package org-capture
|
||||
:ensure nil
|
||||
:bind ("C-c c" . org-capture)
|
||||
:config
|
||||
(require 'prot-org)
|
||||
|
||||
(setq org-capture-templates
|
||||
`(("u" "Unprocessed" entry
|
||||
(file+headline "tasks.org" "Unprocessed")
|
||||
,(concat "* %^{Title}\n"
|
||||
":PROPERTIES:\n"
|
||||
":CAPTURED: %U\n"
|
||||
":END:\n\n"
|
||||
"%a\n%i%?")
|
||||
:empty-lines-after 1)
|
||||
;; ("e" "Email note (unprocessed)" entry ; Also see `org-capture-templates-contexts'
|
||||
;; (file+headline "tasks.org" "Unprocessed")
|
||||
;; ,(concat "* TODO %:subject :mail:\n"
|
||||
;; ":PROPERTIES:\n"
|
||||
;; ":CAPTURED: %U\n"
|
||||
;; ":END:\n\n"
|
||||
;; "%a\n%i%?")
|
||||
;; :empty-lines-after 1)
|
||||
("w" "Add to the wishlist (may do some day)" entry
|
||||
(file+headline "tasks.org" "Wishlist")
|
||||
,(concat "* %^{Title}\n"
|
||||
":PROPERTIES:\n"
|
||||
":CAPTURED: %U\n"
|
||||
":END:\n\n"
|
||||
"%a%?")
|
||||
:empty-lines-after 1)
|
||||
("c" "Clock in and do immediately" entry
|
||||
(file+headline "tasks.org" "Clocked tasks")
|
||||
,(concat "* TODO %^{Title}\n"
|
||||
":PROPERTIES:\n"
|
||||
":EFFORT: %^{Effort estimate in minutes|5|10|15|30|45|60|90|120}\n"
|
||||
":END:\n\n"
|
||||
"%a\n")
|
||||
:prepend t
|
||||
:clock-in t
|
||||
:clock-keep t
|
||||
:immediate-finish t
|
||||
:empty-lines-after 1)
|
||||
("t" "Time-sensitive task" entry
|
||||
(file+headline "tasks.org" "Tasks with a date")
|
||||
,(concat "* TODO %^{Title} %^g\n"
|
||||
"%^{How time sensitive it is||SCHEDULED|DEADLINE}: %^t\n"
|
||||
":PROPERTIES:\n"
|
||||
":CAPTURED: %U\n"
|
||||
":END:\n\n"
|
||||
"%a%?")
|
||||
:empty-lines-after 1)
|
||||
("p" "Private lesson or service" entry
|
||||
(file "coach.org")
|
||||
#'prot-org-capture-coach
|
||||
:prepend t
|
||||
:empty-lines 1)
|
||||
("P" "Private service clocked" entry
|
||||
(file+headline "coach.org" "Clocked services")
|
||||
#'prot-org-capture-coach-clock
|
||||
:prepend t
|
||||
:clock-in t
|
||||
:clock-keep t
|
||||
:immediate-finish t
|
||||
:empty-lines 1)))
|
||||
|
||||
;; NOTE 2024-11-10: I realised that I was not using this enough, so
|
||||
;; I decided to simplify my setup. Keeping it here, in case I need
|
||||
;; it again.
|
||||
|
||||
;; (setq org-capture-templates-contexts
|
||||
;; '(("e" ((in-mode . "notmuch-search-mode")
|
||||
;; (in-mode . "notmuch-show-mode")
|
||||
;; (in-mode . "notmuch-tree-mode")))))
|
||||
)
|
||||
:bind ("C-c c" . org-capture))
|
||||
|
||||
;;;; agenda
|
||||
(use-package org-agenda
|
||||
:ensure nil
|
||||
:bind
|
||||
;; I bind `org-agenda' to C-c A, so this one puts me straight into my
|
||||
;; custom block agenda.
|
||||
( :map global-map
|
||||
("C-c A" . org-agenda)
|
||||
("C-c a" . (lambda ()
|
||||
"Call Org agenda with `prot-org-custom-daily-agenda' configuration."
|
||||
(interactive)
|
||||
(org-agenda nil "A"))))
|
||||
("C-c a" . org-agenda)
|
||||
:config
|
||||
;;;;; Custom agenda blocks
|
||||
|
||||
(setq org-agenda-format-date #'prot-org-agenda-format-date-aligned)
|
||||
|
||||
;; Check the variable `prot-org-custom-daily-agenda' in prot-org.el
|
||||
(setq org-agenda-custom-commands
|
||||
`(("A" "Daily agenda and top priority tasks"
|
||||
,prot-org-custom-daily-agenda
|
||||
((org-agenda-fontify-priorities nil)
|
||||
(org-agenda-prefix-format " %t %s")
|
||||
(org-agenda-dim-blocked-tasks nil)))
|
||||
("P" "Plain text daily agenda and top priorities"
|
||||
,prot-org-custom-daily-agenda
|
||||
((org-agenda-with-colors nil)
|
||||
(org-agenda-prefix-format "%t %s")
|
||||
(org-agenda-current-time-string ,(car (last org-agenda-time-grid)))
|
||||
(org-agenda-fontify-priorities nil)
|
||||
(org-agenda-remove-tags t))
|
||||
("agenda.txt"))))
|
||||
|
||||
;;;;; Basic agenda setup
|
||||
(setq org-default-notes-file (make-temp-file "emacs-org-notes-")) ; send it to oblivion
|
||||
(setq org-agenda-files `(,org-directory))
|
||||
(setq org-agenda-span 'week)
|
||||
(setq org-agenda-start-on-weekday 1) ; Monday
|
||||
|
@ -482,8 +368,4 @@
|
|||
;; (setq org-habit-show-all-today t)
|
||||
)
|
||||
|
||||
(use-package prot-coach
|
||||
:ensure nil
|
||||
:commands (prot-coach-done-sessions-with-person))
|
||||
|
||||
(provide 'unravel-org)
|
||||
|
|
Loading…
Reference in a new issue