Skip to content
The English translation is still being built: some pages may lag behind the German ones.
Emacs

Emacs

emacs/samu.el brings samudo into Emacs: views in the style of org-agenda, actions at point, a buffer per task, quick capture, the running clock in the mode line and the Org link type samu:. Everything goes through the command line with --format json, so configuration, session and server are those of samu, a local profile included. Emacs writes as the person signed in there.

Loading

(load "/path/to/samu/emacs/samu.el")
(global-set-key (kbd "C-c s") #'samu)          ; forecast
(global-set-key (kbd "C-c S") #'samu-capture)  ; quick capture
(samu-clock-mode-line-mode 1)                  ; running clock

Options (M-x customize-group RET samu):

Option
samu-executablethe command line, default samu
samu-profileas --profile; nil = the command line’s default profile
samu-server, samu-accountas --server / --account; nil = as the command line
samu-scopenil = as the command line, none = no scope, else a title; S sets it for this Emacs session
samu-link-targetemacs (default) or browser; C-u when following takes the other
samu-web-urlthe web UI, for the browser and for export
samu-capture-linkcapture from a file notes the place
samu-liveopen buffers and the clock follow changes (default on); samu-toggle-live
samu-clock-intervalseconds between updates of the clock

samu-switch-profile and samu-switch-account change profile or account for this Emacs session.

Views

Command
samu, samu-forecastforecast: overdue, today, flagged, the next days, later
samu-inboxtasks without a project
samu-availableavailable, by project
samu-todayplanned for today or earlier
samu-flaggedflagged
samu-projectone project
samu-tagone tag with everything below it
samu-searchwords in title, note, id
samu-projectsall projects; RET opens one
samu-reviewprojects due for review, oldest first
samu-showone task in its own buffer
samu-habit-showone habit: streak, rate, the last 12 weeks, the entries
samu-clock-reportthe time clocked

Under Evil the buffers start in Emacs state.

Keys

The keys are those of the web UI, the navigation that of Emacs. Tasks marked with M take x f m t s X DEL , : C-c C-s C-c C-d e together.

Key
n p, j knext / previous task
RET / TABshow the task / in the other window
xcomplete / reopen
s / tnext state / state by key
fflag on/off
c, I / Oclock toggle; in / out
m, C-c C-wmove: inbox or project, with C-u under a task
eedit with marks: @tag #project !A d:fri ~30m every:1w // note /template z:30m
,priority A/B/C, Space: none
:tags; missing ones are created
C-c C-s / C-c C-dplanned / due, C-u clears
a / Acapture / as a child task
Ccapture with a template: then the template’s key, as in org-capture
/search
X / DELdrop / delete, both ask first
wcopy the samu: link
M u U Bmark, unmark, unmark all, action on the marked
Sscope
Rmark the project reviewed
ha habit, followed by a key
g q ?reload, quit, help

In a task’s buffer also:

Key
Ttitle
Nedit the note (Org or Markdown); C-c C-c saves, C-c C-k discards
Cwrite a comment, likewise
+attach a file
RETon a child: show it; on an attachment: open it; on a property: samu open
oopen a property
lshow/hide the logbook

Action keys act on the child task at point, else on the buffer’s task.

Habits

A row of a habit shows, before the title, what the running period is: ✓ once the goal is met, ✗ for not done today, ‖ for a pause, ○ for not yet. With a unit or a goal above one, the amount follows, like 5/8 Glas or 2/3 Woche, and then the streak, like 🔥4 (samu-habit-streak-mark). A habit to avoid shows frei seit n T. The figures come from samu habit list, once each time a buffer is filled, through the same scope as the view.

Key
h h, h ddone today: +1. C-u 3 h h enters 3, C-u h h asks for an earlier day
h fnot done today; for a habit to avoid, a relapse. C-u asks for the day
h ppause from a day to a day; the streak does not break
h udelete the entry made last, after asking
h sthe habit’s buffer

Entering never completes the habit; x does, and ends it. With tasks marked, h h, h f and h p enter for each of them.

The task buffer of a habit shows its goal, today, the streak and the rates. The habit’s buffer (h s, samu-habit-show) adds the last 12 weeks as a calendar, # done, + partial, x not done, = pause, . nothing, and the entries of that time. DEL on an entry deletes it, RET opens the task, g reloads.

Capture

samu-capture reads a line of quick capture. TAB completes #project, @tag and /template. An active region becomes the note. From a file, an Org link to the line is added (samu-capture-link).

samu-capture-template (in the views C, elsewhere C-u C-u a) works like org-capture: a small window lists the templates with their keys, a key picks one, and the line starts with its /name. Set a key with samu template key <name> <key> or under “Vorlagen” in the web settings.

Org links

samu:<id> is an Org link type once ol is loaded.

  • Following opens a task or project in a task buffer, a tag or folder as a view; with samu-link-target = browser or C-u in the web UI.
  • org-store-link in a samu buffer stores the task at point with its title.
  • C-c C-l samu: RET completes over the open tasks.
  • Export gives <samu-web-url>/o/<id>.

Live

While a samu buffer is open or the clock shows in the mode line, a process samu events runs. Every change, also from the web, the app or the command line, refreshes the open buffers and the clock, after one second of quiet and not while the minibuffer is reading. Point, marks and each window’s first line stay where they were. If the process ends, it reconnects after 5 seconds, then with doubling delays up to a minute.