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

Make configuration directory a custom variable #536

Closed
rjpower4 opened this issue May 17, 2021 · 4 comments
Closed

Make configuration directory a custom variable #536

rjpower4 opened this issue May 17, 2021 · 4 comments

Comments

@rjpower4
Copy link

From what I can gleam, and correct me if I'm wrong, there is not currently a way to edit the value of racket--config-dir which is set here on lines 190 & 191 of racket-util.el:

(defconst racket--config-dir (file-name-as-directory
                              (locate-user-emacs-file "racket-mode")))

This is used to get the filepath for saving histories in racket-repl.el. It would be nice if that would be configurable, as I am currently unable to move the history file outside of <user-emacs-directory>/racket-mode/Racket-REPL.

@greghendershott
Copy link
Owner

In my experience with various popular Emacs packages:

Some want to persist state between Emacs sessions (e.g. a sqlite db, or a .el file that's just persisted data.) They use a file or directory named after the package. The file or directory is in the user-emacs-directory (e.g. ~/.emacs/).

[I have my personal ~/.emacs/ in a git repo, and the .gitignore has lines for various packages like forge, transient, smex-items, tramp, where for whatever reason I don't need/want that state in my Emacs config repo.]

My intent here was to follow that convention, without giving it too much thought.

The racket--config-dir const was just a "casual", private definition. It doesn't even have a good name ("config" is weird; should be something like "state" or "persist").


So that's the background. I don't mind adding some config variable to control the location. But I'd also like to do some quick research on how other packages handle this -- make sure I'm not re-re-inventing the wheel.

@rjpower4
Copy link
Author

I definitely understand your thought process there, I appreciate you looking into it. Personally, I consolidate all the history files I have in another location (which is likely not the normal). Thanks for the great package!

@greghendershott
Copy link
Owner

greghendershott commented May 17, 2021

I merged a commit to add a new customization variable racket-repl-history-directory.

If you have any problems using it, please let me know. (Keep in mind it may take a few hours for this to flow through to MELPA, as well as the usual caveats about updating Emacs packages.)

@rjpower4
Copy link
Author

Works great thanks!

rjpower4 added a commit to rjpower4/power-emacs that referenced this issue May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants