Commit graph

254 commits

Author SHA1 Message Date
Henrik Lissner
b914830403
refactor!: complete profile gen and init systems
BREAKING CHANGE: This commit makes three breaking changes:

- Doom now fully and dynamically generates (and byte-compiles) your
  profile and its init files, which includes your autoloads, loading
  your init files and modules, and then some. This replaces
  doom-initialize-modules, doom-initialize-core-modules, and
  doom-module-loader, which have been removed. This has also improved
  startup time by a bit, but if you use these functions in your CLIs,
  for instance, this will be a breaking change.
- `doom sync` is now required for Doom to see your profiles (and must be
  run whenever you change them, or when you up/downgrade Emacs across
  major versions).
- $DOOMDIR/init.el is now read much earlier than it used to be. Before
  any of doom-{ui,keybinds,editor,projects}, before any autoloads are
  loaded, and before your load-path has been populated with your
  packages. It now runs in the context of early-init.el, giving users
  freer range over what they can affect, but a more minimalistic
  environment to do it in.

  If you must have some logic run when all that is set up, add it to one
  of the module hooks added in e08f68b or 283308a.

This also poses a significant change to Doom's load order (see the
commentary change in lib/doom.el), along with the following (non
breaking) changes:

1. Adds a new `doom profiles sync` command. This will forcibly resync
   your profiles, while `doom sync` will only do so if your profiles
   have changed.
2. Doom now fully and dynamically generates (and byte-compiles) your
   user-init-file, which includes loading all your init files, modules,
   and custom-file. This replaces the job of doom-initialize-modules,
   doom-initialize-core-modules, and doom-module-loader, which have been
   removed. This has also improved startup time by a bit.
3. Defines new doom-state-dir variable, though not used yet (saving that
   and the other breaking changes for the 3.0 release).
4. Redesigns profile directory variables (doom-profile-*-dir) to prepare
   for future XDG-compliance.
5. Removed unused/unimportant profile variables in doom.el.
6. Added lisp/doom-profiles.el. It's hardly feature complete, but it's
   enough to power the system as it is now.
7. Updates the "load order" commentary in doom.el to reflect these
   changes.
2022-09-16 01:14:23 +02:00
Henrik Lissner
0c918f3b2d
refactor: change doom-module-list signature
Used to return the hash-table `doom-modules` (if not all-p), but I've
changed it to return a list of cons cells (:CATEGORY . MODULE),
representing all enabled modules, in the order they were enabled.

The purpose of this change is to prepare for a change in the structure
of doom-modules, and how Doom stores its module metadata.
2022-09-16 01:14:21 +02:00
Henrik Lissner
775ee2f04a
refactor: rethink doom-module-*-path functions
- Rename doom-module-path -> doom-module-expand-path, to better reflect
  its purpose.
- Optimize doom-module-locate-path to try caches and
  locate-file-internal, before looping through doom-modules-dirs.
- Rely on file-name-concat to join paths, rather than string
  concatenation. file-name-concat is more robust for the purpose and
  has lower overhead than expand-file-name.
2022-09-16 01:14:21 +02:00
Henrik Lissner
b7bd27d22b
refactor(cli,lib): print levels & output redirection
This refactors how Doom captures and redirects its output (to stdout and
stderr) into a more general with-output-to! macro, and:

- Simplifies the "print level" system. The various doom-print-*-level
  variables have been removed.
- Adds a new print level: notice, which will be the default level for
  all standard output (from print!, doom-print, prin[ct1], etc).
- Adds a with-output-to! macro for capturing and redirecting
  output to multiple streams (without suppressing it from stdout). It
  can also be nested.
- Changes the following about doom-print:
  - Default :format changed to nil (was t)
  - Default :level changed to t (was `doom-print-level`)
  - No longer no-ops if OUTPUT is only whitespace
