`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.
This fixes a bug introduced in bb3431a (#7509). This shows up for
example in `org-capture`, which uses multiple org buffers and the
initial one (with name `*Capture*`) will be dead already by the time the
timer runs.
Amend: #7509
Sometimes, `org-reveal` is called in the wrong buffer which throws an
error. For example, `org-link-open-from-string` creates an temporary
org-mode buffer that gets killed very quickly which means that
`org-reveal` gets called in a different buffer. I have also had issues
with org-reveal getting called in the org-roam buffer, which is why this
commit also saves the buffer it was called in.
Co-authored-by: Leo Okawa Ericson <git@relevant-information.com>
- 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.
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.
This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.
Fix: #7368Close: #6675Close: #7364
doom-package:* links exist to make linking to packages a little smarter.
In Emacs, it'll open that package's describe-package page, with some
extra information embedded. In other media (exported to html/pdf), it
will link to the package's project home, which will be ascertained from
the local package's metadata, falling back to
DoomELPA (https://github.com/doomelpa) or one of the ELPA archives.
Close: #7237
Org complains if org-loaddefs.el is missing, but Straight generates a
org-autoloads.el instead (and loads it separately), so we need only fool
Org it exists.
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.
Doom replaces `org-insert-heading`, but its replacement does not respect
`org-insert-heading-hook`. This commit fixes that, enabling folks to
customize their insert-heading behavior, e.g. adding a time stamp:
(defun my/org-set-creation-date-heading-property ()
(save-excursion
(org-back-to-heading)
(org-set-property "CREATED" (format-time-string "[%Y-%m-%d %T]"))))
(add-hook 'org-insert-heading-hook #'my/org-set-creation-date-heading-property)
Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n6187
Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n1615
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.