Commit graph

1163 commits

Author SHA1 Message Date
Henrik Lissner
e52fd138e2 Refactor autoload/store.el library
+ Expired pcache entries are now purged when Emacs is killed.
+ Preform additional type checks for better runtime safety.
+ TTL argument can now be a predicate function. Takes two arguments: the
  key and value, if it returns nil, consider the entry stale.
2021-03-05 20:09:22 -05:00
Henrik Lissner
3bb271738a Fix void-variable disto on M-x doom/info 2021-03-04 16:10:45 -05:00
Henrik Lissner
7798aa9190 Fix repo location in doom/help-packages 2021-03-04 14:09:40 -05:00
Henrik Lissner
70c8ca30b2 Update docstrings for doom/window-{enlargen,maximize-buffer}
As of 56e9d273e, these commands no longer toggle because the toggle was
brittle could be unpredictable at times. Use winner-undo instead (on
`C-w r` or `SPC w r` by default).
2021-03-02 23:48:54 -05:00
Henrik Lissner
8ccba925dd Fix parsing issue in doom-system-distro{,-version}
No guarantee the values in /etc/os-release are quoted.

Also, eliminate the code paths where these functions return nil.
2021-03-02 11:59:55 -05:00
Henrik Lissner
ad16d85e99
Merge pull request #4600 from MageJohn/refactor/help-packages
Refactor doom/help-packages
2021-03-01 22:53:59 -05:00
Henrik Lissner
c5e3f4d632 New autoload/system.el core library 2021-03-01 22:27:17 -05:00
Henrik Lissner
1a7536cbd1 Extend & compact doom/info
+ Output is now a couple lines shorter
+ Now tries to guess Linux distro names and versions
+ Displays symlinked EMACSDIR and DOOMDIR
+ Replaces elc-files segment with 'byte-compiled-config trait
2021-02-11 17:35:48 -05:00
Henrik Lissner
de1f2a8f96 Add doom-plist-{keys,values} functions
Backported from the CLI rewrite.
2021-02-05 22:50:18 -05:00
Janfel
8331f4f896
Fix interactive spec of doom/retab 2021-02-02 02:41:45 +01:00
Yuri Pieters
bf185edd91 Prefer readability over a line length < 80 2021-02-01 19:01:42 +00:00
Yuri Pieters
b983929e82 Refactor doom/help-packages 2021-02-01 02:23:37 +00:00
Yuri Pieters
5293c460db Refactor doom--help-insert-button
Changes:
- Fixes a bug where opening a file which a buffer was already visiting
didn't raise the buffer.
- The function had unused functionality where it would split a string on
'::' and then search for the text after the first '::' in the buffer;
this has been removed.
- The searching functionality has been replaced with the option to pass
a line number, which the opened buffer will jump to. This is now used by
the part of doom/help-packages that shows the places a package is configured.
- It now fails earlier. If there's an invalid file, it fails at call
time rather than when the button is pressed.
- Add a docstring
2021-01-31 19:11:31 +00:00
Henrik Lissner
56e9d273e1 Simplify doom/window-enlargen & doom/window-maximize-buffer
+ No longer toggle window conf on consecutive presses. It's redundant
  with winner-undo and only adds a degree of uncertainty to the command.