2022-09-16 01:14:20 +02:00
Henrik Lissner
6cac7b05b6
refactor(lib): tidy doom-log output
This commit reduces the debug log noise, makes it easier to
read/parse/search, and soft-introduces a convention for doom-log
messages, where they are prefixed with a unique identifier loosely named
after it's running context or calling function.

I haven't enforced it everywhere doom-log is used yet, but this is a
start.
2022-09-12 16:01:43 +02:00
Henrik Lissner
bcf7a8a554
refactor!(cli): rename cli definers for consistency
BREAKING CHANGE: If anyone is using Doom's CLI framework and are
defining their own CLIs with any of the following macros, they'll need
to be updated to their new names:

- defautoload! -> defcli-autoload!
- defgroup! -> defcli-group!
- defstub! -> defcli-stub!
- defalias! -> defcli-alias!
- defobsolete! -> defcli-obsolete!

These were renamed to make their relationship with CLIs more obvious;
they were too ambiguous otherwise.
2022-09-12 11:45:59 +02:00
Jeff Kowalski
29e30e8af4 fix(cli): follow-on syntax fixes to #6772
While fixing #6772, we also address several other issues found by
sh-shellcheck:

L47C39 SC1007:Remove space after = if trying to assign a value
(for empty string, use var='' ... ).

L47C46 SC2046:Quote this to prevent word splitting.

L62C20 SC2086:Double quote to prevent globbing and word splitting.

