pprevos / emacs-writing-studio

Emacs configuration for authors who research, write and publish articles, books and websites.
https://lucidmanager.org/tags/emacs/
GNU General Public License v3.0
476 stars 30 forks source link

use custom XDG user directories #9

Closed HiTuX closed 5 months ago

HiTuX commented 5 months ago

Helllo Peter, Thank you so much for creating and maintaining such a "lucid" configuration.

I have customized XDG user dirs names, e.g. Documents is docs, Downloads is net, Videos is vids, Templates is docs/templates, etc ... Thus, when using your config, some packages like denote and elfeed create Documents folder in my home and put their files there. I can change that in ews.el and init.el, However I think it would be nice if you make your config more general and reckon locale names by using xdg-user-dir buil-in function instead of hard code it:

(xgd-user-dir "DOCUMENTS")

retruns

/home/USER/docs
pprevos commented 5 months ago

Hi @HiTuX ,

The denote-directory variable is not configured in the EWS init file. In the forthcoming EWS book I am recommending to use M-x customize-variable RET denote directory (website still needs updating). EWS will store this config in custom.el.

The default for denote-directory is hard-coded in the Denote package. Perhaps raise an issue with Prot on https://github.com/protesilaos/denote to make it more malleable.

Check the customizable variables for EWS with M-x customize-group RET ews and set them accordingly.

HiTuX commented 5 months ago

will raise the issue with pro.

I try my best to avoid customize-group as it creates custom.el or customize section that is advised to NOT edit manually. I prefer to edit init.el file directly.

pprevos commented 5 months ago

That is what I do. However, I designed EWS for beginners and wrote it to leverage the customisation tools.

EWS is not a maintained config like Doom. It is designed to learn Emacs, so just modify the init file to meet your needs.

HiTuX commented 5 months ago

denote-directory can be set with (setq denote-directory "~/docs/denotes/"). The issue hold with elfeed and ews-bibtex-directory.

pprevos commented 5 months ago

Feel free to submit a pull request for init.el and ews.el (so you get the credit) or would you like me to make the changes?

HiTuX commented 5 months ago

After rethinking about it, I hesitate to submit a pull request.

Actually Denote package implemented the xdg feature in version 0.5.0, then removed it in version 2.0.0.

The motive for the removal is explained by Prot:

The reason is that XDG is a Linux standard that does not work on other operating systems, according to private feedback I received.

Thus, to keep EWS usable for all people on other OS, I abstain from introducing xdg-user-dir. sorry for inconvenience.

pprevos commented 5 months ago

No worries, I learnt something new :)