pimutils / pimutils/khal

khal list should stream events

Open
#1,354 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

Describe the bug

I want to run khal --color list now 2026-01-01 | less and be able to scroll down to see events in future.

Expected behavior

khal should print events one-per-line, one line at a time. less can then show output it is printed. Because less will block khal's stdout, khal won't waste time generating events which are never scrolled into view.

Actual behaviour

khal blocks generating its entire output before printing. khal list now 2026-01-01 takes 1550ms to run. less wont show any output until those 1550ms transpire.

Version

khal, version 0.11.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with khal --color list now 2026-01-01 | less and compare when output becomes visible with the direct command. Trace the khal list entry point and its output generation to find where the complete result is buffered. Done means events are emitted one per line as they are generated, allowing less to display early output without generating unseen events.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.