Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute file path to repl history file at runtime if #559

Merged
merged 3 commits into from
Nov 11, 2022

Conversation

keram
Copy link
Contributor

@keram keram commented Nov 8, 2022

it is not specified by user using idris-repl-history-file variable.

Why:
Previously the idris-repl-history-file used as default hardcoded path ~/.idris/idris-history.eld. However the Idris 2 uses/creates
~/.idris2 directory, meaning if an user with only Idris 2 installed
tries to exit Emacs he is prompted with an error:

History file not writable: ~/.idris/idris-history.eld" while saving the
history. Continue? (y or n)

This change also allows users with both Idris and Idris2 installed switch between them just by changing the interpreter variable and have separate repl histories for both version.

idris-settings.el Outdated Show resolved Hide resolved
@keram keram changed the title Compute file path to repl history file runtime if Compute file path to repl history file at runtime if Nov 8, 2022
it is not specified by user using `idris-repl-history-file` variable.

Why:
Previously the `idris-repl-history-file` used as default hardcoded path
`~/.idris/idris-history.eld`. However the Idris 2 uses/creates
 `~/.idris2` directory, meaning if an user with only Idris 2 installed
tries to exit Emacs he is prompted with error:

```
History file not writable: ~/.idris/idris-history.eld" while saving the
history. Continue? (y or n)
```

This change also allows users with both Idris and Idris2 installed
switch between them just by changing the interpreter variable
and have separate repl histories for both version.
@keram
Copy link
Contributor Author

keram commented Nov 10, 2022

Fixes #504

@jfdm
Copy link
Contributor

jfdm commented Nov 11, 2022

This is interesting, my commit seems to have broken something. I've made one adjustment, but I will merge regardless as it could be a caching issues. It can be fixed later.

@jfdm
Copy link
Contributor

jfdm commented Nov 11, 2022

i have found the culprit. Will do a PR with a fix.

@jfdm jfdm merged commit ea83139 into idris-hackers:main Nov 11, 2022
@keram keram deleted the repl-history-file-f branch November 20, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants