Skip to content

Latest commit

 

History

History
2094 lines (1685 loc) · 80.1 KB

org-leuven-agenda-views.txt

File metadata and controls

2094 lines (1685 loc) · 80.1 KB

Org customized views

At the beginning, we’ve put way too many tasks either as scheduled or deadline because the unique interaction with Org mode was via the agenda view, and we did not want to loose some tasks out of our view.

When we add more consolidated views (multi-blocks), we gain confidence that we won’t loose tasks (together with reviews), and we’re finally able to use deadline and scheduled for what they’re meant.

Key bindings

;;; org-leuven-agenda-views.el --- Org customized views

;;; Commentary:

;;; Code:

  (require 'org-agenda)

  ;; Open up the Tasks.
  (global-set-key
    (kbd "C-c T") (kbd "C-c a f . / RET"))

  ;; Display the calendar and tasks for today.
  (global-set-key
    (kbd "<f7>") (kbd "C-c a f ."))

  ;; Display the hotlist.
  (global-set-key
    (kbd "<S-f7>") (kbd "C-c a f h"))

  ;; Display calendar for 7 days.
  (global-set-key
    (kbd "<C-f7>") (kbd "C-c a r c 7"))

  (defconst leuven-org-completed-date-regexp
    (concat " \\("
            "CLOSED: \\[%Y-%m-%d"
            "\\|"
            "- State \"\\(DONE\\|CANX\\)\" * from .* \\[%Y-%m-%d"
            "\\|"
            "- State .* ->  *\"\\(DONE\\|CANX\\)\" * \\[%Y-%m-%d"
            "\\) ")
    "Matches any completion time stamp.")

Description

A scheduled date is a start date.

A deadline is a ultimate finish date. It can have a custom reminder to receive alerts for approaching due dates (in the warning period); it must be updated every time we want to snooze the reminder (once a day, week, month). We can do such an update via C-u C-u C-c C-d.

Vocabulary:

  • SCHEDULED = start time
  • Undated items
  • Planned
  • Uncategorized

Tasks views:

  • Active
  • Starred (= with an explicit priority)
  • Completed
  • Due today (only today)
  • Due this week (only for current week: from Monday to Sunday included)
  • Late (all overdue + today)
  • Assigned to me
  • Created by me
  • With files attached

Sorted by:

  • Creation date
  • Last changed (= default)
  • Project
  • Creator
  • Deadline
  • Priority
  • Title

Ordered by:

  • Asc
  • Desc (= default)

Get your errand list for this week by filtering the agenda (for the current week) on the errands tag.

Getting started (with Things)

Gather it all in one place

Each and every thing that you want to accomplish needs to end up in one place, and that place is the CollectBox.

It’s fine if you haven’t yet come up with a plan for exactly how or when you’ll do these new to-dos. What’s crucial is immediately getting them off your mind and into the Inbox to revisit later. When this becomes a reflex, it’s also a lot easier to stay focused on whatever you’re doing.

Include the fun or interesting things that you’d love to do, too. If you only add your obligations, looking over your to-dos will become a chore.

Taking a second look at all of the new to-dos in your Inbox daily is an easy yet powerful habit that’ll make you feel great. As you do this, decide when you’ll start each of them.

Decide when to get started

There’s too much for you to get done in one day, but that’s no reason to stress. If you organize your to-dos with this fact in mind, you can make it easier to concentrate on doing what’s important right now.

Today is the list for to-dos that you want to start before the day ends. They’re your priorities.

Next is home for all of the to-dos you could start at any time. It’s a good place to look when putting together your Today list, or when you’ve finished everything there and you need more to do.

Scheduled is for to-dos that you’d like to start on a later date, either because there’s nothing you can do to start them yet, or you’d just rather be reminded of them on a specific day.

Someday is the place for to-dos that you might like to get to, but you’re not sure when. Regularly review what you’ve added here to decide if it’s time to act.

Do bigger things with projects

Every so often, you’ll find that something you’ve added to your Inbox will actually take more than a single step to complete. When that happens, make it a Project instead.

Like to-dos, there are almost always too many potential projects for you to work on at any given time. If you’re not totally committed to working on a project in the near future, move it to Someday. If you want to review a project to see if it’s relevant again on a later date, move it to Scheduled. If you do these things, you’ll always have a tidy, relevant list of the projects you’re devoted to right now.

Finally, if you need to get an overview of all the next actions across your current projects, you can find them listed together in Next.

Define yourself with areas

Projects and to-dos that support an ongoing ambition belong together in an Area of Responsibility.

There’s an area for every hat you wear. Stay in touch with the people you care about by creating a Family & Friends area. Remember to keep an eye on your savings for the future with a Money area. Encourage yourself to care for your body and mind by maintaining a Health area. Tame a busy class schedule with a School area. Work toward new professional heights with a Career area. When you only want to see related projects and to-dos, your areas are a great place to narrow your focus.

Establish your daily routine

A visit with your to-dos early in the day, every day, is the best way to set your priorities and stay on top of what matters most to you. So grab a coffee and spend a few minutes in Today – this won’t take long.

First, Things shows you what’s new for the day. Decide what you want to do today and postpone the rest for later. Visualize what you’ll get done and in what order, then arrange your to-dos accordingly.

Second, if your Today list needs a bit more substance, add some to-dos. Look over Next to get a quick overview of all of your projects and add some to-dos from there. Or, browse your areas and projects to pick some to-dos from those.

When you take a bit of time to organize your Today list, it’ll no longer seem like each day is merely something that happens to you. Interruptions won’t be so disruptive. You’ll be in control. It’s a good feeling.

A few tips before you go

The faster you can get new to-dos into your Inbox, the faster you can get back to work. In Org mode, you can create a new to-do while you’re working by pressing C-c c t.

Great titles for your to-dos make a big difference. Imagine you’re in a hurry and you create a to-do that’s simply titled Valentine’s Day. Valentine’s Day isn’t really something you can do. You can, however, Buy a Valentine’s Day card or Make a dinner reservation for Valentine’s Day. Be crystal-clear about the real action you’re going to take, so that when you see the to-do again later you won’t have to think twice about what you meant.

If you need to shorten a long list and see only the to-dos that are relevant right this moment, use tags. Your tags should have an unambiguous purpose and you should use them frequently to filter lists and see similar to-dos. For example, Errand is one of our favorites: you can use it to filter your Next list and see everything you need to do when you’re around town.

Use due dates sparingly, and only when a to-do has a fixed deadline. If you do that, it’ll always be obvious at a glance what really requires your attention each day. If you simply want a to-do to appear in your Today list later, move it to the Scheduled list and set a date that way.

Views

;; Custom commands for the agenda -- start with a clean slate.
(setq org-agenda-custom-commands nil)

You should be able to work with Org items with the mapping and property APIs:

  • (info "(org) Using the property API")
  • (info "(org) Using the mapping API")

COLLECT

(add-to-list 'org-agenda-custom-commands
             '("c" . "COLLECT...") t)

CollectBox

The CollectBox is the default place where you collect your thoughts.

;; Collectbox.
(add-to-list 'org-agenda-custom-commands
             `("cb" "CollectBox"
               ((alltodo ""))
               ((org-agenda-files (list ,org-default-notes-file)))) t)

FOCUS on my active tasks

My work = tasks owned by me (“my tasks”) + tasks assigned to me.

(add-to-list 'org-agenda-custom-commands
             '("f" . "FOCUS...") t)

Today

An everyday objective should be to empty this list first, by any mean. For example, start every morning by:

  • scheduling tasks to another day if you already know it can’t be completed before that date,
  • moving tasks to Someday if you just don’t know if/when it will be completed
  • delegating, and
  • of course completing tasks.

Completed tasks stay displayed in their own section until the end of the day, because:

  • they can be “in review” or “need verification”, and
  • it allows you to gain momentum while completing tasks.
(add-to-list 'org-agenda-custom-commands
             `("f." "Today"
               (
                ;; Events.
                (agenda ""
                        ((org-agenda-entry-types '(:timestamp :sexp))
                         (org-agenda-overriding-header
                          (concat "CALENDAR Today "
                                  (format-time-string "%a %d" (current-time))
                                  ;; #("__________________" 0 12 (face (:foreground "gray")))
                                  ))
                         (org-agenda-span 'day)))
                ;; Unscheduled new tasks (waiting to be prioritized and scheduled).
                (tags-todo "LEVEL=2"
                      ((org-agenda-overriding-header "COLLECTBOX (Unscheduled)")
                       (org-agenda-skip-function
                        '(org-agenda-skip-entry-if 'scheduled))
                       (org-agenda-files (list ,org-default-notes-file))))
                ;; List of all TODO entries with deadline today.
                (tags-todo "DEADLINE=\"<+0d>\""
                           ((org-agenda-overriding-header "DUE TODAY")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))
                            (org-agenda-sorting-strategy '(priority-down))))
                                      ; XXX Timed deadlines NOT shown!!!
                ;; List of all TODO entries with deadline before today.
                (tags-todo "DEADLINE<\"<+0d>\""
                           ((org-agenda-overriding-header "OVERDUE")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))
                            (org-agenda-sorting-strategy '(priority-down))))
                ;; (agenda ""
                ;;         ((org-agenda-entry-types '(:deadline))
                ;;          (org-agenda-overriding-header "DUE DATES")
                ;;          (org-agenda-skip-function
                ;;           '(org-agenda-skip-entry-if 'todo 'done))
                ;;          (org-agenda-sorting-strategy
                ;;           '(priority-down time-down))
                ;;          (org-agenda-span 'day)
                ;;          (org-agenda-start-on-weekday nil)
                ;;          (org-agenda-time-grid nil)))
                (agenda ""
                        ((org-agenda-entry-types '(:scheduled))
                         (org-agenda-overriding-header "SCHEDULED")
                         (org-agenda-skip-function
                          '(org-agenda-skip-entry-if 'todo 'done))
                         (org-agenda-sorting-strategy
                          '(priority-down time-down))
                         (org-agenda-span 'day)
                         (org-agenda-start-on-weekday nil)
                         (org-agenda-time-grid nil)))
                ;; List of all TODO entries completed today.
                (todo "TODO|DONE|CANX" ; Includes repeated tasks (back in TODO).
                           ((org-agenda-overriding-header "COMPLETED TODAY")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if
                               'notregexp
                               (format-time-string leuven-org-completed-date-regexp)))
                            (org-agenda-sorting-strategy '(priority-down)))))
               ((org-agenda-format-date "")
                (org-agenda-start-with-clockreport-mode nil))) t)
The date next to “CALENDAR” is not updated when doing f or bEND

Hotlist

The hotlist is a convenient and smart way to see (in a single, clear overview) the most urgent and important tasks for you to be working on right now.

It contains active tasks (that is, not completed) that:

  • are overdue, or
  • are due soon (in the next 7 days) [= urgent], or
  • have a high priority (#A) [= important], or
  • are FLAGGED [= next action?].

There is an exception to the above rule: tasks with a future ~SCHEDULED~ date will be hidden from the hotlist regardless of their DEADLINE date, priority or flag.

In other words, to be listed in the hotlist, tasks must have as well a SCHEDULED date that is:

  • on or before today, or
  • blank.
Rajouter les SCHEDULED today dans la hotlist ? Déjà le cas pour les tâches avec DEADLINE. Pas pour les autres.ENDTasks with a DEADLINE and a -0d specifier are shown We said “get it out my way for now”, nope?END
(add-to-list 'org-agenda-custom-commands
             '("w" "Work"
               ;; tags-todo "DEADLINE<=\"<+1w>\"|PRIORITY={A}|FLAGGED"
               ((tags-todo "work-pirilampo"
                           ((org-agenda-overriding-header "Work")))
                )
               ((org-agenda-todo-ignore-scheduled 'future)
                (org-agenda-sorting-strategy '(deadline-up)))) t) ; FIXME sort not OK
(add-to-list 'org-agenda-custom-commands
             '("fh" "Hotlist"
               ;; tags-todo "DEADLINE<=\"<+1w>\"|PRIORITY={A}|FLAGGED"
               ((tags-todo "DEADLINE<\"<+0d>\""
                           ((org-agenda-overriding-header "OVERDUE")))
                (tags-todo "DEADLINE>=\"<+0d>\"+DEADLINE<=\"<+1w>\""
                           ((org-agenda-overriding-header "DUE IN NEXT 7 DAYS")))
                (tags-todo "DEADLINE=\"\"+PRIORITY={A}|DEADLINE>\"<+1w>\"+PRIORITY={A}"
                           ((org-agenda-overriding-header "HIGH PRIORITY")))
                (tags-todo "DEADLINE=\"\"+FLAGGED|DEADLINE>\"<+1w>\"+FLAGGED"
                           ((org-agenda-overriding-header "FLAGGED")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-when-regexp-matches))
                            (org-agenda-skip-regexp "\\[#A\\]")))
                ;; (tags-todo "DEADLINE=\"\"+PRIORITY<>{A}+FLAGGED|DEADLINE>\"<+1w>\"+PRIORITY<>{A}+FLAGGED"
                ;;            ((org-agenda-overriding-header "...FLAGGED...")))
                )
               ((org-agenda-todo-ignore-scheduled 'future)
                (org-agenda-sorting-strategy '(deadline-up)))) t) ; FIXME sort not OK

XXX “Fix timestamp-based sorting of tags-based entries in agenda” (2015-02-08) should fix the sort!?

The hotlist is the perfect thing to review each morning to know what you need to do each day.

Hot N Fast

The Hot N Fast list is everything on the Hotlist that takes less than 10 minutes. Tasks without a time estimate will NOT show up in this list.

(add-to-list 'org-agenda-custom-commands
             '("ff" "Hot N Fast"
               ;; tags-todo "DEADLINE<=\"<+1w>\"|PRIORITY={A}|FLAGGED"
               ((tags-todo "DEADLINE<\"<+0d>\""
                           ((org-agenda-overriding-header "OVERDUE")))
                (tags-todo "DEADLINE>=\"<+0d>\"+DEADLINE<=\"<+1w>\""
                           ((org-agenda-overriding-header "DUE IN NEXT 7 DAYS")))
                (tags-todo "DEADLINE=\"\"+PRIORITY={A}|DEADLINE>\"<+1w>\"+PRIORITY={A}"
                           ((org-agenda-overriding-header "HIGH PRIORITY")))
                (tags-todo "DEADLINE=\"\"+FLAGGED|DEADLINE>\"<+1w>\"+FLAGGED"
                           ((org-agenda-overriding-header "FLAGGED")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-when-regexp-matches))
                            (org-agenda-skip-regexp "\\[#A\\]")))
                ;; (tags-todo "DEADLINE=\"\"+PRIORITY<>{A}+FLAGGED|DEADLINE>\"<+1w>\"+PRIORITY<>{A}+FLAGGED"
                ;;            ((org-agenda-overriding-header "...FLAGGED...")))
                )
               ((org-agenda-todo-ignore-scheduled 'future)
                (org-agenda-sorting-strategy '(deadline-up)))) t) ; FIXME sort not OK.
(add-to-list 'org-agenda-custom-commands
             '("fe" "Effort less than 1 hour"
               ((tags-todo "Effort<>{}+Effort<\"1:00\""))
               ((org-agenda-todo-ignore-scheduled 'future))) t)

Scheduled

REVIEW my work

See http://www.omnigroup.com/ftp/pub/software/macosx/extras/omnifocus/gtdandomnifocus.pdf for mode dedicated solely to review!

(add-to-list 'org-agenda-custom-commands
             '("r" . "REVIEW...") t)

There is one task in each Folder that repeats as often as I need to review that Folder. Some Folders I only need to review weekly or monthly. These review tasks get the gtd tag.

See http://stackoverflow.com/questions/22394394/orgmode-a-report-of-tasks-that-are-done-within-the-week and http://stackoverflow.com/questions/29390976/generate-report-of-completed-work-using-org-mode for custom agenda views…

All active tasks

(add-to-list 'org-agenda-custom-commands
             '("ra" . "All Tasks...") t)

Sorted by due date (= urgency)

All tasks, grouped by due date:

  • Overdue
  • Due today
  • Due tomorrow
  • Due within a week (next 5 days)
  • Due within a month (next 3 weeks)
  • Due later
  • No due date (includes CollectBox)

All tasks (tags view command)

(add-to-list 'org-agenda-custom-commands
             '("rad" "All Tasks (grouped by Due Date)"
               ((tags-todo "DEADLINE<\"<+0d>\""
                           ((org-agenda-overriding-header "OVERDUE")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))))
                (tags-todo "DEADLINE=\"<+0d>\""
                           ((org-agenda-overriding-header "DUE TODAY")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))))
                (tags-todo "DEADLINE=\"<+1d>\""
                           ((org-agenda-overriding-header "DUE TOMORROW")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))))
                (tags-todo "DEADLINE>\"<+1d>\"+DEADLINE<=\"<+7d>\""
                           ((org-agenda-overriding-header "DUE WITHIN A WEEK")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))))
                (tags-todo "DEADLINE>\"<+7d>\"+DEADLINE<=\"<+28d>\""
                           ((org-agenda-overriding-header "DUE WITHIN A MONTH")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))))
                (tags-todo "DEADLINE>\"<+28d>\""
                           ((org-agenda-overriding-header "DUE LATER")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'notdeadline))))

                ;; (todo ""
                ;;            ((org-agenda-overriding-header "NO DUE DATE")
                ;;             (org-agenda-skip-function
                ;;              '(org-agenda-skip-entry-if 'deadline))))
                (tags-todo "TODO={STRT}"
                           ((org-agenda-overriding-header "NO DUE DATE / STARTED")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'deadline))))
                (tags-todo "TODO<>{STRT\\|WAIT\\|SDAY}"
                           ((org-agenda-overriding-header "NO DUE DATE / NEXT")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'deadline))))
                (tags-todo "TODO={WAIT}"
                           ((org-agenda-overriding-header "NO DUE DATE / WAITING FOR")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'deadline))))
                (tags-todo "TODO={SDAY}"
                           ((org-agenda-overriding-header "NO DUE DATE / SOMEDAY")
                            (org-agenda-filter-preset '("+SDAY"))
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'deadline)))))
               ((org-agenda-sorting-strategy '(priority-down))
                (org-agenda-write-buffer-name "All Tasks (grouped by Due Date)"))
               "~/org___all-tasks-by-due-date.pdf") t)
(add-to-list 'org-agenda-custom-commands
             '("ra1" "All Tasks with a due date"
               ((alltodo ""))
               ((org-agenda-overriding-header "All Tasks (sorted by Due Date)")
                (org-agenda-skip-function
                 '(org-agenda-skip-entry-if 'notdeadline))
                (org-agenda-sorting-strategy '(deadline-up)))) t)

All tasks (agenda view command)

When I’m in the range of the pre-warning, tasks are shown… … even if they aren’t for tomorrow or for the next 5 days.

That causes repetition of tasks between different blocks.

ENDTasks with a long pre-warning do not appear in the first block Well in every other one!!! Bad.END
(add-to-list 'org-agenda-custom-commands
             `("ra2" "All active tasks, by due date"
               ((agenda ""
                        ((org-agenda-overriding-header "Today")
                         ;; FIXME We don't see "timed" DEADLINE.
                         (org-agenda-skip-function
                          (lambda ()
                            (let* ((dl (org-entry-get nil "DEADLINE")))
                              (if (or (not dl)
                                      (equal dl "")
                                      (org-time> dl (org-time-today)))
                                  (progn (outline-next-heading) (point))))))
                         (org-agenda-skip-scheduled-if-deadline-is-shown t)
                         (org-agenda-span 'day)
                         (org-deadline-warning-days 0)))
                (agenda ""
                        ((org-agenda-entry-types '(:deadline))
                         (org-agenda-overriding-header "Tomorrow")
                         (org-agenda-skip-function
                          '(leuven--skip-entry-unless-deadline-in-n-days-or-more 1))
                         (org-deadline-warning-days 1)))
                (agenda ""
                        ((org-agenda-overriding-header "Next 5 days")
                         (org-agenda-skip-function
                          '(leuven--skip-entry-unless-deadline-in-n-days-or-more 2))
                         (org-deadline-warning-days 7)))
                (agenda ""
                        ((org-agenda-format-date "")
                         (org-agenda-overriding-header "Next 3 weeks")
                         (org-agenda-skip-function
                          '(leuven--skip-entry-unless-deadline-in-n-days-or-more 7))
                         (org-deadline-warning-days 28))))
               ((org-agenda-deadline-faces '((0.0 . default)))
                (org-agenda-start-with-clockreport-mode nil)
                (org-agenda-format-date "")
                (org-agenda-span 'day)
                (org-agenda-sorting-strategy '(deadline-up))
                (org-agenda-use-time-grid nil)
                (org-agenda-write-buffer-name "Reminders"))) t)
(defun leuven--skip-entry-unless-deadline-in-n-days-or-more (n)
  "Skip entries that have no deadline, or that have a deadline earlier than in N days."
  (let* ((dl (org-entry-get nil "DEADLINE")))
    (if (or (not dl)
            (equal dl "")
            (org-time< dl (+ (org-time-today) (* n 86400))))
        (progn (outline-next-heading) (point)))))
(defun leuven--skip-entry-unless-overdue-deadline ()
  "Skip entries that have no deadline, or that have a deadline later than or equal to today."
  (let* ((dl (org-entry-get nil "DEADLINE")))
    (if (or (not dl)
            (equal dl "")
            (org-time>= dl (org-time-today)))
        (progn (outline-next-heading) (point)))))

(defun leuven--skip-entry-if-past-deadline ()
  "Skip entries that have a deadline earlier than today."
  (let* ((dl (org-entry-get nil "DEADLINE")))
    (if (org-time< dl (org-time-today))
        (progn (outline-next-heading) (point)))))

(defun leuven--skip-entry-if-deadline-in-less-than-n-days-or-schedule-in-less-than-n-days (n1 n2)
  "Skip entries that have a deadline in less than N1 days, or that have a
scheduled date in less than N2 days, or that have no deadline nor scheduled."
  (let* ((dl (org-entry-get nil "DEADLINE"))
         (sd (org-entry-get nil "SCHEDULED")))
    (if (or (and dl
                 (not (equal dl ""))
                 (org-time< dl (+ (org-time-today) (* n1 86400))))
            (and sd
                 (not (equal sd ""))
                 (org-time< sd (+ (org-time-today) (* n2 86400))))
            (and (or (not dl)       ; No deadline.
                     (equal dl ""))
                 (or (not sd)       ; Nor scheduled.
                     (equal sd ""))))
        (progn (outline-next-heading) (point)))))

(defun leuven--skip-entry-if-deadline-or-schedule ()
  "Skip entries that have a deadline or that have a scheduled date."
  (let* ((dl (org-entry-get nil "DEADLINE"))
         (sd (org-entry-get nil "SCHEDULED")))
    (if (or (and dl
                 (not (equal dl "")))
            (and sd
                 (not (equal sd ""))))
        (progn (outline-next-heading) (point)))))
(add-to-list 'org-agenda-custom-commands
             '("ra3" "Agenda for all TODO entries"
               ((agenda ""
                        ((org-agenda-format-date "")
                         (org-agenda-overriding-header "Past due")
                         (org-agenda-skip-function
                          'leuven--skip-entry-unless-overdue-deadline)
                         (org-deadline-warning-days 0)))
                (agenda ""
                        ((org-agenda-format-date "")
                         (org-agenda-overriding-header "Today/tomorrow")
                         (org-agenda-skip-function
                          'leuven--skip-entry-if-past-deadline)
                         (org-agenda-span 2)
                         (org-agenda-use-time-grid t)
                         (org-deadline-warning-days 0)))
                (agenda ""
                        ((org-agenda-format-date "")
                         (org-agenda-overriding-header "Next 12 days")
                         (org-agenda-skip-function
                          '(leuven--skip-entry-unless-deadline-in-n-days-or-more 2))
                         (org-deadline-warning-days 14)))
                (todo ""
                      ((org-agenda-overriding-header "Later")
                       (org-agenda-skip-function
                        '(leuven--skip-entry-if-deadline-in-less-than-n-days-or-schedule-in-less-than-n-days 15 2))
                       (org-agenda-sorting-strategy '(ts-up))))
                (todo ""
                      ((org-agenda-overriding-header "No due date")
                       (org-agenda-skip-function
                        'leuven--skip-entry-if-deadline-or-schedule))))
               ((org-agenda-start-with-clockreport-mode nil)
                (org-agenda-prefix-format " %i %?-12t% s")
                (org-agenda-span 'day)
                (org-agenda-use-time-grid nil)
                (org-agenda-sorting-strategy '(deadline-up)) ; FIXME sort does not work in "Past due", well in "Next 12 days".
                (org-agenda-write-buffer-name "List Review"))
               "~/org___agenda-all-todo-entries.html") t)

Sorted by priority (= importance)

All tasks, grouped by priority:

  • Priority A
  • Priority B
  • No explicit priority (= priority B, implicitly)
  • Priority C
  • Completed
(add-to-list 'org-agenda-custom-commands
             '("rap" "All (Unscheduled) Tasks (grouped by Priority)"
               ((tags-todo "PRIORITY={A}"
                           ((org-agenda-overriding-header "HIGH")
                            (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 'scheduled))))
                (tags-todo "PRIORITY={B}"
                           ((org-agenda-overriding-header "MEDIUM")
                            (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 'scheduled))))
                (tags-todo "PRIORITY=\"\""
                           ((org-agenda-overriding-header "NONE") ; = Medium.
                            (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 'scheduled))))
                (tags-todo "PRIORITY={C}"
                           ((org-agenda-overriding-header "LOW")
                            (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 'scheduled))))
                (todo "DONE|CANX"
                      ((org-agenda-overriding-header "COMPLETED")
                       (org-agenda-sorting-strategy '(priority-down)))))) t)

Time tracking

Generate a time tracking report: https://confluence.atlassian.com/display/JIRA/Time+Tracking+Report

FIXME Show percent completion

http://www.techsupportalert.com/best-free-project-time-keeping-utility.htm

Add a custom view which is some “bill” to send to your boss/client (table view)

Timesheet

See Weekly Time Report at 03:44 for a weekly time report.

Track time.

http://www.freshbooks.com/track-your-time

(add-to-list 'org-agenda-custom-commands
             '("rt" . "Timesheet...") t)

;; Show what happened today.
(add-to-list 'org-agenda-custom-commands
             '("rtd" "Daily Timesheet"
               ((agenda ""))
               ((org-agenda-log-mode-items '(clock closed))
                (org-agenda-overriding-header "DAILY TIMESHEET")
                (org-agenda-show-log 'clockcheck)
                (org-agenda-span 'day)
                (org-agenda-start-with-clockreport-mode t)
                (org-agenda-time-grid nil))) t)

;; Show what happened this week.
(add-to-list 'org-agenda-custom-commands
             '("rtw" "Weekly Timesheet"
               ((agenda ""))
               (
                ;; (org-agenda-format-date "")
                (org-agenda-overriding-header "WEEKLY TIMESHEET")
                (org-agenda-skip-function '(org-agenda-skip-entry-if 'timestamp))
                (org-agenda-span 'week)
                (org-agenda-start-on-weekday 1)
                (org-agenda-start-with-clockreport-mode t)
                (org-agenda-time-grid nil))) t)

I believe what you are seeking is a highly customized agenda view, which is possible, but will require an investment of a substantial amount of time modifying the source code of org-agenda-list and the functions it uses – e.g., org-agenda-get-…. Rather than using something like the org-agenda-list family of functions, perhaps consider using either a tag / property search (i.e., org-tags-view) or a word search (i.e., org-search-view) using the built-in agenda commands: orgmode.org/worg/org-tutorials/advanced-searching.html Both of those searches do not insert dividers.

If you would like to modify the source code for org-agenda-list, have a look at the section of code: (if (stringp org-agenda-format-date) (format-time-string org-agenda-format-date (org-time-from-absolute date)) (funcall org-agenda-format-date date)) “\n”). You may not need the text-properties that follow if you eliminate the date … I would suggest creating an entirely new function with a different name and leave org-agenda-list as-is.

Expense reporting

Calendar

(add-to-list 'org-agenda-custom-commands
             '("rc" . "Calendar...") t)

FIXME Make 7 agenda “day” views in order to have a customizable separator.

(add-to-list 'org-agenda-custom-commands
             '("rc7" "Events and appointments for 7 days"
               ((agenda ""))
               ((org-agenda-entry-types '(:timestamp :sexp))
                ;; (org-agenda-overriding-header "Calendar for 7 days")
                ;; (org-agenda-repeating-timestamp-show-all t)
                (org-agenda-span 'week)
                (org-agenda-format-date "\n%a %d")
                ;; (org-agenda-date-weekend ... new face ...)
                (org-agenda-time-grid nil))) t)

View all my tasks in a familiar, calendar-like view. They appear on the day that they are due or scheduled.

;; Calendar view for org-agenda.
(when (locate-library "calfw-org")

  (autoload 'cfw:open-org-calendar "calfw-org"
    "Open an Org schedule calendar." t)

  (add-to-list 'org-agenda-custom-commands
               '("rcm" "Calendar for current month"
                 (lambda (&rest ignore)
                   (cfw:open-org-calendar))) t)

  ;; (defun cfw:open-org-calendar-non-work (&args)
  ;;   (interactive)
  ;;   (let ((org-agenda-skip-function 'org-agenda-skip-work))
  ;;     (cfw:open-org-calendar)))
  ;;
  ;; (add-to-list 'org-agenda-custom-commands
  ;;              '("c" "Calendar (non-work) for current month"
  ;;                cfw:open-org-calendar-non-work) t)

  )

Completed Tasks

To monitor your progress, you can view what tasks have been completed recently (in this project) in the last day, week, or two weeks.

Here, you will see a list of all tasks completed in the last 13 days (with the most recently completed at the top), which you can filter by category or tag.

FIXME Group completed tasks per date of completion.

(add-to-list 'org-agenda-custom-commands
             `("rC" "Completed view"
               (;; List of all TODO entries completed yesterday.
                (todo "TODO|DONE|CANX" ; includes repeated tasks (back in TODO)
                           ((org-agenda-overriding-header
                             (concat "YESTERDAY   "
                                     (format-time-string "%a %d" (current-time-ndays-ago 1))
                                     ;; #("__________________" 0 12 (face (:foreground "gray")))
                                     ))
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if
                               'notregexp
                               (format-time-string leuven-org-completed-date-regexp (current-time-ndays-ago 1))))
                            (org-agenda-sorting-strategy '(priority-down))))
                ;; List of all TODO entries completed 2 days ago.
                (todo "TODO|DONE|CANX" ; includes repeated tasks (back in TODO)
                           ((org-agenda-overriding-header
                             (concat "2 DAYS AGO  "
                                     (format-time-string "%a %d" (current-time-ndays-ago 2))))
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if
                               'notregexp
                               (format-time-string leuven-org-completed-date-regexp (current-time-ndays-ago 2))))
                            (org-agenda-sorting-strategy '(priority-down))))
                ;; List of all TODO entries completed 3 days ago.
                (todo "TODO|DONE|CANX" ; Includes repeated tasks (back in TODO).
                           ((org-agenda-overriding-header
                             (concat "3 DAYS AGO  "
                                     (format-time-string "%a %d" (current-time-ndays-ago 3))))
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if
                               'notregexp
                               (format-time-string leuven-org-completed-date-regexp (current-time-ndays-ago 3))))
                            (org-agenda-sorting-strategy '(priority-down)))))
               ((org-agenda-format-date "")
                (org-agenda-start-with-clockreport-mode nil))) t)

(defun current-time-ndays-ago (n)
  "Return the current time minus N days."
  (time-subtract (current-time) (days-to-time n)))

The above is more appropriate than:

(add-to-list 'org-agenda-custom-commands
            '("rC" "Recently closed"
              ((tags "CLOSED>\"<-2w>\""))
              ((org-agenda-sorting-strategy '(priority-down)))) t)

because repeatable tasks are switched back to a non-TODO state and (at least, by default) don’t get a CLOSED: time-stamp.

Note from Sascha Ziemann

http://jcardente.blogspot.de/2010/06/org-mode-hack-tasks-done-last-month.html

inspired me to do this:

(defun org-done-view (&optional offset)
  "Shows all TODOs, which are done."
  (interactive "nOffset: ")
  (let ((offset (or offset 0)))
    (let ((t0 (calendar-current-date offset))
      (t1 (calendar-current-date (+ offset 1))))
      (org-tags-view nil
             (format "CLOSED>=\"[%s-%s-%s]\"+CLOSED<=\"[%s-%s-%s]\""
                 (calendar-extract-year t0)
                 (calendar-extract-month t0)
                 (calendar-extract-day t0)
                 (calendar-extract-year t1)
                 (calendar-extract-month t1)
                 (calendar-extract-day t1))))))

Cleanup

(add-to-list 'org-agenda-custom-commands
             '("rx" "Completed tasks with no CLOCK lines"
               ((todo "DONE|CANX"
                           ((org-agenda-overriding-header "Completed tasks with no CLOCK lines")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if
                               'regexp
                               (format-time-string "  CLOCK: .*--.* =>  .*")))
                            (org-agenda-sorting-strategy '(priority-down)))))) t)

Cleanup:

  • Done actions older than 14 days
  • Inactive ticklers older than 14 days
  • Completed projects older than 14 days

Cleanup = delete what does not contain CLOCK lines, and archive others, for example?

Recent items

Add report “Recently added/completed/modified” Recently done.END
(add-to-list 'org-agenda-custom-commands
             '("rr" "Recent items (past 7 days)"
               ;; Faster than tags.
               ((agenda ""))
               ((org-agenda-start-day "-7d")
                (org-agenda-span 7)
                (org-agenda-repeating-timestamp-show-all nil)
                ;; %s is only for agenda views
                ;; (org-agenda-prefix-format "%s")
                ;; maybe not make much difference ka
                ;; (org-agenda-use-tag-inheritance nil)
                (org-agenda-inactive-leader "Inactive:  ")
                (org-agenda-include-inactive-timestamps t))) t)
Items are duplicated because of LOGBOOK + LAST_REPEATEND

Daily task review

Take a moment to plan your day:

  • Recently created (possible actions: today, later, done, delete)
  • No due date (possible actions: tomorrow, in 2 days, next week, someday)
  • Scheduled today (possible actions: today, later, done, delete)
Show overridden headers when in agenda view

Read Flags, Due Dates, and Daily Review.

Weekly task review

  1. Clear inbox for collecting
  2. Review previous calendar data
  3. Review upcoming calendar
  4. Review (stuck) projects
  5. Review (next) actions
  6. Review waiting-for
  7. Review someday/maybe
(add-to-list 'org-agenda-custom-commands
             '("rw" "Weekly review"
               ((tags "CATEGORY={@Collect}&LEVEL=2|TODO={NEW}"
                      ((org-agenda-overriding-header "COLLECTBOX (Unscheduled)")))

                (agenda ""
                        ((org-agenda-clockreport-mode t)
                         (org-agenda-format-date
                          (concat "\n"
                                  "%Y-%m-%d" " %a "
                                  (make-string (window-width) ?_)))
                         (org-agenda-overriding-header "PAST WEEK")
                         (org-agenda-prefix-format " %?-11t %i %-12:c% s")
                         (org-agenda-show-log 'clockcheck)
                         (org-agenda-span 7)
                         (org-agenda-start-day "-1w") ; recently done
                         (org-deadline-warning-days 0)))

                (agenda ""
                        ((org-agenda-overriding-header "NEXT MONTH")
                         (org-agenda-span 'month)
                         (org-agenda-start-day "+0d")
                         (org-deadline-warning-days 0) ; XXX
                         ))

                (todo "PROJ"
                      ((org-agenda-overriding-header "PROJECT LIST")))

                ;; FIXME we should show which tasks (don't) have CLOCK lines: archived vs. deleted.
                (todo "DONE|PROJDONE"
                      ((org-agenda-overriding-header
                        "Candidates to be archived")))

                ;; (stuck ""
                ;;        ((org-agenda-overriding-header "Stuck projects")))

                (todo "STRT"
                      ((org-agenda-overriding-header "IN PROGRESS")
                       (org-agenda-todo-ignore-scheduled nil)))

                (todo "TODO"        ; Don't include items from CollectBox! XXX
                      ((org-agenda-overriding-header "ACTION LIST")))

                ;; Ignore scheduled and deadline entries, as they're visible
                ;; in the above agenda (for the past + for next month) or
                ;; scheduled/deadline'd for much later...
                (todo "WAIT"
                      ((org-agenda-format-date "")
                       (org-agenda-overriding-header "WAITING FOR")
                       (org-agenda-todo-ignore-deadlines 'all) ; Future?
                       (org-agenda-todo-ignore-scheduled t)))

                ;; Same reasoning as for WAIT.
                (todo "SDAY"
                      ((org-agenda-format-date "")
                       (org-agenda-overriding-header "SOMEDAY")
                       (org-agenda-todo-ignore-deadlines 'all)
                       (org-agenda-todo-ignore-scheduled t)
                       (org-agenda-filter-preset '("+SDAY"))))

               ;; ((org-agenda-start-with-clockreport-mode nil)
               ;;  (org-agenda-prefix-format " %i %?-12t% s")
               ;;  (org-agenda-write-buffer-name "Weekly task review"))
               ;; "~/org-weekly-review.html") t)
                )) t)

Next

(add-to-list 'org-agenda-custom-commands
             '("rN" "Next"
               ((tags-todo "TODO<>{SDAY}"))
               ((org-agenda-overriding-header "List of all TODO entries with no due date (no SDAY)")
                (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))
                (org-agenda-sorting-strategy '(priority-down)))) t)

Future

:header-args+: :tangle no

FIXME C’est scheduled qu’il faut checker, plutôt que deadline ?

(add-to-list 'org-agenda-custom-commands
             '("F" "Future"
               ((tags-todo "TODO<>{SDAY}+DEADLINE>\"<+0d>\""))
               ((org-agenda-overriding-header "List of all TODO entries with future due date (no SDAY)")
                (org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
                (org-agenda-sorting-strategy '(priority-down)))) t)
(add-to-list 'org-agenda-custom-commands
             '("F" "List TODO entries scheduled for the future"
               ((todo ""))
               ((org-agenda-todo-ignore-scheduled 'past)
                (org-agenda-skip-function '(org-agenda-skip-entry-if 'notscheduled)))) t)

Ticklers

If you can’t get to work on something right now, but it’s not too far o! in the distance, you probably have a Tickler item on your hands. A tickler item, in Omni-Focus, is an item with a start date in the future. This might be a marathon you might participate in or a concert you might like to see. With a start date in the future, it disappears for the time being, but is not lost forever. You can add a start date to the project or action via the inspector or the Start column in the outline.

An item with a start date in the future doesn’t appear in ordinary OmniFocus views. But when the start date comes around, the project or action appears again, ready for you to decide what to do with it.

Waiting for

Only allow one assignee per task. See https://asana.com/guide/learn/tasks/assigning for techniques when this can’t be done.

See other people’s tasks.

(add-to-list 'org-agenda-custom-commands
             '("rW" "Waiting for"
               ((tags-todo "TODO={WAIT}"))
               ((org-agenda-overriding-header "Waiting for")
                (org-agenda-sorting-strategy '(deadline-up)))) t) ; FIXME does not work.

Projects

A project is any desired goal that requires more than one action to achieve.

Making a decision about the order of your actions is very important.

A project where the actions need to be performed in sequence is called a sequential project. A project where the actions can be performed in any order is called a parallel project.

The project type can be specified either in XXX.

(add-to-list 'org-agenda-custom-commands
             '("rP" "Projects"
               ((tags-todo "project-DONE-CANX"))
               ((org-agenda-overriding-header "Projects (High Level)")
                (org-agenda-sorting-strategy nil))) t)

Display:

  • Title
  • Status
  • Progress (%)
  • Start Date
  • Completion Date (= deadline)

Comment identifier un projet ?

  • Identifier les tâches qui ont des sous-tâches?
  • Mettre un tag PROJ?
  • Avoir des tâches dans section “(Single) Actions” ou dans section “Projects”?

From Tracks:

  • Active Projects
  • Hidden Projects
  • Completed Projects

MORE

(add-to-list 'org-agenda-custom-commands
             '("+" . "MORE...") t)

Assigned to me

;; Checking tasks that are assigned to me.
(add-to-list 'org-agenda-custom-commands
             `("+a" "Assigned to me"
               ((tags ,(concat "Assignee={" user-login-name "\\|"
                               user-mail-address "}")))
               ((org-agenda-overriding-header "ASSIGNED TO ME"))) t)

Tasks by assignee

EMAIL notifications

Examples

See https://groups.google.com/forum/#!search/messageid$3Amailman.7594.1438153952.904.help-gnu-emacs@gnu.org/gnu.emacs.help/uBCS3K_ZJFQ/KBfe2RXAtgsJ.

Other posts:

From Email from John Kitchin: Re: create a “send plain text/

Create a “send plain text/pdf email with current header” function:

From Email from Eric Abrahamsen: Re: create a “send plain text/

Task assigned

    Azendoo | Notification
---------------------------------------

Task label


Check it out : http://app.azendoo.com/tasks/53d8b82f64594a5a270001f5


This notification has been sent to you via Azendoo, do not reply.

Email list

You can receive an email with your daily planner every morning at 8:00 AM to help you getting started in the morning.

Have the hotlist emailed to you each day

See http://www.randomsample.de/dru5/node/61

/usr/bin/yes p | /usr/local/bin/emacs -batch -l ~/.emacs -eval '(org-batch-agenda "#")' 2>/dev/null | /usr/bin/mailx -s'Stuck projects' me@example.com

Email the agenda buffer

(defun email-buffer ()
  "Send region as the body of an email."
  (interactive)
  (let ((content (buffer-string)))
    (compose-mail)
    (message-goto-body)
    (insert content)
    (message-goto-to)))

Just run that from your agenda, and then fill in email addresses and subject, and send.

EXPORT

Exporting your personal or team task lists.

Print list

The exported agenda views are not stored when you use one of those commands interactively because this might use too much overhead. Instead, there is a special command to produce all specified files in one step: C-c a e.

FIXME Changes

  • Little checkbox
  • No icon
  • Proportional font
  • No tag: (setq org-agenda-hide-tags-regexp ".*")

XXX See http://www.toodledo.com/tools/booklet.php: Easily print your to-do list as a foldable booklet that you can put in your pocket. Each booklet contains your hotlist, your top 110 most important tasks, and a section for written notes. Assembly of the booklet is as simple as one cut with a scissors and a few folds.

XXX See solution of Christian Egli: http://orgmode.org/w/?p=org-mode.git;a=blob;f=contrib/scripts/org2hpda;hb=HEAD

(add-to-list 'org-agenda-custom-commands
             '("E" . "Exported agenda files...") t)

;; Exporting agenda views.
(add-to-list 'org-agenda-custom-commands
             '("Ea"
               ((agenda ""))
               (;; (org-tag-faces nil)
                (ps-landscape-mode t)
                (ps-number-of-columns 1))
               ("~/org-agenda.html" "~/org-agenda.pdf")) t)

(add-to-list 'org-agenda-custom-commands
             '("Ep" "Call list"
               ((tags-todo "phone"))
               ((org-agenda-prefix-format " %-20:c [ ] " )
                (org-agenda-remove-tags t)
                ;; (org-agenda-with-colors nil)
                (org-agenda-write-buffer-name
                 "Phone calls that you need to make")
                (ps-landscape-mode t)
                (ps-number-of-columns 1))
               ("~/org___calls.pdf")) t)

You can save any list or agenda view as PDF by writing it to a file (via C-x C-w).

Export tasks lists as CSV files

Upload on a Web site

I upload my agenda on a website, so I can access it from multiple devices. This works nicely with the following in a cron job:

emacs --batch -l ~/.emacs.d/init.el -eval '(org-batch-store-agenda-views)' -kill

VISUALIZE

Create custom reports with live data.

See https://basecamp.com/extras for numerous add-ons to Basecamp:

  • mobile apps
  • time tracking, invoicing, and accounting
  • reporting, charts, planning
  • contracts and proposals
  • etc.

Productivity

The Visualize productivity view shows a graphical representation of your productivity in the last 2 weeks.

Productivity trend: barplot, x-axis = day in month (in numeric form), y-axis = number of completed tasks.

Visual report

Stunning report on https://weekdone.com/basecamp/.

ARCHIVE

Archiving a project (or action) consists in hiding its contents from view (NOT from search).

Archive projects that have been completed or deferred, so you can focus on more active projects.

(add-to-list 'org-agenda-custom-commands
             '("A" . "ARCHIVE...") t)
(add-to-list 'org-agenda-custom-commands
             '("Aa" "Archive"
               ((tags-todo "ARCHIVE"))
               ((org-agenda-todo-ignore-scheduled 'future)
                (org-agenda-sorting-strategy '(deadline-down)))) t)

REFERENCE

(add-to-list 'org-agenda-custom-commands
             '("R" . "REFERENCE...") t)

Search

Search any word or regexp within your task name or in the note field:

(add-to-list 'org-agenda-custom-commands
             '("Rs" "Like s, but with extra files"
               ((search ""))
               ((org-agenda-text-search-extra-files
                 ;; FIXME Add `agenda-archives'
                 leuven-org-search-extra-files))) t)
Add S to search in all files, but not into DONE tasksEND
(add-to-list 'org-agenda-custom-commands
             '("RS" "Like s, but only TODO entries"
               ((search ""))
               ((org-agenda-text-search-extra-files
                 ;; FIXME Add `agenda-archives'
                 leuven-org-search-extra-files))) t)

Notes

(add-to-list 'org-agenda-custom-commands
             '("Rn" "Organize thoughts to refile"
               ((tags "refile|capture"))
               ((org-agenda-overriding-header "Refile stuff"))) t)

Task markers (in the current buffer)

;; Create a sparse tree (current buffer only) with all entries containing the
;; word `TODO', `FIXME', `XXX' or `BUG'.
(add-to-list 'org-agenda-custom-commands
             '("1" "Task markers (in current buffer)"
               ((occur-tree "\\<TODO\\|FIXME\\|XXX\\|BUG\\>"))) t)

Buggy commands

:header-args+: :tangle no
(add-to-list 'org-agenda-custom-commands
             '("Ee" "Print reports (TODO)"
               ;; See ThinkingRock examples.
               ((agenda ""
                        ((org-agenda-overriding-header "Scheduled TODO's")
                         (org-agenda-prefix-format "%8e ")
                         (org-agenda-skip-function
                          '(org-agenda-skip-entry-if 'regexp "habit"))
                         (org-agenda-sorting-strategy '(todo-state-up))
                         (org-agenda-span 'week)
                         (org-agenda-todo-keyword-format "%-4s")))
                (tags-todo "thisweek"
                           ((org-agenda-overriding-iding-header
                             "Unscheduled TODO's; Also tasks (from which todo's were generated)")
                            (org-agenda-prefix-format "%-7e")
                            (org-agenda-skip-function
                             '(org-agenda-skip-entry-if 'scheduled))
                            (org-agenda-sorting-strategy '(todo-state-up))
                            (org-agenda-todo-keyword-format "%-10s"))))
               ((org-agenda-remove-tags t))
               ("~/org___agenda-de.html")) t)
(add-to-list 'org-agenda-custom-commands
             '("," . "Priorities...") t)

;; List only priority A tasks for the current day.
(add-to-list 'org-agenda-custom-commands
             '(",A" "Priority #A tasks for today"
               ((agenda ""))
               ((org-agenda-skip-function
                 '(org-agenda-skip-entry-if 'notregexp "\\=.*\\[#A\\]"))
                (org-agenda-span 'day)
                (org-agenda-overriding-header
                 "Today's priority #A tasks: "))) t)

;; List priority A and B tasks for the current day.
(add-to-list 'org-agenda-custom-commands
             '(",B" "Priority #A and #B tasks for today"
               ((agenda ""))
               ((org-agenda-overriding-header
                 "Today's priority #A and #B tasks: ")
                (org-agenda-skip-function
                 '(org-agenda-skip-entry-if 'regexp "\\=.*\\[#C\\]"))
                (org-agenda-span 'day))) t)
;; (add-to-list 'org-agenda-custom-commands
;;              '("A" . "0. Agenda...") t)
;;
;; (add-to-list 'org-agenda-custom-commands
;;              '("AF" "Agenda of upcoming due dates (6 months)"
;;                ;; FIXME We don't see DEADLINE with `-1m' (or so)
;;                ;; specifications (if they are more than 1m ahead of now)!
;;                ((agenda ""))
;;                ((org-agenda-skip-function
;;                  '(org-agenda-skip-entry-if 'notdeadline))
;;                 (org-agenda-span 'day)
;;                 (org-agenda-time-grid nil)
;;                 (org-deadline-warning-days 183))) t)
;;              ;; Some SCHEDULED are shown (when paired with a deadline and
;;              ;; scheduled in the past or for today).

Unused code

("d" "Daily Agenda"
 ((agenda ""
          ((org-agenda-todo-keyword-format "")
           (org-agenda-remove-tags t)))
  (tags "LEVEL=2+goals"
        ((org-agenda-remove-tags t)
         (org-agenda-prefix-format "  ")
         (org-agenda-todo-keyword-format "")))
  (todo "TODO"
        ((org-agenda-sorting-strategy '(tag-up))
         (org-agenda-show-inherited-tags nil)
         (org-agenda-todo-keyword-format "")))
  (todo "STRT"
        ((org-agenda-todo-keyword-format "")))
  (stuck ""
         ((org-agenda-remove-tags t)))))

("p" "Printed agenda"
 ((agenda ""
          ((org-agenda-span 'week)
           (org-agenda-start-on-weekday nil)
           (org-agenda-time-grid nil)
           ;; (org-agenda-repeating-timestamp-show-all t)
           (org-agenda-prefix-format "  -->  %t %s")
           (org-agenda-skip-function
            '(org-agenda-skip-entry-if 'deadline 'scheduled))))
  (agenda ""
          ((org-agenda-span 'day)
           (org-agenda-sorting-strategy '(time-up tag-up))
           (org-agenda-todo-keyword-format "[ ]")
           (org-agenda-scheduled-leaders '("" ""))
           (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))
           (org-agenda-prefix-format "%t %T %s")
           ))
  (agenda ""
          ((org-agenda-span 'day)
           (org-deadline-warning-days 7)
           (org-agenda-time-grid nil)
           (org-agenda-include-diary nil)
           (org-agenda-todo-keyword-format "[ ]")
           (org-agenda-scheduled-leaders '("" ""))
           (org-agenda-overriding-header "Due Dates:")
           (org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
           (org-agenda-prefix-format "%t %s")))
  (todo "TODO|STRT"
        ((org-agenda-sorting-strategy '(tag-up priority-down))
         (org-agenda-todo-ignore-with-date t)))
  (todo "WAIT"))
 ((org-agenda-with-colors nil)
  (org-agenda-prefix-format "%T [ ]")
  (org-agenda-todo-keyword-format "")
  (org-agenda-remove-tags t)
  (ps-number-of-columns 2)
  ;; (ps-print-header nil)
  (ps-landscape-mode t))
 ("~/org___agenda-storage.pdf"))

("P" "Projects"
 ((agenda ""
          ((org-agenda-skip-function
            '(org-agenda-skip-entry-if 'notregexp "* PROJ"))
           (org-agenda-include-diary nil)
           (org-agenda-time-grid nil)))
  (todo "PROJ"
        ((org-agenda-todo-ignore-deadlines t)
         (org-agenda-sorting-strategy '(priority-down))))))

Test cases

  • Entries with no TODO keyword, but well with a DEADLINE.
  • Scheduled date, but no deadline
  • Scheduled date and deadline
    • on the same date
    • on different dates
  • No scheduled date, well a deadline
  • SDAY with a deadline date
  • Entries with “timed” dates

Org mode

:header-args+: :tangle no

Lists

  1. Inbox
  2. Today
  3. Next
  4. Tomorrow
  5. Scheduled
  6. Someday
  7. Waiting for
(progn

    (setq org-agenda-custom-commands nil)

    (add-to-list 'org-agenda-custom-commands
                 '("0" "Calendar for today" ; For the events.
                   ((agenda ""))
                   ((org-agenda-overriding-header "Calendar for today")
                    (org-agenda-entry-types '(:timestamp :sexp))
                    (org-agenda-span 'day)
                    (org-agenda-sorting-strategy '(time-up))
                    (org-agenda-time-grid '((daily remove-match)
                                            ""
                                            (800 1000 1200 1400 1600 1800 2000))))) t)

    (add-to-list 'org-agenda-custom-commands
                 '("1" "Inbox"
                   ((tags-todo "TODO={NEW}"))
                   ((org-agenda-overriding-header "Inbox")
                    (org-agenda-sorting-strategy '(category-up)))) t)

    ;; Sorting by ascendant deadline does not work.
    (add-to-list 'org-agenda-custom-commands
                 '("2" "Today"
                   ((tags-todo "SCHEDULED<\"<tomorrow>\"|DEADLINE<\"<tomorrow>\"")) ; For tasks with a time component for today.
                   ((org-agenda-overriding-header "Today")
                    (org-agenda-sorting-strategy '(deadline-up)))) t)

    (add-to-list 'org-agenda-custom-commands
                 '("3" "Next"
                   ((tags-todo "TODO<>{NEW\\|SDAY\\|WAIT}"))
                   ((org-agenda-overriding-header "Next")
                    (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
                    (org-agenda-sorting-strategy '(deadline-up)))) t)

    (add-to-list 'org-agenda-custom-commands
                 '("4" "Tomorrow"
                   ((tags-todo "SCHEDULED>=\"<+1d>\"+SCHEDULED<\"<+2d>\""))
                   ((org-agenda-overriding-header "Tomorrow")
                    (org-agenda-sorting-strategy '(deadline-up)))) t)

    (add-to-list 'org-agenda-custom-commands
                 '("6" "Someday"
                   ((tags-todo "TODO={SDAY}"))
                   ((org-agenda-overriding-header "Someday")
                    (org-agenda-filter-preset '("+SDAY"))
                    (org-agenda-sorting-strategy '(deadline-up)))) t)

    (add-to-list 'org-agenda-custom-commands
                 '("7" "Waiting for"
                   ((tags-todo "TODO={WAIT}"))
                   ((org-agenda-overriding-header "Waiting for")
                    (org-agenda-sorting-strategy '(deadline-up)))) t)

)
    (add-to-list 'org-agenda-custom-commands
                 '("Z" "Full list"
                   ((agenda ""
                            ((org-agenda-overriding-header "Calendar for today")
                             (org-agenda-entry-types '(:timestamp :sexp))
                             (org-agenda-span 'day)
                             (org-agenda-sorting-strategy '(time-up))
                             (org-agenda-time-grid '((daily remove-match)
                                                     ""
                                                     (800 1000 1200 1400 1600 1800 2000)))))

                   (tags-todo "TODO={NEW}"
                               ((org-agenda-overriding-header "Inbox")
                                (org-agenda-sorting-strategy '(category-up))))

                   (tags-todo "SCHEDULED<\"<tomorrow>\"|DEADLINE<\"<tomorrow>\"" ; For tasks with a time component for today.
                               ((org-agenda-overriding-header "Today")
                                (org-agenda-sorting-strategy '(deadline-up))))

                   (tags-todo "TODO<>{NEW\\|SDAY\\|WAIT}"
                               ((org-agenda-overriding-header "Next")
                                (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
                                (org-agenda-sorting-strategy '(deadline-up))))

                   (tags-todo "SCHEDULED>=\"<+1d>\"+SCHEDULED<\"<+2d>\""
                               ((org-agenda-overriding-header "Tomorrow")
                                (org-agenda-sorting-strategy '(deadline-up))))

                   (tags-todo "TODO={SDAY}"
                               ((org-agenda-overriding-header "Someday")
                                (org-agenda-filter-preset '("+SDAY"))
                                (org-agenda-sorting-strategy '(deadline-up))))
;; Ignore DEADLINE < tomorrow.
                   (tags-todo "TODO={WAIT}"
                               ((org-agenda-overriding-header "Waiting for")
                                (org-agenda-sorting-strategy '(deadline-up)))))) t)

Chercher l’erreur :

  • WAIT avec ASSIGNEE property
  • DLGT sans ASSIGNEE property
  • SDAY avec SCHEDULED date
  • WAIT avec SCHEDULED (plutôt que DEADLINE)
(progn

    (setq org-agenda-custom-commands nil)

    (add-to-list 'org-agenda-custom-commands
                 '("E1" "Someday with a SCHEDULED date"
                   ((tags-todo "TODO={SDAY}"))
                   ((org-agenda-overriding-header "Someday")
                    (org-agenda-filter-preset '("+SDAY"))
                    (org-agenda-skip-function '(org-agenda-skip-entry-if 'notscheduled))
                    (org-agenda-sorting-strategy '(deadline-up)))) t)


    (defun org-cmp-assignee (a b)
      "Compare the assignee values of strings A and B."
      (let ((aa (or (get-text-property 1 'assignee a) ""))
            (ab (or (get-text-property 1 'assignee b) "")))
        (cond ((string-lessp aa ab) -1)
              ((string-lessp ab aa) +1)
              (t nil)                   ; Same assignee.
              )))

    (setq org-agenda-sorting-strategy
          (quote ((agenda user-defined-up)
                  (todo user-defined-up)
                  (tags user-defined-up)
                  (search user-defined-up))))

    (setq org-agenda-cmp-user-defined 'org-cmp-assignee)

    (add-to-list 'org-agenda-custom-commands
                 '("E7" "Delegated"
                   ((tags-todo "TODO={WAIT}"))
                   ((org-agenda-overriding-header "Waiting For")
                    (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
                    (org-agenda-sorting-strategy '(user-defined-up))
                    (org-agenda-cmp-user-defined 'org-cmp-assignee)
                    (org-agenda-overriding-columns-format "%80ITEM(Task) %32Assignee(Assignee)")
                    (org-agenda-view-columns-initially t)
                   )) t)
)

Ignore SCHEDULED?

  1. (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) WORKS
  2. org-agenda-todo-ignore-scheduled

Tips and tricks

DEADLINE

Writing DEADLINE={} is wrong. You must write:

DEADLINE=""

Tasks with a time component

To be sure to get tasks with a time component in the lists, use

< <tomorrow>

instead of

= <today>

Cas d’erreurs

no statewith TODO
active tsin agendain agenda
scheduled tsin agendain agenda + in tags-todo

Les cas:

  • sans state mais avec SCHEDULED date
  • avec state mais un timestamp actif

devraient être considérés comme erronés…

Footer

(provide 'org-leuven-agenda-views)

;;; org-leuven-agenda-views.el ends here

Tasks

Only show the REFILE section if items are there

https://lists.gnu.org/archive/html/emacs-orgmode/2015-06/msg00266.html

Count of items

“3 of 6”

Overall count: 6 projects.

See Jira workflows

https://www.idalko.com/jira-workflow-best-practices/

JIRA Priority Definition for Bugs

Use this guideline to setup the mandatory “JIRA Priority” field.

Highest

Catastrophic defect that causes total failure of the software or unrecoverable data loss with no available workaround. Complete shut-down of the process, nothing can proceed further. Blocks testing of the product / feature.

Must be fixed in the next build.

High

Severely impaired functionality. Erratic performance and reduced system availability. It may cause major components or features of the system to be unavailable although certain parts of the system remain functional. A workaround may exist but its use is unsatisfactory or at a high time cost (manual intervention required).

Must be fixed in any of the upcoming builds and should be included in the current release.

Medium

Failure of non-critical aspects of the system but results in an inconvenient situation. It causes some undesirable behavior, but the system is still functional. There is a reasonably satisfactory workaround. It is still a valid defect that should be corrected

May be fixed after the release or in the next release.

Low

It won’t cause any major break-down of the system. It does not result in the termination of services, does not impact usability of the system and the desired results can be easily obtained by a workaround.

Fix can be deferred until after more serious defect have been fixed.

Lowest

No impact to the functionality. More related to the enhancement of the system.

May or may not be fixed at all

Look at Podio for nice colors for the agenda buffer

[#C] Organize your tasks, your team and your files

http://manageitapp.com/ (nice look for Web site as well)

Check interesting stuff from LiquidPlanner

http://www.liquidplanner.com/support/videos/daily-task-management/

Convert <+0d> into <today>

Check first that all the correct tasks are shown, the ones with a time part and the ones without…

Si restriction à un fichier (TODO-Org.org), f7 montre les tâches comme venant du collectbox!

Voir s’il faut montrer les tâches quel que soit leur niveau

Éventuellement, ne montrer que les tâches de niveau <= 2.

Dans ce cas, il faudrait que des tâches de niveau 3 ou plus qui aient un SCHEDULE ou un DEADLINE rendent leur tâche parent visible dans l’agenda !

Cela permettrait de garder des status TODO sur les sous-tâches (ce qui bloquerait une fermeture trop aisée de la tâche parent, comme avec des [ ]), tout en ne polluant pas trop les agendas (et les comptes de tâches).

Add limits to number of items in TODO views

See Scrum + Kanban = Scrumban at https://dzone.com/articles/scrum-kanban-scrumban.