BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:
IS-MAC -> (featurep :system 'macos)
IS-WINDOWS -> (featurep :system 'windows)
IS-LINUX -> (featurep :system 'linux)
IS-BSD -> (featurep :system 'bsd)
The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.
Fix: #7479
`org-link-set-parameters` accepts `:face` for a function returning a face
or a symbol naming a face. Use a lambda returning `org-priority` to
avoid it being called directly as a function.
- several all-the-icons references were missed, and some code points are
different in nerd-fonts. the variable icon became a folder, the
package icon became a scissors, and the file-icons font icon is not
available
- make face link type face passthrough work
- remove extraneous rear-nonsticky and height properties that nerd-icons
already sets
- generally improve consistency across link types
- material design icons, underlines, and font lock faces for symbols,
shadow if unbound
- octicons for packages, modules, and executables, blue links if
installed, shadow if not. color coded icon based on status
- refactor and remove extraneous code
Looks like the doom-module one was partially renamed to follow naming
conventions, and that didn’t propagate to the corresponding doom-package
function.
These two can *significantly* slow down larger org buffers for evil
users, when switching modes (e.g. leaving insert/replace mode), so I am
removing these if/when I find a better alternative. Though, they can
still be done manually with `C-c C-c` (for cookies) and `TAB` in tables.
Where f9201eb introduced a general context system, this one introduces
one for modules, to simplify our let-bind game when interacting with
modules, and to more efficiently expose module state to modulep! (which
gets called at runtime a great deal, so its performance is important).
* lisp/doom-lib.el (doom-log): simplify macro and introduce
doom-inhibit-log variable.
* lisp/doom-modules.el (modulep!): fix reported file path if modulep!
fails to find the local module.
* lisp/lib/debug.el (doom-debug-variables): disable doom-inhibit-log
when debug mode is on.
Ref: f9201eb218
Introduces a system to announce what execution contexts are active, so I
can react appropriately, emit more helpful logs/warnings in the case of
issues, and throw more meaningful errors.
* bin/doom: load module CLIs in the 'modules' context.
* lisp/cli/doctor.el: load package files in 'packages' context.
* lisp/doom-cli.el:
- (doom-before-init-hook, doom-after-init-hook): trigger hooks at the
correct time. This may increase startup load time, as the benchmark
now times more of the startup process.
- (doom-cli-execute, doom-cli-context-execute,
doom-cli-context-restore, doom-cli-context-parse,
doom-cli--output-benchmark-h, doom-cli-call, doom-cli--restart,
doom-cli-load, run!): remove redundant context prefix in debug logs,
it's now redundant with doom-context, which doom-log now prefixes
them with.
* lisp/doom-lib.el (doom-log): prefix doom-context to doom-log output,
unless it starts with :.
* lisp/doom-packages.el (package!, doom-packages--read): throw error if
not used in a packages.el file or in the context of our package
manager.
* lisp/doom-profiles.el (doom-profile--generate-init-vars,
doom-profile--generate-load-modules): use modules doom-context instead
of doom-init-time to detect startup.
* lisp/doom-start.el (doom-load-packages-incrementally-h): move function
closer to end of doom-after-init-hook.
* lisp/doom.el:
- (doom-before-init-hook, doom--set-initial-values-h,
doom--begin-init-h): rename doom--set-initial-values-h to
doom--begin-init-h and ensure it runs as late in
doom-before-init-hook as possible, as that is the point where Doom's
"initialization" formally begins.
- (doom-after-init-hook): don't trigger at the end of command-line-1
in non-interactive sessions. This will be triggered manually in
doom-cli.el's run!.
* lisp/lib/config.el (doom/reload, doom/reload-autoloads,
doom/reload-env): use 'reload' context for reload commands.
* modules/lang/emacs-lisp/autoload.el (+emacs-lisp-eval): use 'eval'
context.
* modules/lang/org/config.el: remove doom-reloading-p; check for
'reload' doom context instead.
Where they will be further generalized, later.
This also prevents an issue where org was loaded while the profile init
files are generated, which caused a warning about org-loaddefs which
introduces a noticable delay.
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
- Deprecates the doom-private-dir variable in favor of doom-user-dir.
- Renames the pseudo category for the user's module: :private -> :user.
- Renames the doom-private-error error type to doom-user-error.
Emacs uses the term "user" to refer to the "things" in user space (e.g.
user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs,
package-user-dir, etc), and I'd like to be consistent with that. It also
has the nice side-effect of being slightly shorter. I also hope
'doom-user-error' will be less obtuse to beginners than
'doom-private-error'.
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.
featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
`org-persist-write:index' does not recursively create
`org-persist-directory', causing `make-directory` to throw a
file-missing if a parent directory is missing.
Fix: #6635
Ref: bzg/org-mode@edd7f2962f
I've omitted docs/*.org from this merge, as there is still work left to
do there, but I am pushing the module docs early so folks can benefit
from the new docs sooner.
A more elegant solution will have to wait until the CLI rewrite (where
modules can supply patches for its packages, then I could hoist
org-protocol-check-filename-for-protocol into the autoloads file using
autoload cookie magic).
Fix: #6481Fix: #5997
First, removal of the old org-protocol advice needed to be updated,
because org-protocol-detect-protocol-server was renamed to
org--protocol-detect-protocol-server upstream.
Second, I only noticed now that our lazy loader for org-protocol wasn't
active until Org was loaded, which was far too late, and meant
org-protocol wasn't working out of the box. This fixes that.
Added new keybinds for easy removal of RESULTS blocks in org-mode.
SPC m k - delete RESULTS block under cursor
SPC m K - delete all RESULTS blocks under cursor
SPC u SPC m K - delete all RESULTS blocks in buffer
Doom sets jump points before following most org links. This allows you
to jump back to where you were afterwards using
C-o (better-jumper-jump-backward) or forward with
C-i (better-jumper-jump-forward). It does this by setting a jump point
on the org-open-at-point-functions hook.
However, not all org links' :follow handlers trigger this hook (like id:
or roam: links), and you can get around it by triggering link opener
handlers directly (with M-x org-goto). Most of these link openers use
org-mark-ring-push to record jump points in org's own jumplist, so
advising it to call better-jumper-set-jump should address more of these
fringe cases.
Fix: #6098