practical.org.el
practical.org.el copied to clipboard
A simple, all-in-one workflow system for regular Emacs. Includes a useful GTD system (Getting Things Done), time management system, habit management system, contact management system, Zettelkasten, a...
#+CAPTION: Screenshot #+NAME: fig:SCREENSHOT [[docs/screenshot.png]]
-
practical.org.el All-in-one pragmatic workflow system for vanilla Emacs that just works. Includes a practical GTD system (Getting Things Done), Time management system, Habit management system, Contact management system, Zettelkasten and mobile app synchronization out-of-the box.
-
Motivation
I'd like to create a GTD+Zettelkasten workflow system that is lightweight, simple and practical, using only vanilla Emacs and that caters to exactly what I need for my day-to-day tasks.
I have explored and personally used several GTD system, and found them to be overly complex for my needs.
The workflow configuration aims to have a practical GTD system using only vanilla Emacs without any unnecessary packages to be usable.
In addition to GTD workflow, the setup also includes Zettelkasten, Contact Management and Habit Management systems out-of-the box.
There is one custom package that can be installed via MELPA/ELPA to support CMS which is the =bbdb= v3 package. The package are optional, and the configuration will work without it but the CMS menus in the org-capture menu will not appear.
- Installation
To install, add the following line to your =init.el= file. You will need to change the org-directory depending to your liking. Also, specify the full path pointing to the =practical.org.el= file.
#+BEGIN_SRC bash
Clone the repository
git clone https://github.com/jjuliano/practical.org.el.git ~/.emacs.d/pkgs/practical.org.el
Append the following lines to your init.el file
cat << EOF >> ~/.emacs.d/init.el ;; org directory (setq org-directory "~/Documents/Emacs/org")
;; mobile-org directory (setq org-mobile-directory (expand-file-name "~/Dropbox/Apps/MobileOrg"))
;; 12 hours format (setq org-timestamp-12-hours t)
;; hide all non scheduled items from agenda view (setq org-hide-all-non-scheduled-items t)
;; don's source the tags/context from the context.txt file (setq org-disable-context-file t)
;; practical.org.el GTD+Zettelkasten workflow (setq practical-org-mode-el (expand-file-name "~/.emacs.d/pkgs/practical.org.el/practical.org.el")) (load-file practical-org-mode-el) EOF #+END_SRC
Next, copy the included files to your org-directory. See [[#included-org-files][Included org files]] for more details. You also need to create the "notes/" directory for your Zettelkasten notes. See [[#zettelkasten][Zettelkasten]] for more details.
#+BEGIN_SRC bash
Make sure that the org directory & the zettelkasten notes directory are created
mkdir -p ~/Documents/Emacs/org/notes
Copy the included files into the org directory
cp ~/.emacs.d/pkgs/practical.org.el/files/*.{txt,org} ~/Documents/Emacs/org/. #+END_SRC
Then start Emacs then press =C-c=. You will be presented with the org-capture menu, and type the first letter.
You might want to install the =bbdb= package for [[#contact-management][Contact Management]] feature, to do so, just type =M-x package-install= then type =bbdb=. Restart Emacs then you will be presented with the CMS menu when you press =C-c=.
** Included org files
This workflow configuration uses a predefined parent nodes. The suggested org files templates are found in the =files/= directory. Just copy those files to your org-directory.
In addition to the org-files, a =context.txt= file can also be found which contains all the system-wide tags and context that you can use in the org file.
- Settings
There are several variables settings that you can change the behaviour of this configuration. They are the =org-timestamp-12-hours=, =org-disable-context-file= and =org-hide-all-non-scheduled-items=.
** 12 hours or 24 hours time format
To choose the timestamp format that will be used in your org-agenda-files, you can define the =org-timestamp-12-hours= variable. A value of =t= will set the current timestamp to use the American style, otherwise, set to =nil= or do not define the variable to set to European time format.
#+BEGIN_SRC lisp ;; Setting this variable to 't' will use the American style (12-hour) timestamp, ;; otherwise if you did not define the variable or set the value to 'nil', it ;; will use the default European (24-hour) timestamp. (setq org-timestamp-12-hours t) #+END_SRC
** Hide all non-scheduled items in Agenda view
The default behavior is all non-scheduled items such as =inbox=, and =notes=, will be shown in the Agenda view. This allows you to see all the items created on that particular timestamp. To hide all the non-scheduled items in agenda view, set the =org-hide-all-non-scheduled-items= to =t=.
#+BEGIN_SRC lisp ;; Setting this variable to 't' will hide all the non-scheduled items such as ;; 'inbox' and 'notes'. If you did not define the variable, or set the value of ;; this variable to 'nil', it will show all items in the Agenda view. (setq org-hide-all-non-scheduled-items t) #+END_SRC
** Use context file
You can add/remove/edit context and tags in a =context.txt= file. This file will be sourced to contain all the additional context/tags that you can use in your org entries. To disable this feature, set the =org-disable-context-file=, or don't create the =context.txt= file.
#+BEGIN_SRC lisp ;; Setting this variable to 't' will disable sourcing all the context/tags from ;; the context file. If you did not create this file, or set the value of ;; this variable to 't', it will use the tags defined on per-file basis (setq org-disable-context-file t) #+END_SRC
- Features
** Org-Capture Menu
You start by opening the capture menu. On this menu, you can select the GTD or Zettelkasten actions that you want to do. Here are all the actions that will be presented in the capture menu. Org agenda can be opened by pressing =C-c a=.
| Action | Description | File | Keystroke |
|---------------------+-------------------------------------------------+--------------------------------+------------------|
| Inbox | Add new inbox item | inbox.org | C-c c i or C-c i |
| One Step Task | Create a single step task | projects.org/One Step Tasks | C-c c T or C-c T |
| Meeting | Create new Scheduled meeting item | agenda.org/Recurring | C-c c m |
| Recurring Meeting | Create a new recurring meeting item | agenda.org/Meeting | C-c c r |
| Routine | Create a new routine item | projects.org/Recurring/Routine | C-c c R |
| Habit | Create a new habit item | projects.org/Recurring/Habit | C-c c h |
| Note | Create a new note entry to notes.org | notes.org | C-c c n |
| Brain dump | Create a note as a new org file | notes/
** Recurring Agenda, Routine and Habit/Goal items
Recurring, Routine and Habit items are repeating scheduled items that will appear in the agenda view. The capture menu has a pre-defined schedule value.
| Type | Description | Initial State | Pre-defined schedules | File | |-------------------+------------------------------------+-------------------------------+-----------------------+--------------------------------| | Recurring Meeting | Meeting schedules | MEETING/APPOINTMENT/CANCELLED | Every day | agenda.org/Recurring | | Routine | Tasks that needs to do repeatedly | TODO/NEXT | Every day | projects.org/Recurring/Routine | | Habit | Repeated tasks with a visual graph | HABIT/GOAL/REFLECTION | 2 to 4 days | projects.org/Recurring/Habit |
Habit tasks will begin counting on the start date, and on completion, =DONE= habits will switch back to =TODO=, logging the time it is switched to =DONE= to the =LOGBOOK= drawer.
*** Habits
There are two types of Habits, =Achievement Goal= and =Habit Goal=.
Achievement goals are =Results-based=, while Habit goals are =Process-oriented=.
You can create an achievement or an habit item, which will be tagged as either =GOAL= or =HABIT=.
The location will also be prompted, which will serve as to where you are going to perform the habit. Location will be stored in the =:LOCATION:= drawer.
**** Achievement Goal
Achievement goals are habit items with a deadline and will be closed after a deadline is passed. Think of achievement goal as a one-time deal that you don't want to repeat.
To set a deadline on a habit item, type =C-c C-d=.
Achievement items can also be the resulting goal of an habit item.
**** Habit Goal
An important thing to remember in Habits is that you need to think of the 3 W's, the What, When and Where.
If your achievement goal is to "Loose weight", then your habit item will have a title of "Jogging 30 mins a day", scheduled "every 7AM" in the morning, with a location of "At the park".
**** Refinement Habit
You might also want to create a refinement habit, which you can create with a tag =REFINEMENT= habit type. Refinement habit allows you to re-evaluate your goals, and see and adjust it to fit you.
**** Missing a Streak
It is important to keep a streak of your habits in a consecutive intervals, however, there are instances that you might miss your goals. Missed goals have a visual graph highlighted in RED. Keep a positive hopeful attitude when you missed your goals so you can go back to it again with determination, be reasonable about it. With a recurring refinement habit, you can re-evaluate all your goals so that they "works for you" instead of "against you".
** Zettelkasten
Zettelkasten is a note taking method where notes are grouped together with similar tags. The way the configuration implement Zettelkasten is using the built-in tags property, which will be asked each time you create a new note or a brain dump.
To search for all the tags, press =C-c c t or C-c t=, then you can press =TAB= to expand all the tags from all the agenda files and =note/*.org= files. After selecting the tag, it will present a list of all files associated with those tags. To open the selected file, press =TAB=.
You can also create a new brain dump note on the current point by pressing the =C-c c N or C-c N=, which will create a new org file, with the current buffer or point. The URL of the point or buffer will be stored in the =:LOCATION:= drawer property, which you can visit via =C-c C-o= to visit the referring file and point.
** Contact Management
If you installed the =bbdb= version 3 package (The Insidious Big Brother Database), the capture menu will have additional items, namely:
| Action | Description | Keystroke | |----------------+----------------------------+-----------| | All Contacts | Show all contacts | C-c c C | | New Contact | Create a new contact | C-c c c | | Search Contact | Regexp search all contacts | C-c c s |
*** bbdb-mode keystrokes
While on =bbdb= window, you can add, remove, insert entries and copy each contacts. Here are the most useful =bbdb= keystrokes, note that they don't require the control keys to be pressed.
| Action | Description | Keystroke | |--------+----------------------+-----------| | Create | Create a new contact | c | | Edit | Edit contact | e | | Insert | Insert a line | i | | Copy | Copy the contact | Cr | | Save | Save the contact | s |
*** bbdb link
To link to a BBDB record, just create a link in your org-files with the following format:
#+BEGIN_SRC org [[bbdb:Joel Bryan Juliano]] #+END_SRC
To visit this =bbdb= record, just type =C-c C-o=.
- Workflow
For most workflow, everything starts with an =inbox=. You can start your day with filing up the =inbox= items and refiling them into =projects= or =agenda=.
Each item will be prompted for an initial state, and each item state has it's own progressions.
Here's the table of the initial states. Changing states can be performed via =C-c C-t=.
** GTD states
Inbox items starts with a =TODO=, then each states can be toggled to =NEXT=, =DOING= and =DONE=. Toggle the task to =WAITING= if the task is awaiting dependency, or =ARCHIVE= to completely hide it from agenda view, see [[Archive items]] for more information on archiving.
| State | Description | |---------+--------------------------------------------------| | TODO | Starting state | | NEXT | Next priority item to begin working | | DOING | Currently doing / Work in progress | | DONE | Mark as done (ignored in agenda view) | | WAITING | Awaiting dependency task or being hold | | ARCHIVE | Tag as archive the item (ignored in agenda view) |
** Other states
Other states are useful to provide more information about the task. Additional metadata and properties will be added If it is created via org-capture =C-c c=.
| State | Description | |------------------------------------+-------------------------------------------------| | REVIEW/FEEDBACK | Item is being reviewed or awaiting feedback | | BLOCKED/CANCELLED/POSTPONED/CLOSED | Item is blocked, cancelled, postponed or closed | | MEETING/APPOINTMENT | Meeting or Appointment agenda | | NOTE/TITLE/REFERENCE/SUBJECT | Note item |
- Archive items
Over time, you can accumulate items that can clutter your agenda files. You can clear up your todo/agenda items by archiving them.
There are 2 ways to archive an item.
- If you set the item tag as =ARCHIVE=, it will be ignored in the agenda view.
- Permanently move the item to archive by pressing =C-c C-x C-a=.
Number 2 will move the item into a =.org_archive= file, which will not be displayed in the org agenda.
To toggle the display of all the archived files in org agenda, press =C-c a n v a=. Take note that =DONE= archived items will not be shown, you would need to press =C-c a t= then select =DONE= then =r=.
- Refiling
Items can be refiled to and from the agenda files. To refile an item press =C-c C-w=. This configuration can refile to an org agenda file with a parent heading at the same time. If the heading does not exist, it will be created.
- Scheduling, Prioritization, Context and Time management
There are variety of ways to provide more information on an item, such as it's prioritization, schedule, context, time spent and effort on an item.
This section, we'll discuss how to set priority, context, estimated efforts and keep a record on time spent on an item.
** Prioritization
Items can be prioritized by pressing =C-c ,= or =S-
** Estimated Effort
Effort estimation helps with planning the required time to perform the task. With estimated effort, it will give you an idea what is the initial perceived time to consume on an item.
To estimate the effort on an item, press =C-c C-x e=, which will present a prompt to ask about the estimated time on the item. There are predefined effort on each org agenda files. Press =<TAB>= to display all the predefined time.
** Context
Like Tags, items can have context that will help you get more information where those items are associated. By GTD convention, context is a tag that starts with an =@=. There are predefined contexts per each org agenda files, such as =@home=, =@work=, =@mail=, =@comp= and =@web=. You can add additional contexts by modifying the =#+TAGS:= line on top of each agenda file.
If you have a =context.txt= file in your org-directory, it will source this file instead. There is a capture menu item that edit this file. To edit this file, press =C-c c E or C-c E=. See the sample =context.txt= file in the =files/= directory.
To add a context on an item, press =C-c C-c=, then select the context of the item, which will be added to the item's existing tags.
** Scheduling, Deadlines and Time Management
Items can be scheduled to a date or with a time which will appear significantly in the agenda view as =Scheduled:=. To schedule an item, press =C-c C-s=.
You can also set a deadline on an item by pressing =C-c C-d=, which will display a =Deadline:= line in the agenda view.
Those information presented in the agenda view will help you plan, focus and prioritize on the item.
Another time management feature that you add to the item is using the =Clock in/out= functionality, which can give your item more information on how much time did you spend on it. =Clocked in= items are highlighted in the agenda view and will disappear when =Clocked out=. To clock-in or out the item, press =C-c C-x C-i= and =C-c C-x C-o=. Times and it's sum will be logged in the =LOGBOOK= drawer.
- Mobile Org
If you want to sync your org agenda files to your mobile apps such as [[https://mobileorg.github.io/][MobileOrg]], [[https://beorgapp.com/][beOrg]], [[http://www.orgzly.com/][Orgzly]], etc. All you need to do is set the =org-mobile-directory= pointing to your mobile sync directory, and the configuration will setup an idle timer sync every 5 minutes.