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
|
(with-eval-after-load 'org-agenda
|
||||||
(appt-activate 1)
|
(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.
|
;; Create reminders for tasks with a due date when this file is read.
|
||||||
(org-agenda-to-appt)))
|
(org-agenda-to-appt)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -3433,14 +3430,8 @@ on how I use Org.
|
||||||
:map narrow-map
|
:map narrow-map
|
||||||
("b" . org-narrow-to-block)
|
("b" . org-narrow-to-block)
|
||||||
("e" . org-narrow-to-element)
|
("e" . org-narrow-to-element)
|
||||||
("s" . org-narrow-to-subtree)
|
("s" . org-narrow-to-subtree))
|
||||||
:map ctl-x-x-map
|
|
||||||
("i" . prot-org-id-headlines)
|
|
||||||
("h" . prot-org-ox-html))
|
|
||||||
:config
|
:config
|
||||||
;; My custom extras, which I use for the agenda and a few other Org features.
|
|
||||||
(require 'prot-org)
|
|
||||||
|
|
||||||
;;;; general settings
|
;;;; general settings
|
||||||
(setq org-ellipsis "⮧")
|
(setq org-ellipsis "⮧")
|
||||||
(setq org-adapt-indentation nil) ; No, non, nein, όχι!
|
(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-allow-creating-parent-nodes 'confirm)
|
||||||
(setq org-refile-use-cache t)
|
(setq org-refile-use-cache t)
|
||||||
(setq org-reverse-note-order nil)
|
(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
|
(setq org-todo-keywords
|
||||||
'((sequence "TODO(t)" "|" "CANCEL(c@)" "DONE(d!)")))
|
'((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
|
:CUSTOM_ID: h:da8ce883-7f21-4a6e-a41f-d668ad762b41
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
One of the nice things about Org is its flexible linking mechanism. It
|
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
|
can produce links to a variety of file types or buffers and even
|
||||||
navigate to a section therein.
|
navigate to a section therein.
|
||||||
|
@ -3650,30 +3638,7 @@ file, as documented in the manual. Evaluate this inside of Emacs:
|
||||||
#+begin_example emacs-lisp
|
#+begin_example emacs-lisp
|
||||||
(info "(org) Search Options")
|
(info "(org) Search Options")
|
||||||
#+end_example
|
#+end_example
|
||||||
|
#+end_quote
|
||||||
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.
|
|
||||||
|
|
||||||
I bind ~org-store-link~ in main section of the Org configuration:
|
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]].
|
[[#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
|
(use-package org
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(require 'prot-org) ; for the above commands
|
|
||||||
|
|
||||||
(setq org-link-context-for-files t)
|
(setq org-link-context-for-files t)
|
||||||
(setq org-link-keep-stored-after-insertion nil)
|
(setq org-link-keep-stored-after-insertion nil)
|
||||||
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id))
|
(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
|
:CUSTOM_ID: h:1f5a0d46-5202-48dd-8048-b48ce17f3df8
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
This document benefits from Org's ability to combine prose with code,
|
#+begin_quote
|
||||||
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.
|
|
||||||
|
|
||||||
More generally, Org is capable of evaluating code blocks and passing
|
More generally, Org is capable of evaluating code blocks and passing
|
||||||
their return value to other code blocks. It is thus possible to write
|
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
|
a fully fledged program as an Org document. This paradigm is known as
|
||||||
|
@ -3736,24 +3687,7 @@ something like the following:
|
||||||
;; Settings here
|
;; Settings here
|
||||||
)
|
)
|
||||||
#+end_example
|
#+end_example
|
||||||
|
#+end_quote
|
||||||
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!
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||||
;;;; code blocks
|
;;;; code blocks
|
||||||
|
@ -3774,20 +3708,6 @@ This is a wonderful world of possibilities!
|
||||||
:CUSTOM_ID: h:bd11d4d8-6e9f-4536-87a4-4018783bf8f5
|
:CUSTOM_ID: h:bd11d4d8-6e9f-4536-87a4-4018783bf8f5
|
||||||
:END:
|
: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"
|
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||||
;;;; export
|
;;;; export
|
||||||
(use-package org
|
(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
|
:CUSTOM_ID: h:f8f06938-0dfe-45c3-b4cf-996d36cba82d
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
The ~org-capture~ command allows us to quickly store data in some
|
The ~org-capture~ command allows us to quickly store data in some
|
||||||
structured way. This is done with the help of a templating system
|
structured way. This is done with the help of a templating system
|
||||||
where we can, for example, record the date the entry was recorded,
|
where we can, for example, record the date the entry was recorded,
|
||||||
prompt for user input, automatically use the email's subject as the
|
prompt for user input, automatically use the email's subject as the
|
||||||
title of the task, and the like. The documentation string of
|
title of the task, and the like. The documentation string of
|
||||||
~org-capture-templates~ covers the technicalities.
|
~org-capture-templates~ covers the technicalities.
|
||||||
|
#+end_quote
|
||||||
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.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||||
;;;; capture
|
;;;; capture
|
||||||
(use-package org-capture
|
(use-package org-capture
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:bind ("C-c c" . org-capture)
|
: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")))))
|
|
||||||
)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** The =unravel-org.el= Org agenda settings
|
** The =unravel-org.el= Org agenda settings
|
||||||
|
@ -3968,263 +3754,189 @@ 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
|
[ 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. ]
|
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"
|
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||||
;;;; agenda
|
;;;; agenda
|
||||||
(use-package org-agenda
|
(use-package org-agenda
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:bind
|
:bind
|
||||||
;; I bind `org-agenda' to C-c A, so this one puts me straight into my
|
("C-c a" . org-agenda)
|
||||||
;; custom block agenda.
|
:config
|
||||||
( :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"))))
|
|
||||||
:config
|
|
||||||
;;;;; Custom agenda blocks
|
|
||||||
|
|
||||||
(setq org-agenda-format-date #'prot-org-agenda-format-date-aligned)
|
;;;;; Basic agenda setup
|
||||||
|
(setq org-agenda-files `(,org-directory))
|
||||||
|
(setq org-agenda-span 'week)
|
||||||
|
(setq org-agenda-start-on-weekday 1) ; Monday
|
||||||
|
(setq org-agenda-confirm-kill t)
|
||||||
|
(setq org-agenda-show-all-dates t)
|
||||||
|
(setq org-agenda-show-outline-path nil)
|
||||||
|
(setq org-agenda-window-setup 'current-window)
|
||||||
|
(setq org-agenda-skip-comment-trees t)
|
||||||
|
(setq org-agenda-menu-show-matcher t)
|
||||||
|
(setq org-agenda-menu-two-columns nil)
|
||||||
|
(setq org-agenda-sticky nil)
|
||||||
|
(setq org-agenda-custom-commands-contexts nil)
|
||||||
|
(setq org-agenda-max-entries nil)
|
||||||
|
(setq org-agenda-max-todos nil)
|
||||||
|
(setq org-agenda-max-tags nil)
|
||||||
|
(setq org-agenda-max-effort nil)
|
||||||
|
|
||||||
;; Check the variable `prot-org-custom-daily-agenda' in prot-org.el
|
;;;;; General agenda view options
|
||||||
(setq org-agenda-custom-commands
|
;; NOTE 2021-12-07: Check further below my `org-agenda-custom-commands'
|
||||||
`(("A" "Daily agenda and top priority tasks"
|
(setq org-agenda-prefix-format
|
||||||
,prot-org-custom-daily-agenda
|
'((agenda . " %i %-12:c%?-12t% s")
|
||||||
((org-agenda-fontify-priorities nil)
|
(todo . " %i %-12:c")
|
||||||
(org-agenda-prefix-format " %t %s")
|
(tags . " %i %-12:c")
|
||||||
(org-agenda-dim-blocked-tasks nil)))
|
(search . " %i %-12:c")))
|
||||||
("P" "Plain text daily agenda and top priorities"
|
(setq org-agenda-sorting-strategy
|
||||||
,prot-org-custom-daily-agenda
|
'(((agenda habit-down time-up priority-down category-keep)
|
||||||
((org-agenda-with-colors nil)
|
(todo priority-down category-keep)
|
||||||
(org-agenda-prefix-format "%t %s")
|
(tags priority-down category-keep)
|
||||||
(org-agenda-current-time-string ,(car (last org-agenda-time-grid)))
|
(search category-keep))))
|
||||||
(org-agenda-fontify-priorities nil)
|
(setq org-agenda-breadcrumbs-separator "->")
|
||||||
(org-agenda-remove-tags t))
|
(setq org-agenda-todo-keyword-format "%-1s")
|
||||||
("agenda.txt"))))
|
(setq org-agenda-fontify-priorities 'cookies)
|
||||||
|
(setq org-agenda-category-icon-alist nil)
|
||||||
|
(setq org-agenda-remove-times-when-in-prefix nil)
|
||||||
|
(setq org-agenda-remove-timeranges-from-blocks nil)
|
||||||
|
(setq org-agenda-compact-blocks nil)
|
||||||
|
(setq org-agenda-block-separator ?—)
|
||||||
|
|
||||||
;;;;; Basic agenda setup
|
;;;;; Agenda marks
|
||||||
(setq org-default-notes-file (make-temp-file "emacs-org-notes-")) ; send it to oblivion
|
(setq org-agenda-bulk-mark-char "#")
|
||||||
(setq org-agenda-files `(,org-directory))
|
(setq org-agenda-persistent-marks nil)
|
||||||
(setq org-agenda-span 'week)
|
|
||||||
(setq org-agenda-start-on-weekday 1) ; Monday
|
|
||||||
(setq org-agenda-confirm-kill t)
|
|
||||||
(setq org-agenda-show-all-dates t)
|
|
||||||
(setq org-agenda-show-outline-path nil)
|
|
||||||
(setq org-agenda-window-setup 'current-window)
|
|
||||||
(setq org-agenda-skip-comment-trees t)
|
|
||||||
(setq org-agenda-menu-show-matcher t)
|
|
||||||
(setq org-agenda-menu-two-columns nil)
|
|
||||||
(setq org-agenda-sticky nil)
|
|
||||||
(setq org-agenda-custom-commands-contexts nil)
|
|
||||||
(setq org-agenda-max-entries nil)
|
|
||||||
(setq org-agenda-max-todos nil)
|
|
||||||
(setq org-agenda-max-tags nil)
|
|
||||||
(setq org-agenda-max-effort nil)
|
|
||||||
|
|
||||||
;;;;; General agenda view options
|
;;;;; Agenda diary entries
|
||||||
;; NOTE 2021-12-07: Check further below my `org-agenda-custom-commands'
|
(setq org-agenda-insert-diary-strategy 'date-tree)
|
||||||
(setq org-agenda-prefix-format
|
(setq org-agenda-insert-diary-extract-time nil)
|
||||||
'((agenda . " %i %-12:c%?-12t% s")
|
(setq org-agenda-include-diary nil)
|
||||||
(todo . " %i %-12:c")
|
;; I do not want the diary, but there is no way to disable it
|
||||||
(tags . " %i %-12:c")
|
;; altogether. This creates a diary file in the /tmp directory.
|
||||||
(search . " %i %-12:c")))
|
(setq diary-file (make-temp-file "emacs-diary-"))
|
||||||
(setq org-agenda-sorting-strategy
|
(setq org-agenda-diary-file 'diary-file) ; TODO 2023-05-20: review Org diary substitute
|
||||||
'(((agenda habit-down time-up priority-down category-keep)
|
|
||||||
(todo priority-down category-keep)
|
|
||||||
(tags priority-down category-keep)
|
|
||||||
(search category-keep))))
|
|
||||||
(setq org-agenda-breadcrumbs-separator "->")
|
|
||||||
(setq org-agenda-todo-keyword-format "%-1s")
|
|
||||||
(setq org-agenda-fontify-priorities 'cookies)
|
|
||||||
(setq org-agenda-category-icon-alist nil)
|
|
||||||
(setq org-agenda-remove-times-when-in-prefix nil)
|
|
||||||
(setq org-agenda-remove-timeranges-from-blocks nil)
|
|
||||||
(setq org-agenda-compact-blocks nil)
|
|
||||||
(setq org-agenda-block-separator ?—)
|
|
||||||
|
|
||||||
;;;;; Agenda marks
|
;;;;; Agenda follow mode
|
||||||
(setq org-agenda-bulk-mark-char "#")
|
(setq org-agenda-start-with-follow-mode nil)
|
||||||
(setq org-agenda-persistent-marks nil)
|
(setq org-agenda-follow-indirect t)
|
||||||
|
|
||||||
;;;;; Agenda diary entries
|
;;;;; Agenda multi-item tasks
|
||||||
(setq org-agenda-insert-diary-strategy 'date-tree)
|
(setq org-agenda-dim-blocked-tasks t)
|
||||||
(setq org-agenda-insert-diary-extract-time nil)
|
(setq org-agenda-todo-list-sublevels t)
|
||||||
(setq org-agenda-include-diary nil)
|
|
||||||
;; I do not want the diary, but there is no way to disable it
|
|
||||||
;; altogether. This creates a diary file in the /tmp directory.
|
|
||||||
(setq diary-file (make-temp-file "emacs-diary-"))
|
|
||||||
(setq org-agenda-diary-file 'diary-file) ; TODO 2023-05-20: review Org diary substitute
|
|
||||||
|
|
||||||
;;;;; Agenda follow mode
|
;;;;; Agenda filters and restricted views
|
||||||
(setq org-agenda-start-with-follow-mode nil)
|
(setq org-agenda-persistent-filter nil)
|
||||||
(setq org-agenda-follow-indirect t)
|
(setq org-agenda-restriction-lock-highlight-subtree t)
|
||||||
|
|
||||||
;;;;; Agenda multi-item tasks
|
;;;;; Agenda items with deadline and scheduled timestamps
|
||||||
(setq org-agenda-dim-blocked-tasks t)
|
(setq org-agenda-include-deadlines t)
|
||||||
(setq org-agenda-todo-list-sublevels t)
|
(setq org-deadline-warning-days 0)
|
||||||
|
(setq org-agenda-skip-scheduled-if-done nil)
|
||||||
|
(setq org-agenda-skip-scheduled-if-deadline-is-shown t)
|
||||||
|
(setq org-agenda-skip-timestamp-if-deadline-is-shown t)
|
||||||
|
(setq org-agenda-skip-deadline-if-done nil)
|
||||||
|
(setq org-agenda-skip-deadline-prewarning-if-scheduled 1)
|
||||||
|
(setq org-agenda-skip-scheduled-delay-if-deadline nil)
|
||||||
|
(setq org-agenda-skip-additional-timestamps-same-entry nil)
|
||||||
|
(setq org-agenda-skip-timestamp-if-done nil)
|
||||||
|
(setq org-agenda-search-headline-for-time nil)
|
||||||
|
(setq org-scheduled-past-days 365)
|
||||||
|
(setq org-deadline-past-days 365)
|
||||||
|
(setq org-agenda-move-date-from-past-immediately-to-today t)
|
||||||
|
(setq org-agenda-show-future-repeats t)
|
||||||
|
(setq org-agenda-prefer-last-repeat nil)
|
||||||
|
(setq org-agenda-timerange-leaders
|
||||||
|
'("" "(%d/%d): "))
|
||||||
|
(setq org-agenda-scheduled-leaders
|
||||||
|
'("Scheduled: " "Sched.%2dx: "))
|
||||||
|
(setq org-agenda-inactive-leader "[")
|
||||||
|
(setq org-agenda-deadline-leaders
|
||||||
|
'("Deadline: " "In %3d d.: " "%2d d. ago: "))
|
||||||
|
;; Time grid
|
||||||
|
(setq org-agenda-time-leading-zero t)
|
||||||
|
(setq org-agenda-timegrid-use-ampm nil)
|
||||||
|
(setq org-agenda-use-time-grid t)
|
||||||
|
(setq org-agenda-show-current-time-in-grid t)
|
||||||
|
(setq org-agenda-current-time-string (concat "Now " (make-string 70 ?.)))
|
||||||
|
(setq org-agenda-time-grid
|
||||||
|
'((daily today require-timed)
|
||||||
|
( 0500 0600 0700 0800 0900 1000
|
||||||
|
1100 1200 1300 1400 1500 1600
|
||||||
|
1700 1800 1900 2000 2100 2200)
|
||||||
|
"" ""))
|
||||||
|
(setq org-agenda-default-appointment-duration nil)
|
||||||
|
|
||||||
;;;;; Agenda filters and restricted views
|
;;;;; Agenda global to-do list
|
||||||
(setq org-agenda-persistent-filter nil)
|
(setq org-agenda-todo-ignore-with-date t)
|
||||||
(setq org-agenda-restriction-lock-highlight-subtree t)
|
(setq org-agenda-todo-ignore-timestamp t)
|
||||||
|
(setq org-agenda-todo-ignore-scheduled t)
|
||||||
|
(setq org-agenda-todo-ignore-deadlines t)
|
||||||
|
(setq org-agenda-todo-ignore-time-comparison-use-seconds t)
|
||||||
|
(setq org-agenda-tags-todo-honor-ignore-options nil)
|
||||||
|
|
||||||
;;;;; Agenda items with deadline and scheduled timestamps
|
;;;;; Agenda tagged items
|
||||||
(setq org-agenda-include-deadlines t)
|
(setq org-agenda-show-inherited-tags t)
|
||||||
(setq org-deadline-warning-days 0)
|
(setq org-agenda-use-tag-inheritance
|
||||||
(setq org-agenda-skip-scheduled-if-done nil)
|
'(todo search agenda))
|
||||||
(setq org-agenda-skip-scheduled-if-deadline-is-shown t)
|
(setq org-agenda-hide-tags-regexp nil)
|
||||||
(setq org-agenda-skip-timestamp-if-deadline-is-shown t)
|
(setq org-agenda-remove-tags nil)
|
||||||
(setq org-agenda-skip-deadline-if-done nil)
|
(setq org-agenda-tags-column -100)
|
||||||
(setq org-agenda-skip-deadline-prewarning-if-scheduled 1)
|
|
||||||
(setq org-agenda-skip-scheduled-delay-if-deadline nil)
|
|
||||||
(setq org-agenda-skip-additional-timestamps-same-entry nil)
|
|
||||||
(setq org-agenda-skip-timestamp-if-done nil)
|
|
||||||
(setq org-agenda-search-headline-for-time nil)
|
|
||||||
(setq org-scheduled-past-days 365)
|
|
||||||
(setq org-deadline-past-days 365)
|
|
||||||
(setq org-agenda-move-date-from-past-immediately-to-today t)
|
|
||||||
(setq org-agenda-show-future-repeats t)
|
|
||||||
(setq org-agenda-prefer-last-repeat nil)
|
|
||||||
(setq org-agenda-timerange-leaders
|
|
||||||
'("" "(%d/%d): "))
|
|
||||||
(setq org-agenda-scheduled-leaders
|
|
||||||
'("Scheduled: " "Sched.%2dx: "))
|
|
||||||
(setq org-agenda-inactive-leader "[")
|
|
||||||
(setq org-agenda-deadline-leaders
|
|
||||||
'("Deadline: " "In %3d d.: " "%2d d. ago: "))
|
|
||||||
;; Time grid
|
|
||||||
(setq org-agenda-time-leading-zero t)
|
|
||||||
(setq org-agenda-timegrid-use-ampm nil)
|
|
||||||
(setq org-agenda-use-time-grid t)
|
|
||||||
(setq org-agenda-show-current-time-in-grid t)
|
|
||||||
(setq org-agenda-current-time-string (concat "Now " (make-string 70 ?.)))
|
|
||||||
(setq org-agenda-time-grid
|
|
||||||
'((daily today require-timed)
|
|
||||||
( 0500 0600 0700 0800 0900 1000
|
|
||||||
1100 1200 1300 1400 1500 1600
|
|
||||||
1700 1800 1900 2000 2100 2200)
|
|
||||||
"" ""))
|
|
||||||
(setq org-agenda-default-appointment-duration nil)
|
|
||||||
|
|
||||||
;;;;; Agenda global to-do list
|
;;;;; Agenda entry
|
||||||
(setq org-agenda-todo-ignore-with-date t)
|
;; NOTE: I do not use this right now. Leaving everything to its
|
||||||
(setq org-agenda-todo-ignore-timestamp t)
|
;; default value.
|
||||||
(setq org-agenda-todo-ignore-scheduled t)
|
(setq org-agenda-start-with-entry-text-mode nil)
|
||||||
(setq org-agenda-todo-ignore-deadlines t)
|
(setq org-agenda-entry-text-maxlines 5)
|
||||||
(setq org-agenda-todo-ignore-time-comparison-use-seconds t)
|
(setq org-agenda-entry-text-exclude-regexps nil)
|
||||||
(setq org-agenda-tags-todo-honor-ignore-options nil)
|
(setq org-agenda-entry-text-leaders " > ")
|
||||||
|
|
||||||
;;;;; Agenda tagged items
|
;;;;; Agenda logging and clocking
|
||||||
(setq org-agenda-show-inherited-tags t)
|
;; NOTE: I do not use these yet, though I plan to. Leaving everything
|
||||||
(setq org-agenda-use-tag-inheritance
|
;; to its default value for the time being.
|
||||||
'(todo search agenda))
|
(setq org-agenda-log-mode-items '(closed clock))
|
||||||
(setq org-agenda-hide-tags-regexp nil)
|
(setq org-agenda-clock-consistency-checks
|
||||||
(setq org-agenda-remove-tags nil)
|
'((:max-duration "10:00" :min-duration 0 :max-gap "0:05" :gap-ok-around
|
||||||
(setq org-agenda-tags-column -100)
|
("4:00")
|
||||||
|
:default-face ; This should definitely be reviewed
|
||||||
|
((:background "DarkRed")
|
||||||
|
(:foreground "white"))
|
||||||
|
:overlap-face nil :gap-face nil :no-end-time-face nil
|
||||||
|
:long-face nil :short-face nil)))
|
||||||
|
(setq org-agenda-log-mode-add-notes t)
|
||||||
|
(setq org-agenda-start-with-log-mode nil)
|
||||||
|
(setq org-agenda-start-with-clockreport-mode nil)
|
||||||
|
(setq org-agenda-clockreport-parameter-plist '(:link t :maxlevel 2))
|
||||||
|
(setq org-agenda-search-view-always-boolean nil)
|
||||||
|
(setq org-agenda-search-view-force-full-words nil)
|
||||||
|
(setq org-agenda-search-view-max-outline-level 0)
|
||||||
|
(setq org-agenda-search-headline-for-time t)
|
||||||
|
(setq org-agenda-use-time-grid t)
|
||||||
|
(setq org-agenda-cmp-user-defined nil)
|
||||||
|
(setq org-agenda-sort-notime-is-late t) ; Org 9.4
|
||||||
|
(setq org-agenda-sort-noeffort-is-high t) ; Org 9.4
|
||||||
|
|
||||||
;;;;; Agenda entry
|
;;;;; Agenda column view
|
||||||
;; NOTE: I do not use this right now. Leaving everything to its
|
;; NOTE I do not use these, but may need them in the future.
|
||||||
;; default value.
|
(setq org-agenda-view-columns-initially nil)
|
||||||
(setq org-agenda-start-with-entry-text-mode nil)
|
(setq org-agenda-columns-show-summaries t)
|
||||||
(setq org-agenda-entry-text-maxlines 5)
|
(setq org-agenda-columns-compute-summary-properties t)
|
||||||
(setq org-agenda-entry-text-exclude-regexps nil)
|
(setq org-agenda-columns-add-appointments-to-effort-sum nil)
|
||||||
(setq org-agenda-entry-text-leaders " > ")
|
(setq org-agenda-auto-exclude-function nil)
|
||||||
|
(setq org-agenda-bulk-custom-functions nil)
|
||||||
|
|
||||||
;;;;; Agenda logging and clocking
|
;; ;;;;; Agenda habits
|
||||||
;; NOTE: I do not use these yet, though I plan to. Leaving everything
|
;; (require 'org-habit)
|
||||||
;; to its default value for the time being.
|
;; (setq org-habit-graph-column 50)
|
||||||
(setq org-agenda-log-mode-items '(closed clock))
|
;; (setq org-habit-preceding-days 9)
|
||||||
(setq org-agenda-clock-consistency-checks
|
;; ;; Always show the habit graph, even if there are no habits for
|
||||||
'((:max-duration "10:00" :min-duration 0 :max-gap "0:05" :gap-ok-around
|
;; ;; today.
|
||||||
("4:00")
|
;; (setq org-habit-show-all-today t)
|
||||||
:default-face ; This should definitely be reviewed
|
)
|
||||||
((:background "DarkRed")
|
|
||||||
(:foreground "white"))
|
|
||||||
:overlap-face nil :gap-face nil :no-end-time-face nil
|
|
||||||
:long-face nil :short-face nil)))
|
|
||||||
(setq org-agenda-log-mode-add-notes t)
|
|
||||||
(setq org-agenda-start-with-log-mode nil)
|
|
||||||
(setq org-agenda-start-with-clockreport-mode nil)
|
|
||||||
(setq org-agenda-clockreport-parameter-plist '(:link t :maxlevel 2))
|
|
||||||
(setq org-agenda-search-view-always-boolean nil)
|
|
||||||
(setq org-agenda-search-view-force-full-words nil)
|
|
||||||
(setq org-agenda-search-view-max-outline-level 0)
|
|
||||||
(setq org-agenda-search-headline-for-time t)
|
|
||||||
(setq org-agenda-use-time-grid t)
|
|
||||||
(setq org-agenda-cmp-user-defined nil)
|
|
||||||
(setq org-agenda-sort-notime-is-late t) ; Org 9.4
|
|
||||||
(setq org-agenda-sort-noeffort-is-high t) ; Org 9.4
|
|
||||||
|
|
||||||
;;;;; Agenda column view
|
|
||||||
;; NOTE I do not use these, but may need them in the future.
|
|
||||||
(setq org-agenda-view-columns-initially nil)
|
|
||||||
(setq org-agenda-columns-show-summaries t)
|
|
||||||
(setq org-agenda-columns-compute-summary-properties t)
|
|
||||||
(setq org-agenda-columns-add-appointments-to-effort-sum nil)
|
|
||||||
(setq org-agenda-auto-exclude-function nil)
|
|
||||||
(setq org-agenda-bulk-custom-functions nil)
|
|
||||||
|
|
||||||
;; ;;;;; Agenda habits
|
|
||||||
;; (require 'org-habit)
|
|
||||||
;; (setq org-habit-graph-column 50)
|
|
||||||
;; (setq org-habit-preceding-days 9)
|
|
||||||
;; ;; Always show the habit graph, even if there are no habits for
|
|
||||||
;; ;; today.
|
|
||||||
;; (setq org-habit-show-all-today t)
|
|
||||||
)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
** Finally, we provide the =unravel-org.el= module
|
||||||
(use-package prot-coach
|
|
||||||
:ensure nil
|
|
||||||
:commands (prot-coach-done-sessions-with-person))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** The =unravel-org.el= call to ~provide~
|
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h:62eb7ca3-2f79-45a6-a018-38238b486e98
|
:CUSTOM_ID: h:62eb7ca3-2f79-45a6-a018-38238b486e98
|
||||||
:END:
|
: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"
|
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-org.el"
|
||||||
(provide 'unravel-org)
|
(provide 'unravel-org)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
@ -37,9 +37,6 @@
|
||||||
(with-eval-after-load 'org-agenda
|
(with-eval-after-load 'org-agenda
|
||||||
(appt-activate 1)
|
(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.
|
;; Create reminders for tasks with a due date when this file is read.
|
||||||
(org-agenda-to-appt)))
|
(org-agenda-to-appt)))
|
||||||
|
|
||||||
|
@ -71,14 +68,8 @@
|
||||||
:map narrow-map
|
:map narrow-map
|
||||||
("b" . org-narrow-to-block)
|
("b" . org-narrow-to-block)
|
||||||
("e" . org-narrow-to-element)
|
("e" . org-narrow-to-element)
|
||||||
("s" . org-narrow-to-subtree)
|
("s" . org-narrow-to-subtree))
|
||||||
:map ctl-x-x-map
|
|
||||||
("i" . prot-org-id-headlines)
|
|
||||||
("h" . prot-org-ox-html))
|
|
||||||
:config
|
:config
|
||||||
;; My custom extras, which I use for the agenda and a few other Org features.
|
|
||||||
(require 'prot-org)
|
|
||||||
|
|
||||||
;;;; general settings
|
;;;; general settings
|
||||||
(setq org-ellipsis "⮧")
|
(setq org-ellipsis "⮧")
|
||||||
(setq org-adapt-indentation nil) ; No, non, nein, όχι!
|
(setq org-adapt-indentation nil) ; No, non, nein, όχι!
|
||||||
|
@ -126,10 +117,6 @@
|
||||||
(setq org-refile-allow-creating-parent-nodes 'confirm)
|
(setq org-refile-allow-creating-parent-nodes 'confirm)
|
||||||
(setq org-refile-use-cache t)
|
(setq org-refile-use-cache t)
|
||||||
(setq org-reverse-note-order nil)
|
(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
|
(setq org-todo-keywords
|
||||||
'((sequence "TODO(t)" "|" "CANCEL(c@)" "DONE(d!)")))
|
'((sequence "TODO(t)" "|" "CANCEL(c@)" "DONE(d!)")))
|
||||||
|
|
||||||
|
@ -169,8 +156,6 @@
|
||||||
(use-package org
|
(use-package org
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(require 'prot-org) ; for the above commands
|
|
||||||
|
|
||||||
(setq org-link-context-for-files t)
|
(setq org-link-context-for-files t)
|
||||||
(setq org-link-keep-stored-after-insertion nil)
|
(setq org-link-keep-stored-after-insertion nil)
|
||||||
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id))
|
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id))
|
||||||
|
@ -205,115 +190,16 @@
|
||||||
;;;; capture
|
;;;; capture
|
||||||
(use-package org-capture
|
(use-package org-capture
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:bind ("C-c c" . org-capture)
|
: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")))))
|
|
||||||
)
|
|
||||||
|
|
||||||
;;;; agenda
|
;;;; agenda
|
||||||
(use-package org-agenda
|
(use-package org-agenda
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:bind
|
:bind
|
||||||
;; I bind `org-agenda' to C-c A, so this one puts me straight into my
|
("C-c a" . org-agenda)
|
||||||
;; 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"))))
|
|
||||||
:config
|
: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
|
;;;;; 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-files `(,org-directory))
|
||||||
(setq org-agenda-span 'week)
|
(setq org-agenda-span 'week)
|
||||||
(setq org-agenda-start-on-weekday 1) ; Monday
|
(setq org-agenda-start-on-weekday 1) ; Monday
|
||||||
|
@ -482,8 +368,4 @@
|
||||||
;; (setq org-habit-show-all-today t)
|
;; (setq org-habit-show-all-today t)
|
||||||
)
|
)
|
||||||
|
|
||||||
(use-package prot-coach
|
|
||||||
:ensure nil
|
|
||||||
:commands (prot-coach-done-sessions-with-person))
|
|
||||||
|
|
||||||
(provide 'unravel-org)
|
(provide 'unravel-org)
|
||||||
|
|
Loading…
Reference in a new issue