Commit graph

17629 commits

Author SHA1 Message Date
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
Henrik Lissner
0511445339
feat(cli): add :dump pseudo command
And fix a void-variable doom-cli--dump error accidentally introduced in
d231755.

Ref: d231755bdf
2022-06-21 00:32:15 +02:00
Henrik Lissner
19ce459138
fix(cli): module cli.el loader
$DOOMDIR/init.el had to be loaded earlier, so we could read the active
module list. This indirectly fixes an issue where users' literate
configs weren't being tangled on 'doom sync'.

Fix: #6479
2022-06-20 23:44:32 +02:00
Henrik Lissner
fe850934f1
fix(cli): display command list groups in insert order
On 'doom help' or 'doom help --commands'
2022-06-20 23:43:23 +02:00
Henrik Lissner
cfb533043f
fix(cli): add extra package checks
So the doctor doesn't complain about pseudo packages, like revealjs,
which is not actually an Emacs package, we're just using straight.el to
install it for org-re-reveal.
2022-06-20 23:43:23 +02:00
Henrik Lissner
79f1d29722
fix(cli): don't trigger kill hooks on 'doom doctor'
To restrict side-effects in the user's config.
2022-06-20 23:43:23 +02:00
Henrik Lissner
315960b9a8
fix(lib): update doom/upgrade
-y switch was replaced with -!/--force in 6c0b7e1.

Amend: 6c0b7e1530
2022-06-20 23:43:23 +02:00
Henrik Lissner
d231755bdf
refactor(cli): rename struct constructors/copiers
To maintain our namespaces.
2022-06-20 23:43:23 +02:00
Chris Rose
3a7eab38ad
fix: allow :protocol keyword in package!
Co-authored-by: Chris Rose <chrisros@amazon.com>
2022-06-20 19:09:50 +02:00
Henrik Lissner
f350a28db2
revert: fix(rss): fix *rss* workspace doesn't exist
Removed by request.

Ref: #6422
Revert: f178eb6f52
2022-06-20 16:11:02 +02:00
Henrik Lissner
d1472c191e
tweak(cli): be verbose about site files in debug mode
More information for hapless debuggers like me!

Ref: #6473
2022-06-20 13:37:54 +02:00
Henrik Lissner
eb7329d912
fix(org): unbalanced parenthesis
Causing odd org related errors at startup or 'doom doctor'.

Amend: fb1c8eb11d
2022-06-20 03:45:46 +02:00
Henrik Lissner
210381bdcf
fix(lib): autoload format-spec on 27.x
This function wasn't autoloaded until 28, causing void-function errors
if it's used.
2022-06-20 03:02:25 +02:00
Henrik Lissner
343def0b1e
fix(cli): void-function relpath on 'doom compile' 2022-06-20 02:27:23 +02:00
Henrik Lissner
8b93e8b15c
fix(tabs): wrong-type-arg stringp (Git "...") error
Newer versions of project.el changed the return value of
`project-current` to a three-part list, rather than a cons cell.
centaur-tabs expects the old signature and we get a type error.

This advice ensures centaur-tabs works with old or new versions of
project, and is a temporary measure until the issue is resolved
upstream.

Ref: ema2159/centaur-tabs#181
Fix: #6280
2022-06-20 02:07:42 +02:00
Henrik Lissner
fb1c8eb11d
fix(org): lazy loading of org-protocol
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.
2022-06-20 01:55:21 +02:00
Henrik Lissner
b81e4af66a
fix(cli): deploy git hooks to repo at $PWD, not $EMACSDIR 2022-06-19 23:05:33 +02:00
Henrik Lissner
d002e4c89d
dev(ci): comment out unused CI config
Until 'doom make {docs,codeowners}' are done, they'd throw errors.
2022-06-19 22:51:46 +02:00
Henrik Lissner
12e9b4422f
tweak(cli): show benchmark for doom {build,purge}
These two commands tend to take a while.
2022-06-19 22:51:46 +02:00
Henrik Lissner
ab7f7058f3
docs(cli): show correct command in error message
Before:
  $ doom ci hook commit-msg test
  Error: "doom ci" expected 0 arguments, but got 1

  Usage: doom ci COMMAND [ARGS...]

  See 'doom h[elp] ci' or 'doom ci {-?,--help}' for documentation.

After:
  $ doom ci hook commit-msg test
  Error: ":before doom ci" expected 0 arguments, but got 1

  Usage: doom ci hook commit-msg FILE

  See 'doom h[elp] ci hook commit-msg' or 'doom ci hook commit-msg {-?,--help}' for documentation.
2022-06-19 22:51:46 +02:00
Henrik Lissner
50a0c2ef46
fix(cli): ci.el loader
- :before ci will try to load $REPOROOT/ci.el or $DOOMDIR/ci.el. It
  finds $REPOROOT by calling `git`, but doesn't handle errors. Now it
  does.
- Because &rest was in :before ci's argspec, :before ci * subcommands
  would be inaccessible (not that any exist atm, though).
