khal list should stream events
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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