Zwillingssterns Weltenwald
Published on Zwillingssterns Weltenwald (http://www.xn--drachentrnen-ocb.de)

Startseite > El Kanban Org: parse org-mode todo-states to use org-tables as Kanban tables

El Kanban Org: parse org-mode todo-states to use org-tables as Kanban tables

Kanban [1] for emacs [2] org-mode [3].

Update (2020): Kanban moved to sourcehut: https://hg.sr.ht/~arnebab/kanban.el [4]

Update (2013-04-13): Kanban.el now lives in its own repository: on bitbucket [5] and on a statically served http-repo [6] (to be independent from unfree software).

Update (2013-04-10): Thanks to Han Duply, kanban links now work for entries from other files. And I uploaded kanban.el on marmalade [7].

Some time ago I learned about kanban, and the obvious next step was: “I want to have a kanban board from org-mode”. I searched for it, but did not find any. Not wanting to give up on the idea, I implemented my own :)

The result are two functions: kanban-todo and kanban-zero.

“Screenshot” :)

TODODOINGDONE
Refactor in such a way that the
let Presentation manage dumb sprites
return all actions on every command:
Make the UiState adhere the list of
Turn the model into a pure state

kanban-todo

kanban-todo provides your TODO items as kanban-fields. You can move them in the table without having duplicates, so all the state maintenance is done in the kanban table. Once you are finished, you mark them as done and delete them from the table.

To set it up, put kanban.el [8] somewhere in your load path and (require 'kanban) (more recent but potentially unstable version [9]). Then just add a table like the following:

|   |   |   |
|---+---+---|
|   |   |   |
|   |   |   |
|   |   |   |
|   |   |   |
#+TBLFM: $1='(kanban-todo @# @2$2..@>$>)::@1='(kanban-headers $#)

Click C-c C-c with the point on the TBLFMT line to update the table.

The important line is the #+TBLFM. That says “use my TODO items in the TODO column, except if they are in another column” and “add kanban headers for my TODO states”

The kanban-todo function takes an optional parameter match, which you can use to restrict the kanban table to given tags. The syntax is the same as for org-mode matchers [10]. The third argument allows you to provide a scope [11], for example a list of files.

To only set the scope, use nil for the matcher.

See C-h f org-map-entries and C-h v org-agenda-files for details.

kanban-zero

kanban-zero is a zero-state Kanban: All state is managed in org-mode and the table only displays the kanban items.

To set it up, put kanban.el [8] somwhere in your load path and (require 'kanban). Then just add a table like the following:

|   |   |   |
|---+---+---|
|   |   |   |
|   |   |   |
|   |   |   |
|   |   |   |
#+TBLFM: @2$1..@>$>='(kanban-zero @# $#)::@1='(kanban-headers $#)

The important line is the #+TBLFM. That says “show my org items in the appropriate column” and “add kanban headers for my TODO states”.

Click C-c C-c with the point on the TBLFMT line to update the table.

The kanban-zero function takes an optional parameter match, which you can use to restrict the kanban table to given tags. The syntax is the same as for org-mode matchers [10]. The third argument allows you to provide a scope [11], for example a list of files.

To only set the scope, use nil for the matcher.

An example for matcher and scope would be:

#+TBLFM: @2$1..@>$>='(kanban-zero @# $# "1w6" '("/home/arne/.emacs.d/private/org/emacs-plan.org"))::@1='(kanban-headers $#)

See C-h f org-map-entries and C-h v org-agenda-files for details.

Contribute

To contribute to kanban.el, just change the file and write a comment about your changes. Maybe I’ll setup a repo on Bitbucket at some point…

Example

In the Hexbattle [12] game-draft, I use kanban to track my progress:

Table of Contents

  • 1 Kanban
  • 2 refactor Hexbattle
    • 2.1 Structure plan:
    • 2.2 First all logic from UiState into the model. Model gets all state which is independent of the UI. Any necessary interaction in UiState calls model methods. √
    • 2.3 Refactor in such a way that the UiState and (even more importantly) the input do not need to call the model directly anymore.
      • 2.3.1 let Presentation manage dumb sprites for all chars which are active. Then I can remove a lot of UiState dependent functionality from the chars.
      • 2.3.2 return all actions on every command: command(…) → commands (instance of Commands).
    • 2.4 Make the UiState adhere the list of possible commands.
    • 2.5 Turn the model into a pure state machine.

1 Kanban

❢STARTED✔
Refactor in such a way that the
let Presentation manage dumb sprites
return all actions on every command:
Make the UiState adhere the list of
Turn the model into a pure state

2 refactor Hexbattle    1w6

… and so on …

Advanced usage

“Graphical” TODO states

To make the todo states easier to grok directly you can use unicode symbols for them. Example:

#+SEQ_TODO: ❢ ☯ ⧖ | ☺ ✔ DEFERRED ✘
| ❢ | ☯ | ⧖ | ☺ | |---+---+---+---| | | | | | #+TBLFM: @1='(kanban-headers $#)::@2$1..@>$>='(kanban-zero @# $#)

In my setup they are ❢ (todo) ☯ (doing) ⧖ (waiting) and ☺ (to report). Not shown in the kanban Table are ✔ (finished), ✘ (dropped) and deferred (later), because they don’t require any action from me, so I don’t need to see them all the time.

Collecting kanban entries via SSH

If you want to create a shared kanban table, you can use the excellent transparent network access options from Emacs tramp to collect kanban entries directly via SSH.

To use that, simply pass an explicit list of files to kanban-zero as 4th argument (if you don’t use tag matching just use nil as 3rd argument). "/ssh:host:path/to/file.org" retrieves the file ~/path/to/file.org from the host.

| ❢ | ☯ |
|---+---|
|   |   |
#+TBLFM: @1='(kanban-headers $#)::@2$1..@>$>='(kanban-zero @# $# nil (list (buffer-file-name) "/ssh:localhost:plan.org"))

Caveeat: all included kanban files have to use at least some of the same todo states: kanban.el only retrieves TODO states which are used in the current buffer.

AnhangGröße
kanban.el [8]5.86 KB
Werke von Arne Babenhauserheide. Lizensiert, wo nichts anderes steht, unter der GPLv3 or later und weiteren freien Lizenzen.

Diese Seite nutzt Cookies. Und Bilder. Manchmal auch Text. Eins davon muss ich wohl erwähnen — sagen die meisten anderen, und ich habe grade keine Zeit, Rechtstexte dazu zu lesen…


Source URL: http://www.xn--drachentrnen-ocb.de/light/english/free-software/el-kanban-org-table

Links:
[1] http://en.wikipedia.org/wiki/Kanban
[2] http://gnu.org/software/emacs
[3] http://www.xn--drachentrnen-ocb.de/orgmode.org
[4] https://hg.sr.ht/~arnebab/kanban.el
[5] https://bitbucket.org/ArneBab/kanban.el
[6] http://draketo.de/proj/kanban/
[7] http://marmalade-repo.org/packages/kanban/0.1.1
[8] http://www.xn--drachentrnen-ocb.de/files/kanban.el
[9] https://bitbucket.org/ArneBab/.emacs.d/src/fluss/lisplets/kanban.el
[10] http://orgmode.org/manual/Matching-tags-and-properties.html
[11] http://orgmode.org/manual/Agenda-files.html#fn-1
[12] http://bitbucket.org/ArneBab/hexbattle