- Let the user know when it finds the project's ci.el.
2022-06-19 22:49:47 +02:00
Henrik Lissner
7862a9e15d
docs(cli): add more exit! usecases 2022-06-19 22:01:28 +02:00
Henrik Lissner
da74525cbc
tweak(cli): process arguments before executing CLIs 2022-06-19 21:39:17 +02:00
Henrik Lissner
d226946f59
fix(cli): aliases to pseudo commands
To understand what's going on here, understand this: this is a regular
CLI command:

  (defcli! (doom sync) () ...)

And this is a pseudo command:

  (defcli! (:before doom sync) () ...)

If a pseudo command is aliased to another pseudo command:

  (defcli! (:before doom (foo bar baz)) ...)

In which case, ':before doom bar' and ':before doom baz' are aliases for
':before doom foo', there was a bug that cut out the keyword, so in
actuality, ':before doom {bar,baz}' were aliased to 'doom bar'.

This fixes that, and the peculiar issue of 'doom purge' executing 'doom
build' due to this, living in core/cli/packages.el:

  (defcli! (:before (build b purge p)) (&context context)
    (require 'comp nil t)
    (doom-initialize-core-packages))

Ref: https://github.com/doomemacs/doomemacs/issues/4273#issuecomment-1159610824
2022-06-19 21:26:53 +02:00
Henrik Lissner
92a5c28687
feat(rest): add +jq flag
Adds support for setting variables from results using jq expressions.

Ref: https://github.com/pashky/restclient.el
Ref: https://github.com/ljos/jq-mode
Close: #5238
2022-06-19 14:56:04 +02:00
Henrik Lissner
49ef0fa8dd
tweak(cli): improve message when no similar commands found
Rather than display a blank line, let the user know no similar commands
were found.
2022-06-19 13:07:28 +02:00
Henrik Lissner
6eefd4c1df
fix(cli): wrong-type-arg error on unrecognized command
If you type an unrecognized command, you get an "Error: unrecognized
command X" error, then a list of similar commands, followed by a
recommendation to check out 'doom help Y' or 'doom --help Y', where Y is
the nearest recognized parent command. E.g. 'doom ci blah' is an unknown
command, but 'doom ci' is known, therefore Y = 'doom ci'.

This fix ensures that Y is properly resolved.

Amend: 6c0b7e1530
2022-06-19 13:03:28 +02:00
Henrik Lissner
446e1432bc
fix(cli): show full synopsis for pseudo commands
Before:
  $ doom help help
  Usage:  COMMAND [ARGS...]

  TODO

  TODO

After:
  Usage: doom help [-g|--no-global] [--manpage] [--commands]
                   [--synopsis|--subcommands|--similar|--envvars|--postamble] [--]
                   COMMAND [ARGS...]

  Show documentation for a Doom CLI command.

  OPTIONS:
    -g, --no-global
      Hide global options.

    --manpage
      Generate in manpage format.

    --commands
      List all known commands.

    --synopsis, --subcommands, --similar, --envvars, --postamble
      Show only the specified sections..

Amend: 6c0b7e1530
2022-06-19 12:50:21 +02:00
Henrik Lissner
8d881f44c4
fix(cli): various errors in 'doom help'
- Wrong number of arguments: #<subr max> 0
- Symbol's value as variable is void: localonly?

Amend: 6c0b7e1530
2022-06-19 12:50:21 +02:00
Henrik Lissner
42d84e7e21
fix(cli): possible divide-by-zero when calculating similarity
If given two empty strings (which doesn't happens anywhere in the
codebase atm, but just in case).
2022-06-19 12:50:17 +02:00
Henrik Lissner
979495cf33
fix(cli): void-function doom-clean-byte-compiled-files on 'doom upgrade'
This function was renamed in 6c0b7e1.

Amend: 6c0b7e1530
2022-06-19 12:08:24 +02:00
Henrik Lissner
fb7f4c6cbe
fix(cli): time out if native-comp hangs
Some packages (primarily vterm, evil-collection, and with-editor) end up
hanging their native compilation process. In vterm's case it's because
it invisibly prompts to compile its module then waits forever for user
input that'll never come. I haven't figured out why it happens for the
others though.

In any case, since the workaround is to simply kill these processes and
carry on, I added this timeout mechanism to do it for you (timing out
after 30s of no movement). A more elegant solution will have to wait
until the rewrite of our package manager.

Fix: #5592
2022-06-19 12:01:52 +02:00
Henrik Lissner
837f404fbc
fix(lib): update doom/reload & doom/reload-autoloads
To reflect changes to bootstrapper made in 1402db5.

Amend: 1402db5129
Fix: #6470
2022-06-19 11:48:17 +02:00
Henrik Lissner
33d9e741b0
refactor(ci): move .github/ci.el to /ci.el
So 'doom ci' picks up on this project's CI settings.
2022-06-19 03:18:57 +02:00
Henrik Lissner
f913ff07b3
fix(cli): void-function doom-packages-install error on 'doom install' 2022-06-19 03:00:10 +02:00
Henrik Lissner
074f63ff31
fix(cli): ignore invalid __DOOMGEOM value 2022-06-19 02:44:00 +02:00