Commit graph

17864 commits

Author SHA1 Message Date
Yaman Qalieh
bc32e2ec4c
tweak(mu4e): increase human-date to fit full time
Messages from the current day do not fit with the current width since
they are formatted as times (Ex: "05:17:23 PM"). The increase to 12
matches the mu4e defaults.

Amend: d1ba626a2a
2022-06-28 00:06:05 +02:00
Dominic Martinez
839970c2de docs(mu4e): fix incorrect variable name in snippet
The variable name for toggling org-msg by default was changed in commit
6118ad5c12, leading to the provided
snippet not actually disabling org-msg.
2022-06-28 00:04:49 +02:00
Ellis Kenyő
facab56a5c
bump: :lang fsharp
fsharp/emacs-fsharp-mode@b3aa4c53fc -> fsharp/emacs-fsharp-mode@c1e58c61f9

- Fix issue causing the inferior-buffer to block when adding nuget
  packages.
2022-06-28 00:04:19 +02:00
Henrik Lissner
a570ffe16c
fix(org): end-of-file error while parsing +present
Ref: db3ca52ed6 (commitcomment-76886620)
2022-06-24 12:25:44 +02:00
4shen0ne
1e6d5c3f65
feat(dired): add +dirvish option
Fix: #6397
2022-06-23 13:47:22 +02:00
TEC
8df91f0b33 feat(literate): add async config tangling 2022-06-23 03:13:55 +02:00
Henrik Lissner
a65e97bf2c
fix(cli): return *all* aliases from doom-cli-aliases
Now it walks the command tree breadth-first to collect *all* aliases
that lead to the given command.
2022-06-22 23:04:59 +02:00
Henrik Lissner
4dcfc37199
nit(cli): clarify comments in bin/doomscript 2022-06-22 23:04:59 +02:00
Henrik Lissner
d2fbe6a0c9
fix(cli): restore doom {refresh,re} alias
Amend: 6c0b7e1530
2022-06-22 23:04:58 +02:00
Henrik Lissner
001065ba42
refactor(cli): minor refactors & allow flychecker in CLIs
- Add comments to doom-cli-context-parse.
- Simplify/inline code here and there.
- Remove sacrifice to appease byte-compiler.

Thanks to a346928 there's no need to appease the byte-compiler with this
eval-when-compile hackery.

Ref: a34692826f18
2022-06-22 23:04:54 +02:00
Henrik Lissner
e651547abb
fix(cli): &rest not consuming rest of arguments
An edge case that occurs when no options are supplied to make arguments
non-null.
2022-06-22 23:04:14 +02:00
Henrik Lissner
2aca862187
fix(cli): prevent oversized error data spam
A backtrace with a sufficiently large object (especially with circular
references) could unhelpfully flood the screen.
2022-06-22 23:04:14 +02:00
Henrik Lissner
2660fcce25
fix(cli): not printing straight log after it errors
This regression was introduced in 6c0b7e1, preventing the debugger from
printing straight.el's process log when a straight.el error occurs.
Instead, it would print a less-than-helpful backtrace.

Amend: 6c0b7e1530
2022-06-22 23:04:14 +02:00
Henrik Lissner
666cc1fda7
refactor(cli): remove :stub, :obsolete, :deprecated, :since
I've removed these CLI properties because they were either
unused (:deprecated and :since) or poorly implemented (:stub and
:obsolete). And I'd rather have fewer magical properties, and instead
delegate these roles to the defobsolete! and (new) defstub!  macros.
Also, in the future, the help API will ascertain :since dynamically, so
it won't be very useful.

In summary:
- Use defstub! instead of :stub
- Use defobsolete! instead of :obsolete or :deprecated
- This removes the doom-cli-deprecated-error type (it's not really an
  error to begin with).