L82C9  SC2154:tmpdir is referenced but not assigned
(did you mean 'TMPDIR'?).
2022-09-12 11:44:11 +02:00
Jeff Kowalski
571ab7425a fix(cli): #6772 - trivial doomscripts fail
When trying to establish the value of EMACSDIR, the proper fallback
when BASH_SOURCE is undefined is $0 rather than 0, in correct shell-
scripting parlance.
2022-09-12 11:44:11 +02:00
Henrik Lissner
c747d218ae
refactor(cli): throw error if Doom fails to load 2022-09-10 18:36:23 +02:00
Henrik Lissner
0172b180a9
refactor(cli): remove superfluous emacs switches
Neither --no-x-resources or --no-splash are relevant to a noninteractive
session.
2022-09-07 17:25:01 +02:00
Henrik Lissner
ceae154751
fix(cli): reading dir perms on a non-existent dir
This is a regression from c05e615. doom.el changes user-emacs-directory
to doom-cache-dir, which may not exist yet, at the time of this check,
causing file-attributes to return nil, and causing = to throw a type
error (see #6754).

In addition to fixing this, I've also made the check more liberal about
failures, in the odd case that doom-emacs-dir, too, does not exist at
the time bin/doom is called (it'd be very hard to pull that off, but not
impossible).

Fix: #6754
Amend: c05e61536e
2022-09-07 17:25:01 +02:00
Henrik Lissner
18887163f9
tweak(cli): add lisp/cli to doom-cli-load-path by default 2022-09-07 17:25:00 +02:00
Henrik Lissner
8594c1a0c4
fix(cli): failure to autoload 'doom refresh' error
Amend: cee89a5d3f
2022-09-07 11:32:41 +02:00
Henrik Lissner
085b5563fc
nit(cli): tidy comments & correct grammar in error 2022-09-06 23:04:17 +02:00
Henrik Lissner
aef14f078d
feat(cli): add --benchmark switch 2022-09-06 22:55:48 +02:00
Henrik Lissner
0100b08402
refactor(cli): handle more errors & POSIX-ify doomscript 2022-09-06 22:55:48 +02:00
Henrik Lissner
c05e61536e
refactor: make early-init.el Doom's universal bootstrapper
This centralizes Doom's core startup optimizations and, as a
side-effect, reduces the runtime of bin/doom commands substantially.
This also simplifies the user story for loading Doom remotely (for batch
sessions or doomscripts).
2022-09-06 22:55:47 +02:00
Henrik Lissner
a5c80fcb4b
refactor: deprecate doom-private-dir for doom-user-dir
- 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'.
2022-08-14 20:43:35 +02:00
Henrik Lissner
9c04998e9c
tweak(cli): load doomrc quietly 2022-08-08 18:23:47 +02:00
Henrik Lissner
9b8ed397e8
feat!(cli): load project .doomrc instead of ci.el
BREAKING CHANGE: Before, 'doom ci' would load
$GIT_WORKING_TREE/.github/ci.el, to give users/projects an opportunity
to provide project-local configuration for bin/doom (mainly for CI/CD).
Now, this ci.el file is no longer loaded and instead, *all* bin/doom
sessions will walk up the file tree and load the first .doomrc it finds.

This gives bin/doom users a more general place configure all of its
commands, and not just 'doom ci' commands.

Extras:
- Adds .doomrc to auto-mode-alist (so that it starts in
  emacs-lisp-mode).
2022-08-07 19:43:28 +02:00
Henrik Lissner
d3f2b4d9ca
docs(cli): fix issue tracker URL in 'doom help' 2022-08-01 22:36:33 +02:00
Henrik Lissner
b9933e6637
refactor!: restructure Doom core
BREAKING CHANGE: This restructures the project in preparation for Doom
to be split into two repos. Users that have reconfigured Doom's CLI
stand a good chance of seeing breakage, especially if they've referred
to any core-* feature, e.g.

  (after! core-cli-ci ...)

To fix it, simply s/core-/doom-/, i.e.

  (after! doom-cli-ci ...)

What this commit specifically changes is:
- Renames all core features from core-* to doom-*
- Moves core/core-* -> lisp/doom-*
- Moves core/autoloads/* -> lisp/lib/*
- Moves core/templates -> templates/

Ref: #4273
2022-07-30 22:41:13 +02:00
Henrik Lissner
743b740e79
fix(cli): verbose output in debug mode 2022-07-28 18:15:15 +02:00
Henrik Lissner
314463bd49
fix(cli): ignored --{profile,doomdir,emacsdir,debug}
Fixes an edge case where --profile, --doomdir, --emacsdir, and --debug
were ignored if used in a nested bin/doom call. Now possible thanks to
49d3f1e.

Ref: 49d3f1e96c
2022-07-28 18:15:06 +02:00
Henrik Lissner
5af38fb08e
feat: make bin/doom profile aware
- Fixes Doom's former inability to (trivially) juggle multiple profiles
  based on the same EMACSDIR (see #6593).
- Adds '--profile NAME' switch to bin/doom (also recognized
  $DOOMPROFILE).
- Adds new doom-profile* variables. These will eventually replace
  doom-{local,etc,cache}-dir and doom-{autoloads,env}-file.

This is intentionally messy to ensure backwards compatibility for a
little while longer. This will be fixed over the next couple weeks.

Ref: #6593
2022-07-28 12:01:02 +02:00
Henrik Lissner
33c5f3721a
fix(cli): __DOOMPIPE+=0: not found errors
The string append operator is a bashism, and therefore is not POSIX
complaint. It will throw errors when /bin/sh isn't symlinked to bash.
2022-07-09 21:10:40 +02:00
Henrik Lissner
6cb2c6e962
fix(cli): recognize global options for pseudo CLIs
The global options (like --debug and --pager) weren't recognized for
pseudo command like :help and :version (in particular, rendering --pager
ineffective).

Fix: #6526
2022-07-04 02:58:17 +02:00
Henrik Lissner
af4c18e283
fix(cli): recognize command argument for --pager
--pager incorrectly expected a boolean argument, when it should accept
any arbitrary pager command (set to a blank string to disable the
pager).

Ref: #6526
2022-07-04 02:58:17 +02:00
Henrik Lissner
14b2395424
refactor: remove unused core variables
doom-debug-p and doom-interactive-p have always been intentionally
redundant, because changing the variables they replaced had other
side-effects, which made writing tests for them difficult. Since our
new (yet unpublished) tests lean heavily toward integration testing more
than unit testing, this becomes an implementation detail.

And doom-init-p's only use was refactor out at some point in the past,
so it's no longer used.

Also done to reduce Doom's footprint, in general.
2022-06-29 18:14:20 +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
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
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
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
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
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
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
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
beef0aef02
fix(cli): split tput call into two separate calls
This fixes an issue where, on some systems, `tput cols lines` does not
produce "N\nM" (where N = number of columns in the terminal and M =
number of lines), and instead produces "N\n", causing parsing errors.
2022-06-19 02:39:22 +02:00
Henrik Lissner
09ddac1d7a
feat(cli): resolve EMACSDIR to doomscript's parent directory
If no EMACSDIR is given, assume ../ is the Emacs config we want to
operate out of, taking after bin/doom.

And use bash. This script was designed for the convenience of other
scripters on unix systems, so it can afford a small hit to portability.
2022-06-19 02:20:34 +02:00
Henrik Lissner
74f3c1d11c
fix(cli): doom {compile,clean} errors
- An improper autoload was preventing 'doom clean' from being
  recognized.
- 'doom compile' hadn't been updated to reflect changes introduced
  recently in 1402db5.

Amend: 6c0b7e1530
Ref: 1402db5129
2022-06-19 01:39:32 +02:00
Henrik Lissner
daad6bc21d
feat(cli): add 'doom make completions' for zsh
'doom make completions' will generate a rudimentary ZSH completion
script for bin/doom. It can be used from your shell dotfiles, but I
recommend caching the output with a function like:
https://github.com/hlissner/dotfiles/blob/master/config/zsh/.zshenv#L1-L14.

Then add this to your .zshrc:

  _cache doom make completions --zsh && compdef _doom doom

Ref: https://github.com/hlissner/dotfiles/blob/master/config/zsh/.zshenv#L1-L14
2022-06-18 23:53:12 +02:00
Henrik Lissner
e5b7edcd8d
feat(cli): add bin/doomscript
Meant as a simple elisp interpreter with Doom's CLI framework preloaded.
Can be used as a shebang line:

  #!/usr/bin/env doomscript
  (princ "hello world!")

This isn't used for bin/doom because it requires doomscript be in your
$PATH, and any attempt to resolve its location in bin/doom's shebang
line would reduce its portability. Neither of these should be an issue
for the type of user who'd find this useful.
2022-06-18 23:53:12 +02:00
Henrik Lissner
6c0b7e1530
refactor!(cli): rewrite CLI framework libraries
BREAKING CHANGE: this changes Doom's CLI framework in subtle ways, which
is listed in greater detail below. If you've never extended Doom's CLI,
then this won't affect you, but otherwise it'd be recommended you read
on below.

This commit focuses on the CLI framework itself and backports some
foundational changes to its DSL and how it resolves command line
arguments to CLIs, validates input, displays documentation, and persists
state across sessions -- and more. This is done in preparation for the
final stretch towarding completing the CLI rewrite (see #4273).

This is also an effort to generalize Doom's CLI (both its framework and
bin/doom), to increase it versatility and make it a viable dev tool for
other Doom projects (on our Github org) and beyond.

However, there is a *lot* to cover so I'll try to be brief:

- Refactor: generalize Doom's CLI framework by moving all bin/doom
  specific configuration/commands out of core-cli into bin/doom. This
  makes it easier to use bin/doom as a project-agnostic development
  tool (or for users to write their own).
- Refactor: change the namespace for CLI variables/functions from
  doom-cli-X to doom-X.
- Fix: subcommands being mistaken as arguments. "doom make index" will
  resolve to (defcli! (doom make index)) if it exists,
  otherwise (defcli! (doom make)) with "index" as an argument. Before
  this, it would resolve to the latter no matter what. &rest can
  override this; with (defcli! (doom make) (&rest args)), (defcli! (doom
  make index)) will never be invoked.
- Refactor!: redesign our output library (was core/autoload/output.el,
  is now core/autoload/print.el), and how our CLI framework buffers and
  logs output, and now merges logs across (exit! ...) restarts.
- Feat: add support for :before and :after pseudo commands. E.g.

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

  Caveat: unlike advice, only one of each can be defined per-command.
- Feat: option arguments now have rudimentary type validation (see
  `doom-cli-option-arg-types`). E.g.

    (defcli! (doom foo) ((foo ("--foo" num))) ...)

  If NUM is not a numeric, it will throw a validation error.

  Any type that isn't in `doom-cli-option-arg-types` will be treated as a
  wildcard string type. `num` can also be replaced with a specification,
  e.g. "HOST[:PORT]", and can be formatted by using symbol quotes:
  "`HOST'[:`PORT']".
- Feat: it is no longer required that options *immediately* follow the command
  that defines them (but it must be somewhere after it, not before). E.g.
    With:
      (defcli! (:before doom foo) ((foo ("--foo"))) ...)
      (defcli! (doom foo baz) () ...)
    Before:
      FAIL: doom --foo foo baz
      GOOD: doom foo --foo baz
      FAIL: doom foo baz --foo
    After:
      FAIL: doom --foo foo baz
      GOOD: doom foo --foo baz
      GOOD: doom foo baz --foo
- Refactor: CLI session state is now kept in a doom-cli-context struct (which
  can be bound to a CLI-local variable with &context in the arglist):

    (defcli! (doom sync) (&context context)
      (print! "Command: " (doom-cli-context-command context)))

  These contexts are persisted across sessions (when restarted). This is
  necessary to support seamless script restarting (i.e. execve
  emulation) in post-3.0.
- Feat: Doom's CLI framework now understands "--". Everything after it will be
  treated as regular arguments, instead of sub-commands or options.
- Refactor!: the semantics of &rest for CLIs has changed. It used to be "all
  extra literal, non-option arguments". It now means *all* unprocessed
  arguments, and its use will suppress "unrecognized option" errors, and
  tells the framework not to process any further subcommands. Use &args
  if you just want "all literal arguments following this command".
- Feat: add new auxiliary keywords for CLI arglists: &context, &multiple,
  &flags, &args, &stdin, &whole, and &cli.
  - &context SYM: binds the currently running context to SYM (a
    `doom-cli-context` struct). Helpful for introspection or passing
    along state when calling subcommands by hand (with `call!`).
  - &stdin SYM: SYM will be bound to a string containing any input piped
    into the running script, or nil if none. Use
    `doom-cli-context-pipe-p` to detect whether the script has been
    piped into or out of.
  - &multiple OPTIONS...: allows all following OPTIONS to be repeated. E.g. "foo
    -x a -x b -x c" will pass (list ("-x" . "a") ("-x" . "b") ("-x" .
    "c")) as -x's value.
  - &flags OPTIONS...: All options after "&flags" get an implicit --no-* switch
    and cannot accept arguments. Will be set to :yes or :no depending on which flag is
    provided, and nil if the flag isn't provided. Otherwise, a default
    value can be specified in that options' arglist. E.g.

      (defcli! (doom foo) (&flags (foo ("--foo" :no))) ...)

    When called, this command sets FOO to :yes if --foo, :no if --no-foo, and
    defaults to :no otherwise.
  - &args SYM: this replaces what &rest used to be; it binds to SYM a
    list of all unprocessed (non-option) arguments.
  - &rest SYM: now binds SYM to a list of all unprocessed arguments, including
    options. This also suppresses "unrecognized option" errors, but will render
    any sub-commands inaccessible. E.g.

      (defcli! (doom make) (&rest rest) ...)
      ;; These are now inaccessible!
      (defcli! (doom make foo) (&rest rest) ...)
      (defcli! (doom make bar) (&rest rest) ...)
  - &cli SYM: binds SYM to the currently running `doom-cli` struct. Can also be
    obtained via `(doom-cli-get (doom-cli-context-command context))`. Possibly
    useful for introspection.
- feat: add defobsolete! macro for quickly defining obsolete commands.
- feat: add defalias! macro for quickly defining alias commands.
- feat: add defautoload! macro for defining an autoloaded command (won't
  be loaded until it is called for).
- refactor!: rename defcligroup! to defgroup! for consistency.
- fix: CLIs will now recursively inherit plist properties from parent
  defcli-group!'s (but will stack :prefix).
- refactor!: remove obsolete 'doom update':
- refactor!: further generalize 'doom ci'
  - In an effort to generalize 'doom ci' (so other Doom--or
    non-doom--projects can use it), all its subcommands have been
    changed to operate on the current working directory's repo instead
    of $EMACSDIR.
  - Doom-specific CI configuration was moved to .github/ci.el.
  - All 'doom ci' commands will now preload one of \$CURRENT_REPO_ROOT/ci.el or
    \$DOOMDIR/ci.el before executing.
- refactor!: changed 'doom env'
  - 'doom env {-c,--clear}' is now 'doom env {clear,c}'
  - -r/--reject and -a/--allow may now be specified multiple times
- refactor!: rewrote CLI help framework and error handling to be more
  sophisticated and detailed.
- feat: can now initiate $PAGER on output with (exit! :pager) (or use
  :pager? to only invoke pager is output is longer than the terminal is
  tall).
- refactor!: changed semantics+conventions for global bin/doom options
  - Single-character global options are now uppercased, to distinguish them from
    local options:
    - -d (for debug mode) is now -D
    - -y (to suppress prompts) is now -!
    - -l (to load elisp) is now -L
    - -h (short for --help) is now -?
  - Replace --yes/-y switches with --force/-!
  - -L/--load FILE: now silently ignores file errors.
  - Add --strict-load FILE: does the same as -L/--load, but throws an error if
    FILE does not exist/is unreadable.
  - Add -E/--eval FORM: evaluates arbitrary lisp before commands are processed.
  - -L/--load, --strict-load, and -E/--eval can now be used multiple times in
    one command.
  - Add --pager COMMAND to specify an explicit pager. Will also obey
    $DOOMPAGER envvar. Does not obey $PAGER.
- Fix #3746: which was likely caused by the generated post-script overwriting
  the old mid-execution. By salting the postscript filenames (with both an
  overarching session ID and a step counter).
- Docs: document websites, environment variables, and exit codes in
  'doom --help'
- Feat: add imenu support for def{cli,alias,obsolete}!

Ref: #4273
Fix: #3746
Fix: #3844
2022-06-18 23:53:12 +02:00
Henrik Lissner
fbfc635300
fix(cli): GIT_CONFIG* envvars leaking child processes
When launching Doom via 'doom run', the child process inherits
bin/doom's environment. This change restricts this sub-environment to
the intended target: straight and its use of git.

Fix: #6320
2022-04-21 22:36:36 +02:00
Henrik Lissner
a9c22b704b
fix(cli): ignore system/user git configs
So they don't interfere with straight in odd, unpredictable ways. If
you *really* know what you're doing, set DOOMGITCONFIG to the path of a
gitconfig file. This envvar may be renamed in the future, however.

Close: #5640
Co-authored-by: M. Yas. Davoodeh <Davoodeh@users.noreply.github.com>
2022-03-31 01:06:07 +02:00
Henrik Lissner
2f39d3fced fix(cli): "Unknown terminal type" error on bin/org-capture
Fix: #5438
2021-11-24 22:03:21 +01:00
Henrik Lissner
045ea7460d nit: revise and reformat code comments 2021-08-04 01:53:12 -04:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00