+ `doom/window-maximize-buffer` now works with popup windows (before
  it'd spout an unhelp error about running +popup/raise).
2021-01-28 21:23:07 -05:00
Yuri Pieters
a5f39d75a5 Fix 'readme' button doom/help-packages
The button was trying to open `path/to/README.org/README.org`.
2021-01-28 21:09:36 +00:00
Henrik Lissner
fc184852d0
Only replace usernames in file paths in doom/info 2021-01-11 02:49:00 -05:00
Henrik Lissner
cfb8a866dc
Bump :core
Fuco1/smartparens@7f5825d -> Fuco1/smartparens@63695c6
bbatsov/projectile@d1cfad0 -> bbatsov/projectile@c31bd41
domtronn/all-the-icons.el@6917b08 -> domtronn/all-the-icons.el@9aa16ae
iqbalansari/restart-emacs@e570749 -> iqbalansari/restart-emacs@1607da2
jscheid/dtrt-indent@a7ade6d -> jscheid/dtrt-indent@854b9a1
justbur/emacs-which-key@ca268fd -> justbur/emacs-which-key@428aedf
jwiegley/use-package@caa92f1 -> jwiegley/use-package@365c73d
raxod502/straight.el@3277e1c -> raxod502/straight.el@a32c97c

+ Closes #4513
+ Fixes (wrong-number-of-arguments (3 . 4) 2) error for users on Emacs
  HEAD (see bbatsov/projectile#1635).
+ package! :build semantics have changed due to upstream changes. What
  was :build is now :pre-build. What was :no-build is now :build nil.
+ Now we must be careful not to auto-disable the "use-package" psuedo
  theme. It is used as a place to store :custom assignments without them
  being saved to custom.el.
2021-01-09 02:55:09 -05:00
Henrik Lissner
34c5dad750
Add value+docstring columns to doom/help-custom-variable
When used with ivy. Also: slight refactor of doom/help-custom-variable.
2021-01-05 19:29:19 -05:00
Henrik Lissner
b89929f3f8
Bind {C-h, SPC h} V to doom/help-custom-variable
For looking up custom variables (i.e. variables intended to be
customized; defined with defcustom).
2021-01-05 19:21:54 -05:00
Ralf Beckmann
712d6a7c40 Fix interactive call of doom/bump-package
The function expects 'package' to be a symbol instead of a string.
2020-12-20 17:37:29 +01:00
Nikita Bloshchanevich
0d330f7a7e `doom/help-modules': C-u -> browse directory
If called with a C-u prefix, `doom/help-modules' now browses the module's
directory instead of opening its documentation. This exposes the VISIT-DIR
argument to `interactive' use.
2020-12-12 13:24:15 +01:00
Henrik Lissner
10f1b8040a
Remove extraneous newline in doom/help-packages output 2020-12-11 17:38:18 -05:00
Henrik Lissner
a3b8be52a8
Improve doom/help-packages
+ Cache package list
+ Show "generating package list" message the first time (better ux)
+ Display location of package files in package information
+ Turn links/file paths into buttons
+ Add link to module readmes (if any)

Mentioned in #4406
2020-12-11 15:50:01 -05:00
Henrik Lissner
b7f6532e4f
Fix startup hooks not running in vanilla sandbox 2020-12-01 18:16:12 -05:00
Henrik Lissner
affd076d53
Minor refactors & reformatting 2020-12-01 13:53:46 -05:00
Henrik Lissner
b426e21ef1
Refactor doom-num-cpus
Adds error handling.
2020-11-30 23:35:03 -05:00
Henrik Lissner
c0e905c044
Rename internal variable: doom-num-cpus -> doom--num-cpus 2020-11-29 14:50:32 -05:00
Henrik Lissner
b91a1b3e7b
Extract CPU counting to doom-num-cpus function
And improves macOS support as discussed in hlissner/doom-emacs@db6a27c
2020-11-29 14:49:14 -05:00
Henrik Lissner
b49c40bbb3
Minor refactors & comment revision 2020-11-29 14:37:32 -05:00
Henrik Lissner
e4563e9b02
Fix void-symbol: straight-vc-git-default-branch error
Was removed in raxod502/straight.el@a7251a3
2020-11-25 15:29:45 -05:00
Henrik Lissner
03fe396eea
Move +default/{find-in,browse}-emacsd to core lib
Renamed them to:

+ doom/find-file-in-emacsd
+ doom/browse-in-emacsd
2020-11-19 00:44:16 -05:00
Henrik Lissner
969e6486f6
Apply customized faces sooner 2020-11-14 13:57:34 -05:00
Henrik Lissner
3ecf95ff35
Fix #4249 again
Whoops, missed the main command.
2020-11-11 01:07:52 -05:00
Henrik Lissner
fee4de8b24
Fix #4249: doom/reload when bin/doom path has spaces 2020-11-11 00:25:04 -05:00
Henrik Lissner
2c663ea5d4
Mention current theme and font in doom/info 2020-11-10 18:36:47 -05:00
Henrik Lissner
45179fbf59
Mention current frame type in doom/info 2020-11-10 18:36:47 -05:00
Henrik Lissner
611fdade09
Add doom/copy-buffer-contents command
To make it easier for beginners to copy content from logs or backtrace
windows.
2020-11-04 19:41:57 -05:00
Henrik Lissner
86722ee67e
Minor refactors & reformatting 2020-11-03 16:16:12 -05:00
Henrik Lissner
3e0432959a
Set user-init-file in sandbox 2020-11-02 21:03:28 -05:00
Henrik Lissner
9120b075e0
Merge pull request #4145 from gagbo/patch-6
Clarify doom-store-put docstring
2020-10-29 02:07:17 -04:00
Henrik Lissner
fe37a590cc
Set doom--initial-load-path in sandbox
Prevents loaded packages miscount (e.g. -1) in dashboard/log in sandbox
instance.

This occurs because the benchmark line uses a simple heuristic to
determine the loaded packages: length of load-path minus the length of
doom--initial-load-path (to save on more expensive counting methods).
However, in the sandbox, load-path is pre-populated with all packages
right from the get-go, so doom--initial-load-path will be incorrect.
2020-10-26 05:52:30 -04:00
Henrik Lissner
9e1ac0c0be
Reduce active message-log-max; scale in debug mode
8kb of log isn't really necessary. We'll scale it up when debug mode is
on, instead.
2020-10-26 05:51:12 -04:00
Gerry Agbobada
89019c66a2
Clarify doom-store-put docstring
Explicitely states that a `nil` TTL means "no expiration"

Make it clearer that TTL is an offset to current-time, and not a timestamp in seconds
2020-10-23 14:40:10 +02:00
Henrik Lissner
9b4fd806bb
Simplify doom/info output 2020-10-20 23:21:11 -04:00
Henrik Lissner
35185b2175
Split doom-reload-hook into before/after hooks 2020-10-16 22:28:08 -04:00
Henrik Lissner
b6fe731153
Fix #4103: respect delete-by-moving-to-trash
When calling doom/delete-this-file
2020-10-15 23:12:21 -04:00
Henrik Lissner
db07304c71
Don't enable explain-pause-mode at startup
When starting Emacs in debug mode, explain-pause-mode is enabled. This
pulls in other packages with it, which can taint results when testing
package load order. Also, explain-pause-mode is for measuring pauses
during interactive use, it isn't very useful for startup benchmarking.

So we only toggle it if doom-debug-mode is toggled interactively.
2020-10-11 16:41:07 -04:00
Rudi Grinberg
b52072ec90 Search compressed .el files in load history
On many installations, the .el files that are builtin to emacs are
compressed. We should search these as well.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2020-10-09 15:22:04 -07:00
Henrik Lissner
b29b865d30
Fix #3975: configure native-comp in sandbox 2020-10-06 02:08:17 -04:00
Henrik Lissner
3cb7458d34
Fix #4033: correctly toggle explain-pause-mode
On doom-debug-mode.
2020-10-05 23:02:36 -04:00