Consider storing persistent history under XDG_STATE_HOME
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- backend
Research direction
Start by locating how Lem resolves lem-home and how persistent history paths are constructed; the issue does not name specific files or tests. Check the project’s existing path and configuration conventions, then determine how history can use an XDG state directory while preserving LEM_HOME compatibility. Done means persistent history uses the separate state location with the stated fallback, while configuration remains under LEM_HOME.
Written by the indexing model from the issue text.
Description
Lem currently stores persistent history under (lem-home)/history,
which normally resolves to:
$XDG_CONFIG_HOME/lem/history
This means mutable application state is stored alongside user
configuration.
Persistent history such as recent files, command history, project
history, and REPL history seems to fit better under XDG_STATE_HOME,
for example:
$XDG_STATE_HOME/lem/history/
with the usual fallback:
~/.local/state/lem/history/
This also matters for declarative configuration managers such as
GNU Guix Home or Nix/Home Manager, where $XDG_CONFIG_HOME/lem
may be managed as an immutable/read-only directory.
Would it make sense for Lem to support a separate state directory,
perhaps something like lem-state-home, while keeping the existing
LEM_HOME behavior for backwards compatibility?
For example:
$XDG_CONFIG_HOME/lem/init.lisp
$XDG_STATE_HOME/lem/history/files
$XDG_STATE_HOME/lem/history/projects
$XDG_STATE_HOME/lem/history/commands
$XDG_STATE_HOME/lem/history/lisp-repl
I also noticed that some other mutable data, such as logs, is currently
stored relative to lem-home, but I'm keeping this issue specifically
about persistent history.
- Dominant language
- Common Lisp
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 133
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from lem-project/lem
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
lem-project/lem#2525 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
lem-project/lem#2524 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lem-project/lem#2488 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lem-project/lem#2369 ·
Maintainers usually reply within 1 day
-
unix-paste-bugOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lem-project/lem#2360 ·
Maintainers usually reply within 1 day
Similar issues
-
v3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pluginkollektiv/antispam-bee#952 ·
Maintainers usually reply within 1 day
-
PROJECT: website-redesign volunteers
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
thewca/worldcubeassociation.org#16981 ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:core kind:bug priority:p3 ready
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day