aboutsummaryrefslogtreecommitdiff
path: root/emacs/README.org
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-06-26 16:02:49 +1000
committerYuchen Pei <id@ypei.org>2023-06-26 16:02:49 +1000
commit30b349d43c1483c7608a020460b535cc0fb29ec1 (patch)
tree1469932c9d4f8cbb18593bcb4b48b3910b191075 /emacs/README.org
parentea1e815c3dc1781aa5cb6d401e233c73fa8a108b (diff)
Adding license files and updating readmes
* COPYING.agpl3: agpl3 license file * README.org: added readme for the repo * emacs/.emacs.d/init/ycp-editing.el: fix hook names * emacs/.emacs.d/init/ycp-project.el: include `my-licenses' in local-config * emacs/.emacs.d/lisp/my/my-editing.el: fix insert pair prompt * emacs/README.org: Move acknowledgement to the main readme; fix verbatim to code. Add instruction on local-config generation * manual/README.org: minor change
Diffstat (limited to 'emacs/README.org')
-rw-r--r--emacs/README.org42
1 files changed, 23 insertions, 19 deletions
diff --git a/emacs/README.org b/emacs/README.org
index 7dc1366..5f2a094 100644
--- a/emacs/README.org
+++ b/emacs/README.org
@@ -1,11 +1,12 @@
-:PROPERTIES:
-:UPDATED: [2023-06-12 Mon 15:28]
-:END:
#+title: Yuchen Pei's GNU Emacs Configuration
#+author: Yuchen Pei
#+language: en
#+email: id@ypei.org
+* Intro
+ :PROPERTIES:
+ :UPDATED: [2023-06-26 Mon 16:02]
+ :END:
I started using Emacs and ditched Vim in 2020, and the content of this
repo is the result of the config over the years. This config has
several characteristics.
@@ -15,32 +16,32 @@ quest to realise it always favours the Emacs core, followed by the GNU
ELPA, then the NonGNU ELPA. In the same spirit, the keybindings follow
the convention of Emacs core.
-Acknowledgement: this config is influenced by many people's configs,
-most notably Protesilaos Stavrou's, both in organisation and the
-actual configuration.
-
+* Organisation
+ :PROPERTIES:
+ :UPDATED: [2023-06-26 Mon 15:49]
+ :END:
Here's how the files are organised:
- The =early-init.el= file :: The first file loaded by emacs, it
does the following
- - Set the =my-profile= variable from the =EMACS_PROFILE= environment
+ - Set the ~my-profile~ variable from the ~EMACS_PROFILE~ environment
variable. This variable controls which packages to allow or
- ignore. Examples include =emms= and =erc= which causes a dedicated
- emacs instance to run =emms= or =erc=, in which case most packages
+ ignore. Examples include ~emms~ and ~erc~ which causes a dedicated
+ emacs instance to run ~emms~ or ~erc~, in which case most packages
are disabled. The default profile, by contrast, disables these two
packages.
- Add a hook to report the time taken at the end of initialisation
- Some optimizations
-- The =init.el= file :: The init file, it adds the =load-path=, and
- =requires='s ='my-package=, ='ycp-package= and the remaining
- configurations. Apart from =my-package= and =ycp-package=, the
- remaining =require='s may be needed to be in a loose order.
+- The =init.el= file :: The init file, it adds the ~load-path~, and
+ ~requires~'s ~'my-package~, ~'ycp-package~ and the remaining
+ configurations. Apart from ~my-package~ and ~ycp-package~, the
+ remaining ~require~'s may be needed to be in a loose order.
- The =lisp/my/my-package.el= file :: This file defines macros needed
by the rest of the initialisation. After comparing [[https://protesilaos.com/emacs/dotemacs][Protesilaos
Stavrou's]] and [[https://github.com/jwiegley/dot-emacs][John Wiegley's]] approaches, I decided to adopt the
- former, with the simple =my-package= macro, given that the delay and
+ former, with the simple ~my-package~ macro, given that the delay and
installation directives are sufficient for the use of this config,
and it is closer to the emacs core. Another design decision is to
not use org literate configuration.
@@ -49,16 +50,19 @@ Here's how the files are organised:
config. The local config is a mechanism for separating out variables
concerning machine-specific and/or personal information from the
emacs config files in this repository. Values of these variables are
- set with the macro =my-setq-from-local= after running
- =my-read-from-local-config= to read the local config in
- =my-local-config=.
+ set with the macro ~my-setq-from-local~ after running
+ ~my-read-from-local-config~ to read the local config in
+ ~my-local-config~. To generate a local config file from all the
+ variables used in ~my-setq-from-local~ with their current values,
+ invoke the function ~my-collect-my-setqd-vars~ which will print out
+ an alist that you can put in a local config file.
Finally, this file defines some other convenience macros for
overriding functions and setting timers.
- The =init/ycp-package.el= file :: This file determines what packages
to allow or omit depending on the profile, calls
- =my-read-from-local-config= as mentioned above, starts the server,
+ ~my-read-from-local-config~ as mentioned above, starts the server,
and sets the package archives to use. It also configure package
related options, like the rest of the files in the =init= directory.