Commit graph

846 commits

Author SHA1 Message Date
Henrik Lissner
ea18c83c0a
General refactors & reformatting across the board 2020-05-15 01:44:53 -04:00
Henrik Lissner
0e851ace9b
Backport bits of CLI rewrite
The rewrite for Doom's CLI is taking a while, so I've backported a few
important changes in order to ease the transition and fix a couple bugs
sooner.

Fixes #2802, #2737, #2386

The big highlights are:

- Fix #2802: We now update recipe repos *before* updating/installing any
  new packages. No more "Could not find package X in recipe repositories".

- Fix #2737: An edge case where straight couldn't reach a pinned
  commit (particularly with agda).

- Doom is now smarter about what option it recommends when straight
  prompts you to make a choice.

- Introduces a new init path for Doom. The old way:
  - Launch in "minimal" CLI mode in non-interactive sessions
  - Launch a "full" interactive mode otherwise.
  The new way
  - Launch in "minimal" CLI mode *only* for bin/doom
  - Launch is a simple mode for non-interactive sessions that still need
    access to your interactive config (like async org export/babel).
  - Launch a "full" interactive mode otherwise.

  This should fix compatibility issues with plugins that use the
  async.el library or spawn child Emacs processes to fake
  parallelization (like org's async export and babel functionality).

- Your private init.el is now loaded more reliably when running any
  bin/doom command. This gives you an opportunity to configure its
  settings.

- Added doom-first-{input,buffer,file}-hook hooks, which we use to queue
  deferred activation of a number of packages. Users can remove these
  modes from these hooks; altogether preventing them from loading,
  rather than waiting for them to load to then disable them,
  e.g. (after! smartparens (smartparens-global-mode -1)) -> (remove-hook
  'doom-first-buffer #'smartparens-global-mode)

  Hooks added to doom-first-*-hook variables will be removed once they
  run.

  This should also indirectly fix #2386, by preventing interactive modes
  from running in non-interactive session.

- Added `doom/bump-*` commands to make bumping modules and packages
  easier, and `doom/bumpify-*` commands for converting package!
  statements into user/repo@sha1hash format for bump commits.

- straight.el is now commit-pinned, like all other packages. We also
  more reliably install straight.el by cloning it ourselves, rather than
  relying on its bootstrap.el.

  This should prevent infinite "straight has diverged from master"
  prompts whenever we change branches (though, you might have to put up
  with it one more after this update -- see #2937 for workaround).

All the other minor changes:

- Moved core/autoload/cli.el to core/autoload/process.el
- The package manager will log attempts to check out pinned commits
- If package state is incomplete while rebuilding packages, emit a
  simpler error message instead of an obscure one!
- Added -u switch to 'doom sync' to make it run 'doom update' afterwards
- Added -p switch to 'doom sync' to make it run 'doom purge' afterwards
- Replace doom-modules function with doom-modules-list
- The `with-plist!` macro was removed, since `cl-destructuring-bind`
  already serves that purpose well enough.
- core/autoload/packages.el was moved into core-packages.el
- bin/doom will no longer die if DOOMDIR or DOOMLOCALDIR don't have a
  trailing slash
- Introduces doom-debug-variables; a list of variables to toggle on
  doom/toggle-debug-mode.
- The sandbox has been updated to reflect the above changes, also:
  1. Child instances will no longer inherit the process environment of
     the host instance,
  2. It will no longer produce an auto-save-list directory in ~/.emacs.d
2020-05-15 01:33:52 -04:00
Henrik Lissner
043a561565
Fix #3123: wrong-type-arg stringp error from org-encrypt-string
Due to upstream issue (read comments).
2020-05-14 15:42:13 -04:00
Henrik Lissner
558ea08411
Disable slow smartparens-org defaults in org-mode
But keep its base defaults.

Relevant to #452
2020-05-13 22:48:42 -04:00
Henrik Lissner
a10c157d87
Fix zr, zm, zR & zM vimmish folding in org-mode
Fixes the following keybinds for evil users:

z r        open next level of headings buffer-wide
z m        close next level of headings buffer-wide
z R        open all folded headings
z M        close all folded headings
[N] z R    open all headings at level N and above
[N] z M    close all headings at level N and below
2020-05-13 19:31:09 -04:00
Henrik Lissner
7bbb52f17c
No longer disable org-highlight-sparse-tree-matches
The original issue it was meant to fix no longer occurs in recent
versions of org.
2020-05-13 16:06:25 -04:00
Henrik Lissner
717d53c666
Tweak GC settings, particularly for org & lsp
These two modes are particularly expensive. This needs more
testing.
2020-05-12 19:59:14 -04:00
Henrik Lissner
bc5bbb1770
Fix #3102: move org-habit init back into hook 2020-05-12 05:15:55 -04:00
Henrik Lissner
7cf2109b1a
Don't error on missing org contrib feature 2020-05-11 04:53:39 -04:00
Henrik Lissner
f9a677427e
Replace save-after-refile advice with hook
A hook is better than an advice, which could break with an update.

Also, reformat org-mks advice.
2020-05-11 03:11:15 -04:00
Henrik Lissner
129eebcf2a
Only configure org-habit if in org-modules
Rather than force org-habit even on folks that don't use it.
2020-05-11 03:11:15 -04:00
Henrik Lissner
23b5a6c142
lang/org: refactor how module loads flag features 2020-05-11 03:00:08 -04:00
Henrik Lissner
31e4bfb2d4
Don't unfold to 2nd level in org-mode by default
This is too opinionated to be a default, and has thus been replaced with
"unfold subtree around point when opening an org file", in case
saveplace has restored the point to a folded region.
2020-05-11 03:00:08 -04:00
Henrik Lissner
05e1c0d782
Bump :lang org
Kungsgeten/org-brain@ae7fe0f -> Kungsgeten/org-brain@ed99f7e
emacs-straight/org-mode@b171ff0 -> emacs-straight/org-mode@20c1322
jethrokuan/company-org-roam@0913d86 -> jethrokuan/company-org-roam@3da3821
jethrokuan/org-roam@689f559 -> jethrokuan/org-roam@ad5fca5
2020-05-11 03:00:08 -04:00
Antoine Martin
1fccec181c Unify org-agenda-clock bindings with org-clock
Following b40d85e9b
2020-05-10 16:09:45 +02:00
yoavm448
0d821f4ebd Add org-roam doctor check for the dot executable 2020-05-08 14:06:54 +03:00
Henrik Lissner
9a7f46fff3
Fix journal org files not opening in org-journal
Should also fix any lingering "No year zero" errors.
2020-05-08 05:46:19 -04:00
Henrik Lissner
2db423897c
Fix #2539: autoload org-attach commands 2020-05-08 01:27:08 -04:00
Henrik Lissner
47571446b9
Use org-download-dnd instead of inhouse dnd handler
Possibly fixes #3056
2020-05-08 01:27:08 -04:00
Henrik Lissner
9e9f4a2559
Bump :lang org
abo-abo/org-download@48d3952 -> abo-abo/org-download@d248fcb
emacs-straight/org-mode@e5eda0b -> emacs-straight/org-mode@b171ff0
jethrokuan/org-roam@e698ed7 -> jethrokuan/org-roam@689f559
2020-05-07 01:15:58 -04:00
Henrik Lissner
994028b1e9
Fix #3056: image previews for attachment links 2020-05-07 00:54:41 -04:00
Henrik Lissner
5b23b3d486
Add popup rule for org-journal search commands 2020-05-07 00:23:46 -04:00
Henrik Lissner
333bdd44c0
Fix "no year zero" error when starting org-journal 2020-05-07 00:23:29 -04:00
Henrik Lissner
d4242c4ec3
Fix 'No such file or directory, ob-elisp' error
When running async elisp src blocks in org-mode.
2020-05-06 02:57:12 -04:00
Henrik Lissner
158963028e
Fix fallback character for org-superstar in terminals 2020-05-05 21:45:19 -04:00
Henrik Lissner
bef3457232
Remove redundant or invalid settings from org module
These have either been removed upstream or already match their defaults.
2020-05-02 22:47:26 -04:00
Henrik Lissner
5a54ef1f9f
Fix org-crypt not running when saving org files 2020-05-02 17:52:22 -04:00
Henrik Lissner
17a66004f0
Bump :lang org
abo-abo/org-download@d542a30 -> abo-abo/org-download@48d3952
emacs-straight/org-mode@90cf500 -> emacs-straight/org-mode@e5eda0b
jethrokuan/org-roam@65d99e9 -> jethrokuan/org-roam@e698ed7
kaushalmodi/ox-hugo@5106b43 -> kaushalmodi/ox-hugo@8f36181
2020-05-02 13:17:10 -04:00
Henrik Lissner
1152b2c7bc
Default org-crypt to epa-file-encrypt-to 2020-04-30 14:37:06 -04:00
Henrik Lissner
64c2efa2fc
Bump :lang org
Kungsgeten/org-brain@7ffbf68 -> Kungsgeten/org-brain@ae7fe0f
abo-abo/org-download@46417e2 -> abo-abo/org-download@d542a30
anler/centered-window-mode@24f7c5b -> anler/centered-window-mode@f508599
jethrokuan/org-roam@963692f -> jethrokuan/org-roam@65d99e9

We're also transitioning from abbreviated SHA1 hashes to full ones. See
45cdfb125 for why.
2020-04-30 02:02:21 -04:00
Henrik Lissner
d12752324a
Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
Henrik Lissner
f28a972861
Disable org-highlight-latex-and-related
It is far too slow to enable by default.

Fixes #2998
2020-04-29 02:42:45 -04:00
Henrik Lissner
0e50db55a0
Fix #2972: infinite recursion in org + python src blocks 2020-04-28 18:43:15 -04:00
Henrik Lissner
d34633cb0a
Bump to emacs-straight/org-mode@e68ae40
From emacs-straight/org-mode@3106837

Fixes #2993
2020-04-28 14:39:10 -04:00
Henrik Lissner
82f9dc2566
Fix #2972: infinite recursion in org src blocks 2020-04-27 17:43:29 -04:00
Henrik Lissner
3e67f8f801
Fix C-{S,M}-RET in tty Emacs 2020-04-27 17:30:23 -04:00
Henrik Lissner
019e988b8d
org-roam-graph-show -> org-roam-graph
org-roam-graph-show is deprecated

Closes #2987
2020-04-27 13:33:00 -04:00
Henrik Lissner
d6c5d18a87
Bump to emacs-straight/org-mode@3106837
From emacs-straight/org-mode@14d6f95

Fixes void-function org-get-outline-path when invoking eldoc, because
org-get-outline-path was moved to org-refile in a recent refactor
upstream.
2020-04-26 20:42:57 -04:00
Henrik Lissner
bba82465a0
Bump :lang org
hlissner/evil-org-mode@4d44e9b -> hlissner/evil-org-mode@9cf661a
2020-04-25 21:45:31 -04:00
Henrik Lissner
a16b305c0f
Add REVIEW comment for org-roam symlink advice
See jethrokuan/org-roam#518
2020-04-25 16:24:31 -04:00
Henrik Lissner
afe3033627
Bump :lang org
Kungsgeten/org-brain@3630eb8 -> Kungsgeten/org-brain@7ffbf68
bastibe/org-journal@3fdb5b3 -> bastibe/org-journal@8bf06b2
dzop/emacs-jupyter@62ad054 -> dzop/emacs-jupyter@785edbb
emacs-straight/org-mode@9994e8e -> emacs-straight/org-mode@14d6f95
fuxialexander/org-pdftools@22d9a36 -> fuxialexander/org-pdftools@8cc15bb
jethrokuan/org-roam@6175739 -> jethrokuan/org-roam@963692f
kaushalmodi/ox-hugo@b6f4142 -> kaushalmodi/ox-hugo@5106b43
2020-04-25 16:10:02 -04:00
Henrik Lissner
b93e3e41ed
Fix duplicate files in org-roam db due to symlinks 2020-04-25 16:07:20 -04:00
Henrik Lissner
e68e68755b
Don't auto-open roam buffer in capture popups 2020-04-25 15:52:38 -04:00
Henrik Lissner
6cb1390fac
Fix #2968: refactor how org-directory default is set 2020-04-25 15:43:05 -04:00
Henrik Lissner
2d1a2ed8b3
Fix basic links not returning correct paths
A silly typo by a silly goose.
2020-04-25 01:55:54 -04:00
Henrik Lissner
8c1525e3d8
Rewrite org-download/attach systems
+ Cut down on unnecessary code & advice
+ Fix 'attach and 'download methods for org-download so that a) their
  links actually work and b) inline previews of their links show up.
+ Allow users to only set org-attach-id-dir (which will be mirrored to
  org-download-image-dir, unless the user has changed it).
+ Prevent a few edge cases where org-attach-id-dir or
  org-download-image-dir were blank.
2020-04-25 01:27:25 -04:00
Henrik Lissner
adbe9041ce
Fix inline previews for download:* links 2020-04-25 01:24:48 -04:00
Henrik Lissner
903460cd10
Base org-download links off of org-download-image-dir 2020-04-24 21:22:12 -04:00
Henrik Lissner
211519270a
Resolve org download links relative to org-download-image-dir 2020-04-24 20:45:43 -04:00
Henrik Lissner
6159068b4d
Rewrite custom org link types
This should fix a few issues with links (like org-download links)
resolving to the incorrect org-directory or org-id-attach-dir (because
it's resolved too early).

I've also simplified and refactored the API to make it easier to grok.
2020-04-24 20:41:56 -04:00