Skip to content

Commit

Permalink
Introduce "Sensible Folder Structure"
Browse files Browse the repository at this point in the history
This aims to setup initial infrastructure to keep state files
inside `crafter-config-var-directory`.

- A setting is created to enable/disable the behaviour (enabled by default)
- A helper function is introduced to ease adding new state files
- This is all documented

Unrelated to the above is:

We add `CUSTOM_ID` to a documentation entry to enable creating an internal link.

This is because according to [orgmode documentation](https://orgmode.org/manual/Internal-Links.html) local
links by ID work only when `CUSTOM_ID` is set.

> (...) a construct like ‘[[#my-custom-id]]’  specifically targets the
entry with the ‘CUSTOM_ID’ property set to ‘my-custom-id’.

Attempting to export `README.org` without this results in an error.
  • Loading branch information
telenieko committed Jul 20, 2022
1 parent a5b21a9 commit 2351fd7
Show file tree
Hide file tree
Showing 5 changed files with 414 additions and 220 deletions.
14 changes: 14 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ external packages, for example:
functionality)
- *Possibly* =vc-mode= by default

** Sensible folder layout

While Emacs tends to keep everything (code, configuration, state files, ...)
inside `user-emacs-directory` modern computer systems tend to keep those
separated.

Crafted Emacs tries to maintain some balance between those two paradigms by
bringing just the right amount of order to it.

See [[file:docs/crafted-emacs.org#folder-structure][Folder structure]] in the documentation for more details.

** Works well in the terminal

Some people prefer to use Emacs in the terminal instead of as a graphical
Expand Down Expand Up @@ -146,6 +157,9 @@ information about how they can be configured!
- crafted-shell :: A starter configuration for =eshell= and =vterm=

* Customization
:PROPERTIES:
:CUSTOM_ID: customization
:END:

To add your own customization to this configuration, create a configuraton file
in one of the following directories:
Expand Down
32 changes: 32 additions & 0 deletions docs/crafted-defaults.org
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,35 @@
#+begin_src emacs-lisp
(savehist-mode -1)
#+end_src

- =crafted-folders= : =t=

Enables the use of a modern folder structure, as explained below.

You can turn this off by adding this code to =config.el= (or
through the Customization UI):

#+begin_src emacs-lisp
(customize-set-variable 'crafted-folders nil)
#+end_src

** Sensible path defaults

Loading this module will make your Emacs, by default, save
several runtime and/or configuration files inside Rational Emacs
=var= directory as explained in [[file:crafted-emacs.org#folder-structure][the documentation]].

This behaviour can be disabled by customizing =crafted-folders=
as explained above.

The list of paths being updated is growing as we aim to have
all state, runtime and/or configuration files stored following
modern practices. What is currently altered is:

- [[help:bookmark-default-file][bookmark-default-file]]
- [[help:nsm-settings-file][nsm-settings-file]]
- [[help:org-id-locations-file][org-id-locations-file]]
- [[help:project-list-file][project-list-file]]
- [[help:savehist-file][savehist-file]]
- [[help:save-place-file][save-place-file]]
- [[help:tramp-persistency-file-name][tramp-persistency-file-name]]
Loading

0 comments on commit 2351fd7

Please sign in to comment.