- Removes :stub, :obsolete, :deprecated, and :since
2022-06-22 23:04:14 +02:00
Henrik Lissner
a4aab45656
fix(emacs-lisp): flycheck false positives in Doom configs 2022-06-22 23:04:00 +02:00
Henrik Lissner
e4aa07f811
feat(cli): record aliases in doom-cli-context-path
doom-cli-context-path stores the path taken to get to the current
command. For example, given:

  (defcli! (doom boop) () ...)
  (defcli! (doom baz) () (call! '(boop)))
  (defalias! (doom bar) (doom baz))
  (defalias! (doom foo) (doom bar))
  (run! "doom" "foo")

Then the doom-cli-context-path by 'doom boop' will be:

Before this commit: ((doom baz))
After this commit:  ((doom baz) (doom bar) (doom foo))
2022-06-22 20:35:52 +02:00
Henrik Lissner
c06040338a
fix(lsp,tree-sitter): void-function lsp!/tree-sitter! errors
These are autodefs, meaning they should be defined whether or not the
containing module is enabled, but they should no-op when it's disabled,
by defining a no-op macro with the same name. However, lsp! and
tree-sitter! are meant to be used as hooks, and you can't use macros as
hooks, so you get void-function errors when they are used as such.

This ensures they are properly defined as no-op functions in those
cases. I.e.

  ;;;###autodef FORM

FORM is used instead of a no-op macro if the parent module is disabled.
2022-06-22 20:35:52 +02:00
Henrik Lissner
23b289b9a5
feat(cli): fall back to :docs for docstring
Also allows for a dynamically generated docstring. Careful though, it's
evaluated when `defcli!` is evaluated, not when the CLI is executed.
2022-06-22 20:35:17 +02:00
Henrik Lissner
209092c578
refactor(cli): don't reboot bin/doom on --pager
Also adds comments to explain why we're rebooting (or not) for these
settings.
2022-06-22 11:48:11 +02:00
Henrik Lissner
f0a11da072
tweak(cli): less verbosity on -!/--force
The notice will still be logged, but let's not potentially ruin piped
output with unneeded noise.
2022-06-22 11:42:25 +02:00
Henrik Lissner
834ff3ea85
fix(cli): autoloaded clis aliased to wrong commands
I use a shortcut like this to autoload multiple (different) CLIs living
in the same file:

  (defautoload! ((foo bar baz)) "file")

However, this creates premature aliases between autoloaded CLIs. When
'baz' is invoked, instead of loading "file", it resolves to 'foo'
first *then* loads it, causing 'foo' to be executed instead of 'baz'.
This commit fixes that.

Also, minor refactor: I removed the plist argument from a
doom-cli-command-normalize call because it wasn't needed or useful to
the consumer of its return value.

Amend: d226946f59
2022-06-22 02:27:34 +02:00
Henrik Lissner
93fc74a143
fix(everywhere): update cli command
To accommodate changes recently made to Doom's CLI framework.

Ref: 6c0b7e1530
2022-06-22 01:27:03 +02:00
Henrik Lissner
3ea9051890
fix(cli): remove set -e from bin/doom{,script}
This killed the script prematurely (without displaying the error) if
Emacs failed to execute. In versions prior to bash 4, set -e would not
terminate the script if a non-zero exit code occurred within a subshell,
but it will in bash 4+.

In any case, we don't need this fallback to begin with. The script
handles its errors sufficiently otherwise.
2022-06-22 01:23:39 +02:00
Henrik Lissner
f0e8728bbc
fix(lib): restart-emacs name collision on Emacs 29+
Emacs 29 introduces a new command: restart-emacs, which clashes with the
more featureful restart-emacs package that Doom installs to manage the
session. Fortunately, the built-in one is defines in files.el, which is
eagerly loaded at startup, so as long as the third-party one is
loaded (at some point), it shouldn't be a problem.

Fix: #6492
2022-06-22 01:10:07 +02:00
Henrik Lissner
170dadca5a
feat(emacs-lisp): register doomscript as elisp interpreter 2022-06-21 23:42:16 +02:00
Henrik Lissner
6d0639d101
fix(lib): avoid doom-load-session on restart if not in Doom
If for some reason you restart into another config (or startup fails for
one reason or another), don't call doom-load-session and break things.
2022-06-21 23:33:07 +02:00
Henrik Lissner
d014a7ae8b
docs(emacs-lisp): add fn!/lambda! to ToC & tweak header-args 2022-06-21 23:32:02 +02:00
Henrik Lissner
90a6bdb751
nit(cli): update comments wrt deferring site-lisp and -Q
Ref: 3b3c008b1b (commitcomment-76653206)
2022-06-21 23:31:16 +02:00
Henrik Lissner
66d06261aa
perf(lib): factor seq out of fn! & bake in lookup table
A little more time and space gained by cutting out seq entirely and
pre-generating the argument lookup table. At least, in uncompiled use
cases.

The original implementation used regexp to lookup arguments, which
was (relatively) expensive. By comparison, using `assq` is *much*
faster, especially for datasets this small; and more so when I get
around to byte-compiling Doom's core (assq has its own byte-compiler
opcode).
2022-06-21 23:27:19 +02:00
Henrik Lissner
1583db5983
fix(lib): void-variable x error in fn!
Amend: 72a8485d77
2022-06-21 23:01:13 +02:00
Henrik Lissner
5519c030ff
fix(cli): -!/--force being ignored
Forgot to adapt the old code to use doom-cli-context struct!

Fix: #6485
2022-06-21 23:00:00 +02:00
Henrik Lissner
72a8485d77
perf(lib): optimize fn! macro
- Reduces allocations by avoiding copies produced by reverse and seq,
  and by avoiding a closure.
- Reduces runtime by avoiding the overhead of seq's generics.
2022-06-21 22:51:45 +02:00
Henrik Lissner
3b3c008b1b
fix(cli): site file loader
I had missed the fact that -Q implies not only
--no-site-file (intended), but --no-site-lisp (unintended). Without the
latter, no site-lisp directory is left in load-path, and any attempt to
load it after-the-fact (which I do in core-cli.el) will fail. Thanks to
@yamanq for noticing this!

Fix: #6473
Fix: #4198
Co-authored-by: Yaman Qalieh <yamanq@users.noreply.github.com>
2022-06-21 22:48:43 +02:00
Henrik Lissner
681d40ab58
refactor(lib): use feature checks for backports
Instead of imprecise version checks.

Fix: #6489
2022-06-21 21:29:08 +02:00
Henrik Lissner
00c75eddf8
docs(emacs-lisp): add fn! & lambda! demos 2022-06-21 21:29:08 +02:00
Henrik Lissner
23feb482e9
refactor!(lib): rename fn!->lambda! & fn!!->fn!
BREAKING CHANGE: This renames the fn! macro to lambda! and fn!! to fn!.
I hadn't put much thought into their names when they were added, but now
that they're seeing more use, I've reconsidered.

The reasoning is (and I'll refer to them by their new names):

- If you're using fn!, you care more about the syntax's brevity, than if
  you were using lambda!, so I wanted fn! to have the (even if slightly)
  shorter name.
- lambda! decorates native lambda (with cl-function). Its old name
  did not suggest that connection like other !-macros in Doom's library
  do.
- Their old names implied the two macros were somehow related or that
  one decorated the other. They aren't and don't.
2022-06-21 21:29:08 +02:00
Ellis Kenyő
ca73a689ab feat(fsharp): add ob-fsharp
Add org-babel support for F#
2022-06-21 20:27:50 +02:00
Anh T Nguyen
fd6056bc23 docs(org): add reference to evil-org keybindings 2022-06-21 20:27:26 +02:00
Henrik Lissner
1f4b9b73fc
fix(org): org-download-delete and [[download:...]] links
org-download-delete doesn't accommodate a non-standard value for
org-download-link-format. Now it does.

Close: #6202
Co-authored-by: zrquan <zrquan@users.noreply.github.com>
2022-06-21 18:46:26 +02:00
Henrik Lissner
7ca50e0ce8
feat(default): bind 'SPC b y' to yank whole buffer
Evil may not always be available in all buffers, and in line with the
filepath yank commands on SPC f y/Y, I thought this command could be
useful. However, I omitted a "replace buffer with paste" command because
in any editing context, evil should be available, in which case it'd be
redundant with `vigp` (or yig for yanking the buffer).

Close: #5281
Co-authored-by: Alex Palaistras <deuill@users.noreply.github.com>
2022-06-21 18:46:25 +02:00
Henrik Lissner
ec2062f517
feat(macos): add 'open in new iTerm window' command
Plus keybinds on '<leader> o I'.

Close: #6318
Co-authored-by: brorbw <brorbw@users.noreply.github.com>
2022-06-21 18:46:25 +02:00
Brian Christian
db3ca52ed6 fix(org): wrong arg type when leaving present mode
When leaving org-tree-slide-mode, the window fringes are reset
fringe-mode has multiple possible types, including cons cell,
which cannot be passed directly to set-window-fringes
2022-06-21 18:31:59 +02:00
Artem Smaznov
3ac5d6d51a
docs(spell): can't add word to personal dict
Adding `Cannot add [word] to any active dictionary` error to the
troubleshooting section.

I have had this problem multiple times now when I break my emacs and
wipe the `~/.config/emacs` directory and I can never remember what file
to create to get my spell check working properly.

Even though this is a bug and might be fixed in the future, I feel like
having it documented can be helpful in the short term and in the future.

Ref: #6246
2022-06-21 18:30:20 +02:00
Henrik Lissner
b63b209dd3
fix(cli): force less to process ansi codes
I'm not certain how portable -r is for less. Fingers crossed!

Fix: #6488
2022-06-21 16:32:19 +02:00
Henrik Lissner
9f2d6262e5
refactor(cli): return unresolved CLIs from doom-cli-find
'doom help' is aliased to the pseudo command ':help'. (doom-cli-find
'("doom" "help")) would return a list of all CLIs that are pertinent to
'doom help's execution, but it resolves aliases, making it unclear to
recipients of this list what the initial command was.

This requires callers resolve the CLIs themselves, but at least now the
user has the choice.
2022-06-21 14:44:26 +02:00
Henrik Lissner
23ee89ec08
tweak(lib): advise run-hooks & improve feedback on debug mode 2022-06-21 14:41:21 +02:00
Henrik Lissner
9d1df5f298
nit: minor refactors & comment/docstring revisions 2022-06-21 14:40:15 +02:00
Henrik Lissner
773122f1ec
fix(python): syntax highlighting in 28.1
Python syntax highlighting was broken in the 28.1 release.

Close: #6414
Co-authored-by: dani84bs <dani84bs@users.noreply.github.com>
2022-06-21 14:32:13 +02:00
Henrik Lissner
d6d1e600c0
fix(org): org-protocol not triggering for its uris
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: #6481
Fix: #5997
2022-06-21 03:04:28 +02:00
Henrik Lissner
b0b727824a
feat(cli): allow docs to use %c/%p format specs
And replace magic section SYNOPSIS with EXAMPLES.
2022-06-21 02:08:19 +02:00