Commit graph

28 commits

Author SHA1 Message Date
Henrik Lissner
4dc888d104
Tangle org files on save if in same dir as config.org 2020-08-28 04:33:56 -04:00
Henrik Lissner
362f101227
config/literate: fix hanging paren
Whoopsidoodlepopsicolanumptywombatbiscuitmuffin.
2020-08-27 17:30:43 -04:00
Henrik Lissner
666ea63591
config/literate: make default tangle target DOOMDIR/config.el
Rather than ./config.el, which means it will end up in the wrong place
if the user moves their config.org out of $DOOMDIR or into a
subdirectory.
2020-08-27 17:19:52 -04:00
Henrik Lissner
63a03848a3
Fix literate tangling on 'doom sync'
Relevant to #3746
2020-08-25 06:01:35 -04:00
Henrik Lissner
a8b7c00426
config/literate: don't add save hook more than once
Hinders the user's ability to disable tangle-on-save behavior.
2020-08-22 17:40:25 -04:00
Henrik Lissner
f83e6fe1cc
Fix #3804: rename TANGLE -> __TANGLE
So 'doom env' will naturally exclude it.
2020-08-22 03:37:14 -04:00
Henrik Lissner
bb1e2247dd
Fix #3781: command not found
Due to overzealous quoting.
2020-08-19 12:45:23 -04:00
Henrik Lissner
9b991fc29f
Fix #3781: revert 55b87b3a9 2020-08-19 12:10:14 -04:00
Henrik Lissner
55b87b3a94
bin/doom: source postscript instead
This way the postscript can refer to the doom script via "$0" and its
arguments via "$@" (making it easier for cli commands to rerun the last
command).
2020-08-18 20:32:34 -04:00
Henrik Lissner
cbebbd5278
Fix #3746: bin/doom hangs after tangling config
Because +literate-tangle-h wasn't returning non-nil in interactive
sessions.
2020-08-14 00:00:36 -04:00
Henrik Lissner
64dfc709bf
Fix #3729: config.org not getting tangled
Because the wrong file is being inserted into the temporary org buffer,
org never finds anything to tangle!
2020-08-11 14:00:33 -04:00
Henrik Lissner
eb9cb0c6e9
Fix org version conflicts due to literate config #3649
Tangling would load org libraries. If org hasn't been installed yet,
this means the older version is loaded, later interfering with the
installation and byte-compilation of the new package, causing down the
road.
2020-08-09 01:50:42 -04:00
Henrik Lissner
d2bc2ff44b
config/literate: improve tangling algorithm
- Tangling no longer adds temp files to recentf (#3685)
- If :tangle yes is used, the result is no longer tangled to
  /tmp/config.org.*.el
- In interactive sessions the org buffer is no longer interfered with
  when tangling (by scrolling up to the top of the page, or undoing
  overlays/markers).
- Tangling no longer triggers formatters (or any save/write hooks).
- Appease byte-compiler sama, complaining about free variables.
2020-08-08 02:57:04 -04:00
Henrik Lissner
00a8f750ed
Fix wrong-type-arg: stringp when tangling config.org 2020-08-05 03:32:21 -04:00
Henrik Lissner
01c5c35686
Fix #3688: failure tangling config.org 2020-08-04 18:04:15 -04:00
Henrik Lissner
f641bf4554
Fix 'void-variable: backup' error
Fixes my fix for #3685
2020-08-04 13:58:40 -04:00
Henrik Lissner
8580b53e8e
Fix #3685: don't mutate org buffer when tangling
If the buffer doesn't change, the cursor won't move.
2020-08-04 13:43:14 -04:00
Henrik Lissner
6a64f37435
Minor refactors & revision across the board 2020-07-31 01:39:24 -04:00
Henrik Lissner
711e687709
config/literate: expand #+INCLUDE directives
It's surprising that tangling doesn't expand #+INCLUDE directives. It's
so useful for literate configs I decided to expand them manually before
tangling (and relative to DOOMDIR, unless given an absolute path).
2020-07-25 22:33:52 -04:00
Henrik Lissner
3aeb177847
Add +literate-enable-recompile-h to enable save-on-tangle 2020-07-24 15:21:44 -04:00
Hanno Perrey
14d6a19462
fix for #3266: wrong-type-arg stringp from format (#3599)
Triggered e.g. by pdf-tools-install when tangling literate config on
interactive save and epdfinfo is missing
2020-07-20 22:13:50 -04:00
Henrik Lissner
e1f73bd7cb
Fix void-function +literate-tangle-h on saving org files 2020-05-26 01:00:49 -04:00
Henrik Lissner
1916d26c75
Fix void-function +literate-tangle 2020-05-25 18:18:10 -04:00
Henrik Lissner
20cddb3565
config/literate: fix tangling on 'doom sync' 2020-05-25 16:03:34 -04:00
Henrik Lissner
149b2617b0
💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
Henrik Lissner
5cdc2127be
Refactor config/literate module
+ Now recompiles literate config if you modify org files in DOOMDIR
+ Replaced +literate/compile with +literate/reload
+ Calls org-babel-tangle-file directly if org package is loaded
+ Change mtime check mechanism for literate tangling at startup
2019-03-28 01:59:25 -04:00
Henrik Lissner
21779f66ad
config/literate: remove compile-on-save hooks
Too volatile and slow.
2018-06-05 16:35:16 +02:00
Henrik Lissner
47efd56fd4
compile/literate: refactor & recompile on save
And add autoloaded commands. This may need work to ensure you don't
spawn multiple instances of Emacs all vying to compile the same file.
2018-06-05 16:09:03 +02:00