From d046d35aeb13e6456534c1739be61243e3a865f6 Mon Sep 17 00:00:00 2001 From: "M. Yas. Davoodeh" Date: Thu, 19 Mar 2020 13:42:06 +0330 Subject: [PATCH 001/229] Added +lsp to Tex-Mode. --- modules/lang/latex/README.org | 1 + modules/lang/latex/config.el | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/modules/lang/latex/README.org b/modules/lang/latex/README.org index 0d208c5c7..0fc3bd8a3 100644 --- a/modules/lang/latex/README.org +++ b/modules/lang/latex/README.org @@ -30,6 +30,7 @@ Provide a helping hand when working with LaTeX documents. ** Module Flags + =+latexmk= Use LatexMk instead of LaTeX to compile documents. + =+cdlatex= Enable [[https://github.com/cdominik/cdlatex][cdlatex]] for fast math insertion. ++ =+lsp= Start LSP automatically in `tex-mode-hook`. ** Plugins + [[http://www.gnu.org/software/auctex/][auctex]] diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index a73d5bb5a..45f3da203 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -180,6 +180,12 @@ If no viewers are found, `latex-preview-pane' is used.") :init (add-to-list '+latex--company-backends #'+latex-symbols-company-backend nil #'eq)) +(after! tex-mode + (when (featurep! +lsp) + (add-hook 'tex-mode-local-vars-hook #'lsp!) + (add-hook 'latex-mode-local-vars-hook #'lsp!) + (after! yatex + (add-hook 'yatex-mode-local-vars-hook #'lsp!)))) ;; bibtex + reftex (load! "+ref") From 6b68dcceee7f9d43ca72d98589aef51a482d0a96 Mon Sep 17 00:00:00 2001 From: "M. Yas. Davoodeh" Date: Thu, 19 Mar 2020 19:19:35 +0330 Subject: [PATCH 002/229] Minor fixes in docs and check for :lang lsp. --- docs/modules.org | 2 +- modules/lang/latex/README.org | 3 ++- modules/lang/latex/config.el | 6 ++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 9eb0b8616..25ed94402 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -114,7 +114,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO + kotlin =+lsp+= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex= - TODO ++ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex= =+lsp= - TODO + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO + lua =+moonscript= - TODO diff --git a/modules/lang/latex/README.org b/modules/lang/latex/README.org index 0fc3bd8a3..9b6fe2e4b 100644 --- a/modules/lang/latex/README.org +++ b/modules/lang/latex/README.org @@ -30,7 +30,8 @@ Provide a helping hand when working with LaTeX documents. ** Module Flags + =+latexmk= Use LatexMk instead of LaTeX to compile documents. + =+cdlatex= Enable [[https://github.com/cdominik/cdlatex][cdlatex]] for fast math insertion. -+ =+lsp= Start LSP automatically in `tex-mode-hook`. ++ =+lsp= Start LSP automatically in `tex-mode-hook`. This + requires the =:tools lsp= module. ** Plugins + [[http://www.gnu.org/software/auctex/][auctex]] diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 45f3da203..57d64fe60 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -181,11 +181,9 @@ If no viewers are found, `latex-preview-pane' is used.") (add-to-list '+latex--company-backends #'+latex-symbols-company-backend nil #'eq)) (after! tex-mode - (when (featurep! +lsp) + (when (and (featurep! +lsp) (featurep! :tools lsp)) (add-hook 'tex-mode-local-vars-hook #'lsp!) - (add-hook 'latex-mode-local-vars-hook #'lsp!) - (after! yatex - (add-hook 'yatex-mode-local-vars-hook #'lsp!)))) + (add-hook 'latex-mode-local-vars-hook #'lsp!))) ;; bibtex + reftex (load! "+ref") From 76ae9e687aede0a20927aec677313ac1b3fb6603 Mon Sep 17 00:00:00 2001 From: "M. Yas. Davoodeh" Date: Fri, 27 Mar 2020 16:25:33 +0430 Subject: [PATCH 003/229] Move hooks to `(after! tex)` block --- modules/lang/latex/config.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 57d64fe60..081edf29b 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -74,7 +74,11 @@ If no viewers are found, `latex-preview-pane' is used.") (sp-local-pair modes open nil :actions :rem)) ;; And tweak these so that users can decide whether they want use latex ;; quotes or not, via `+latex-enable-plain-double-quotes' - (sp-local-pair modes "``" nil :unless '(:add sp-in-math-p))))) + (sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))) + ;; Hook lsp if enabled + (when (and (featurep! +lsp) (featurep! :tools lsp)) + (add-hook 'tex-mode-local-vars-hook #'lsp!) + (add-hook 'latex-mode-local-vars-hook #'lsp!))) (after! latex @@ -180,10 +184,5 @@ If no viewers are found, `latex-preview-pane' is used.") :init (add-to-list '+latex--company-backends #'+latex-symbols-company-backend nil #'eq)) -(after! tex-mode - (when (and (featurep! +lsp) (featurep! :tools lsp)) - (add-hook 'tex-mode-local-vars-hook #'lsp!) - (add-hook 'latex-mode-local-vars-hook #'lsp!))) - ;; bibtex + reftex (load! "+ref") From 5c340a670c32b35b62400f947733ecd8c2cf7a4b Mon Sep 17 00:00:00 2001 From: Steven vanZyl Date: Fri, 17 Apr 2020 13:16:53 -0400 Subject: [PATCH 004/229] doom/upgrade use -y CLI flag When using the internal doom/upgrade command to upgrade using the CLI tool, do so with the -y flag. This is admittedly a temporary solution, but without it the CLI tool will prompt for confirmation, which cannot easily or obviously be given while inside Emacs. A better solution would be to somehow integrate the prompt so that it appears in the minibuffer as normal Emacs prompts do. But for now this at least fixes doom/upgrade. --- core/autoload/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index eb3acac93..11113482e 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -136,6 +136,6 @@ imported into Emacs." (defun doom/upgrade () "Run 'doom upgrade' then prompt to restart Emacs." (interactive) - (doom--if-compile (format "%s upgrade" doom-bin) + (doom--if-compile (format "%s -y upgrade" doom-bin) (when (y-or-n-p "You must restart Emacs for the upgrade to take effect.\n\nRestart Emacs?") (doom/restart-and-restore)))) From 27c64a3abd45433defbf07238c474328cefcbfae Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 Apr 2020 13:47:26 -0400 Subject: [PATCH 005/229] Fix #2946: use powerthesaurus fork --- modules/tools/lookup/packages.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index f5f4d7d62..59d3251a1 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -28,7 +28,12 @@ (if IS-MAC (package! osx-dictionary :pin "1b79ff64c7") (package! define-word :pin "d8c76d503b") - (package! powerthesaurus :pin "81a262ec0c") + ;; HACK Fix #2945: the main package is broken (see + ;; SavchenkoValeriy/emacs-powerthesaurus). We use this fork until it is + ;; merged. + (package! powerthesaurus + :recipe (:host github :repo "maxchaos/emacs-powerthesaurus" :branch "pt-api-change") + :pin "81a262ec0c") (when (featurep! +offline) (package! wordnut :pin "feac531404") (package! synosaurus :pin "14d34fc92a")))) From b3bbcf61ac33ad07e9889fd23af300dd479ed342 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 21 Apr 2020 11:02:39 -0700 Subject: [PATCH 006/229] Add full name to :cap Makes it available as :capture which is a slightly easier to understand name. --- modules/editor/evil/+commands.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/+commands.el b/modules/editor/evil/+commands.el index 9277c23ec..3bf6cf5e5 100644 --- a/modules/editor/evil/+commands.el +++ b/modules/editor/evil/+commands.el @@ -98,7 +98,7 @@ (evil-ex-define-cmd "tabsave" #'+workspace:save) ;;; Org-mode -(evil-ex-define-cmd "cap" #'org-capture) +(evil-ex-define-cmd "cap[ture]" #'org-capture) ;;; ibuffer (when (featurep! :emacs ibuffer) From 0c3e11766c5c0eff7e4f6cb113c69e0deffa9b07 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 Apr 2020 17:08:34 -0400 Subject: [PATCH 007/229] Fix #2949: swap TLS 1.3 & 1.2 in gnutls-algorithm-priority --- core/core.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/core.el b/core/core.el index 9a9b5d0db..5c93aa91b 100644 --- a/core/core.el +++ b/core/core.el @@ -196,11 +196,12 @@ users).") (setq gnutls-verify-error (not (getenv "INSECURE")) gnutls-algorithm-priority (when (boundp 'libgnutls-version) - (concat "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2" + (concat "SECURE128:+SECURE192:-VERS-ALL" (if (and (not IS-WINDOWS) (not (version< emacs-version "26.3")) (>= libgnutls-version 30605)) - ":+VERS-TLS1.3"))) + ":+VERS-TLS1.3") + ":+VERS-TLS1.2")) ;; `gnutls-min-prime-bits' is set based on recommendations from ;; https://www.keylength.com/en/4/ gnutls-min-prime-bits 3072 From 6315984ae6423af1a39980e2ec8af7243bd4b1b3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 Apr 2020 18:20:34 -0400 Subject: [PATCH 008/229] Add workaround for tigersoldier/company-lsp#128 Fix from emacs-lsp/lsp-python-ms#79 --- modules/tools/lsp/config.el | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 888c9c6fe..3c4aabfaf 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -213,6 +213,39 @@ auto-killed (which is a potentially expensive process)." :references 'lsp-ui-peek-find-references))) +(use-package! company-lsp + :defer t + :config + (setq company-lsp-cache-candidates 'auto) + ;; HACK Fix tigersoldier/company-lsp#128 causing company-lsp results to + ;; display candidates that are unrelated to the prefix. Source: + ;; emacs-lsp/lsp-python-ms#79 + (add-to-list 'company-lsp-filter-candidates '(mspyls . t)) + (defadvice! +company---fix-lsp-caching-on-competion-a (response prefix) + :override #'company-lsp--on-completion + (let* ((incomplete (and (hash-table-p response) (gethash "isIncomplete" response))) + (items (cond ((hash-table-p response) (gethash "items" response)) + ((sequencep response) response))) + (candidates (mapcar (lambda (item) + (company-lsp--make-candidate item prefix)) + (lsp--sort-completions items))) + (server-id (lsp--client-server-id (lsp--workspace-client lsp--cur-workspace))) + (should-filter (or + ;; CHANGE BEGIN + (eq company-lsp-cache-candidates t) + ;; CHANGE END + (and (null company-lsp-cache-candidates) + (company-lsp--get-config company-lsp-filter-candidates server-id))))) + (when (null company-lsp--completion-cache) + (add-hook 'company-completion-cancelled-hook #'company-lsp--cleanup-cache nil t) + (add-hook 'company-completion-finished-hook #'company-lsp--cleanup-cache nil t)) + (when (eq company-lsp-cache-candidates 'auto) + (company-lsp--cache-put prefix (company-lsp--cache-item-new candidates incomplete))) + (if should-filter + (company-lsp--filter-candidates candidates prefix) + candidates)))) + + (use-package! helm-lsp :when (featurep! :completion helm) :commands helm-lsp-workspace-symbol helm-lsp-global-workspace-symbol) From 7ed9ee2ae5b66ecd8c0fe77aa5c6456c1b749ba5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 Apr 2020 23:19:17 -0400 Subject: [PATCH 009/229] Bind m ' -> markdown-edit-code-block For consistency with org and latex. --- modules/lang/markdown/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index ddce13f34..07003b237 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -70,6 +70,7 @@ capture, the end position, and the output buffer.") (map! :map markdown-mode-map :localleader + "'" #'markdown-edit-code-block "o" #'markdown-open "p" #'markdown-preview "e" #'markdown-export From f7ce75bbe91e3ced17953f2ffc4dcaef87ba526b Mon Sep 17 00:00:00 2001 From: Eric Dallo Date: Tue, 21 Apr 2020 23:05:28 -0300 Subject: [PATCH 010/229] Bump :lang dart amake/flutter.el@ec92a4d -> amake/flutter.el@293b722 emacs-lsp/lsp-dart@064d47b -> emacs-lsp/lsp-dart@4cd73b7 --- modules/lang/dart/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/dart/packages.el b/modules/lang/dart/packages.el index 44d69fa9a..30a0f8be8 100644 --- a/modules/lang/dart/packages.el +++ b/modules/lang/dart/packages.el @@ -4,8 +4,8 @@ (package! dart-mode :pin "04fcd649f1") (when (featurep! +lsp) - (package! lsp-dart :pin "064d47bad3")) + (package! lsp-dart :pin "4cd73b77f4")) (when (featurep! +flutter) - (package! flutter :pin "ec92a4df84") + (package! flutter :pin "293b7225b9") (package! hover :pin "6f9ed1a651")) From 4891a7151f452958b95e88054300b9ce2521a9db Mon Sep 17 00:00:00 2001 From: Viktor Astakhov Date: Wed, 22 Apr 2020 20:48:00 +0300 Subject: [PATCH 011/229] Add Poetry support --- modules/lang/python/README.org | 5 +++++ modules/lang/python/config.el | 5 +++++ modules/lang/python/doctor.el | 4 ++++ modules/lang/python/packages.el | 2 ++ 4 files changed, 16 insertions(+) diff --git a/modules/lang/python/README.org b/modules/lang/python/README.org index 228ae963e..ebb303ac2 100644 --- a/modules/lang/python/README.org +++ b/modules/lang/python/README.org @@ -25,6 +25,8 @@ Adds Python support to Doom Emacs. + ~+lsp~ Language Server Protocol support + ~+pyenv~ Python virtual environment support via [[https://github.com/pyenv/pyenv][pyenv]] + ~+conda~ Python virtual environment support via [[https://conda.io/en/latest/][Conda]] ++ ~+poetry~ Python packaging, dependency management, and virtual environment + support via [[https://python-poetry.org/][Poetry]] + ~+cython~ Cython files support via [[https://github.com/cython/cython/blob/master/Tools/cython-mode.el][Cython-mode]] ** Plugins @@ -41,6 +43,8 @@ Adds Python support to Doom Emacs. + [[https://github.com/necaris/conda.el][conda]]* + ~+pyenv~ + [[https://github.com/pythonic-emacs/pyenv-mode][pyenv]]* ++ ~+poetry~ + + [[https://github.com/galaunay/poetry.el][poetry]]* + ~+lsp~ and ~:tools lsp~ + [[https://github.com/emacs-lsp/lsp-mode][lsp]] + [[https://github.com/emacs-lsp/lsp-python-ms][lsp-python-ms]]* @@ -67,6 +71,7 @@ This module has no direct prerequisites. Here are some of its soft dependencies. + Python virtual environments install instructions at: + [[https://github.com/pyenv/pyenv][pyenv]] + [[https://conda.io/en/latest/][Conda]] + + [[https://python-poetry.org/][Poetry]] + ~pipenv~ requires [[https://pipenv.readthedocs.io/en/latest/][pipenv]] diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 63a833029..8b3073e38 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -280,6 +280,11 @@ called.") 'append)) +(use-package! poetry + :when (featurep! +poetry) + :after python) + + (use-package! lsp-python-ms :when (featurep! +lsp) :after lsp-clients diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index e4979e5ea..588d3fb7a 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -20,6 +20,10 @@ (unless (executable-find "conda") (warn! "Couldn't find conda in your PATH"))) +(when (featurep! +poetry) + (if (not (executable-find "poetry")) + (warn! "Couldn't find poetry in your PATH"))) + (when (featurep! +cython) (unless (executable-find "cython") (warn! "Couldn't find cython. cython-mode will not work."))) diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index ee838e6fd..4788487d6 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -24,6 +24,8 @@ (package! pyenv-mode :pin "aec6f2aa28")) (when (featurep! +conda) (package! conda :pin "335474e409")) +(when (featurep! +poetry) + (package! poetry :pin "6dcc9d22ca")) ;; Testing frameworks (package! nose :pin "f852829751") From 083b3b634d9f982ccafa2be4b92a6119d78c2955 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Apr 2020 15:49:23 -0400 Subject: [PATCH 012/229] Sneaky file is sneaky --- mytest | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 mytest diff --git a/mytest b/mytest deleted file mode 100644 index e69de29bb..000000000 From e0f8fbee228f6387837229d0ca7d6660eda97d75 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Apr 2020 15:50:17 -0400 Subject: [PATCH 013/229] Fix #2939: pdf-tools config not triggered on pdf-view-mode Because pdf-view can load without pulling in pdf-tools. Closes #2954 --- modules/tools/pdf/config.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index a5047ec41..4aa9f3bf9 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -1,6 +1,6 @@ ;;; tools/pdf/config.el -*- lexical-binding: t; -*- -(use-package! pdf-tools +(use-package! pdf-view :mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode) :magic ("%PDF" . pdf-view-mode) :init @@ -20,9 +20,10 @@ :config (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer) - (setq-default pdf-view-display-size 'fit-page - pdf-view-use-scaling t - pdf-view-use-imagemagick nil) + (setq-default pdf-view-display-size 'fit-page) + ;; Enable hiDPI support, but at the cost of memory! See politza/pdf-tools#51 + (setq pdf-view-use-scaling t + pdf-view-use-imagemagick nil) ;; Add retina support for MacOS users (when IS-MAC From 3c81d059de14a2e95a2163a8e12b4313f5165264 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Apr 2020 17:25:30 -0400 Subject: [PATCH 014/229] Don't use company-elm if +lsp --- modules/lang/elm/config.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/lang/elm/config.el b/modules/lang/elm/config.el index 71c3dd97c..504adbce8 100644 --- a/modules/lang/elm/config.el +++ b/modules/lang/elm/config.el @@ -1,12 +1,10 @@ ;;; lang/elm/config.el -*- lexical-binding: t; -*- (after! elm-mode - (add-hook 'elm-mode-hook #'rainbow-delimiters-mode) - - (when (featurep! +lsp) - (add-hook 'elm-mode-local-vars-hook #'lsp!)) - - (set-company-backend! 'elm-mode 'company-elm) + (if (featurep! +lsp) + (add-hook 'elm-mode-local-vars-hook #'lsp!) + (set-company-backend! 'elm-mode 'company-elm)) + (set-repl-handler! 'elm-mode #'run-elm-interactive) (set-pretty-symbols! 'elm-mode :null "null" @@ -22,4 +20,4 @@ (use-package! flycheck-elm :when (featurep! :checkers syntax) :after elm-mode - :config (add-to-list 'flycheck-checkers 'elm nil #'eq)) + :config (add-to-list 'flycheck-checkers 'elm)) From c4d4780b7b6b436c968dcd2b6b88862b2279eefb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Apr 2020 19:49:19 -0400 Subject: [PATCH 015/229] Bump :ui indent-guides DarthFennec/highlight-indent-guides@0b10f38 -> DarthFennec/highlight-indent-guides@1b12c7b --- modules/ui/indent-guides/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/indent-guides/packages.el b/modules/ui/indent-guides/packages.el index 3bf737416..3a6856a27 100644 --- a/modules/ui/indent-guides/packages.el +++ b/modules/ui/indent-guides/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/indent-guides/packages.el -(package! highlight-indent-guides :pin "0b10f38c54") +(package! highlight-indent-guides :pin "1b12c7b440") From 0837c56430144b90386f8513f44ffdaf03c2b498 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 03:33:08 -0400 Subject: [PATCH 016/229] Fix loading new themes from face-remapped buffers E.g. If mixed-pitch-mode is enabled and you change themes, then open a new frame, the theme is messed up. Also refactor load-theme advice into one. --- core/core-ui.el | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index da17eeafe..103404615 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -598,20 +598,25 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") (let ((doom--prefer-theme-elc t)) ; DEPRECATED in Emacs 27 (load-theme doom-theme t))))) -(defadvice! doom--run-load-theme-hooks-a (theme &optional _no-confirm no-enable) - "Set up `doom-load-theme-hook' to run after `load-theme' is called." - :after-while #'load-theme - (unless no-enable - (setq doom-theme theme - doom-init-theme-p t) - (run-hooks 'doom-load-theme-hook))) +(defadvice! doom--load-theme-a (orig-fn theme &optional no-confirm no-enable) + "Run `doom-load-theme-hook' on `load-theme' and fix its issues. -(defadvice! doom--disable-enabled-themes-a (theme &optional _no-confirm no-enable) - "Disable previously enabled themes before loading a new one. -Otherwise, themes can conflict with each other." - :after-while #'load-theme - (unless no-enable - (mapc #'disable-theme (remq theme custom-enabled-themes)))) +1. Disable previously enabled themes. +2. Don't let face-remapping screw up loading the new theme + (*cough*`mixed-pitch-mode'). +3. Record the current theme in `doom-theme'." + :around #'load-theme + ;; HACK Run `load-theme' from an estranged buffer, where we can be assured + ;; that buffer-local face remaps (by `mixed-pitch-mode', for instance) + ;; won't interfere with changing themes. + (with-temp-buffer + (when-let (result (funcall orig-fn theme no-confirm no-enable)) + (unless no-enable + (setq doom-theme theme + doom-init-theme-p t) + (mapc #'disable-theme (remq theme custom-enabled-themes)) + (run-hooks 'doom-load-theme-hook)) + result))) (unless EMACS27+ ;; DEPRECATED Not needed in Emacs 27 From 6c7bd1a94a4e53f18c67c5ab72e80c31efc0c2c2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 03:44:23 -0400 Subject: [PATCH 017/229] Bump :ui doom hlissner/emacs-solaire-mode@4ac324c -> hlissner/emacs-solaire-mode@adc8c0c --- modules/ui/doom/config.el | 52 +++++++++++++++++++------------------ modules/ui/doom/packages.el | 2 +- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 5b2d0688d..5ae5ddacd 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -27,24 +27,20 @@ :defer t :init (add-hook! 'doom-load-theme-hook :append - (defun +doom-solaire-mode-swap-bg-maybe-h () + (defun +doom-solaire-swap-bg-faces-maybe-h () (when (string-prefix-p "doom-" (symbol-name doom-theme)) (require 'solaire-mode) - (solaire-mode-swap-bg)))) + (solaire-mode-swap-bg))) + #'solaire-global-mode) :config - ;; fringe can become unstyled when deleting or focusing frames - (add-hook 'focus-in-hook #'solaire-mode-reset) - ;; Prevent color glitches when reloading either DOOM or loading a new theme - (add-hook! '(doom-load-theme-hook doom-reload-hook) :append - #'solaire-mode-reset) ;; org-capture takes an org buffer and narrows it. The result is erroneously ;; considered an unreal buffer, so solaire-mode must be restored. (add-hook 'org-capture-mode-hook #'turn-on-solaire-mode) - ;; On Emacs 26+, when point is on the last line and solaire-mode is remapping - ;; the hl-line face, hl-line's highlight bleeds into the rest of the window - ;; after eob. On Emacs 27 this no longer happens. (unless EMACS27+ + ;; On Emacs <=26, when point is on the last line and solaire-mode is + ;; remapping the hl-line face, hl-line's highlight bleeds into the rest of + ;; the window after eob. On Emacs 27 this no longer happens. (defun +doom--line-range-fn () (let ((bol (line-beginning-position)) (eol (line-end-position)) @@ -57,21 +53,27 @@ (= eol pmax)) eol) ((line-beginning-position 2)))))) - (setq hl-line-range-function #'+doom--line-range-fn)) + (setq hl-line-range-function #'+doom--line-range-fn) - ;; Because fringes can't be given a buffer-local face, they can look odd, so - ;; we remove them in the minibuffer and which-key popups (they serve no - ;; purpose there anyway). - (add-hook! 'solaire-mode-hook - (defun +doom-disable-fringes-in-minibuffer-h (&rest _) - (set-window-fringes (minibuffer-window) 0 0 nil))) + ;; HACK The fringe cannot have a buffer-local remapping on Emacs <= 26, so + ;; we jump through hoops to reset it (globally) whenever it is likely + ;; that the fringe will have lost its background color. + + ;; Prevent color glitches when reloading either DOOM or loading a new theme + (add-hook! '(doom-load-theme-hook doom-reload-hook) :append + #'solaire-mode-reset) - (defadvice! +doom--no-fringes-in-which-key-buffer-a (&rest _) - :after 'which-key--show-buffer-side-window - (+doom-disable-fringes-in-minibuffer-h) - (set-window-fringes (get-buffer-window which-key--buffer) 0 0 nil)) + ;; fringe can become unstyled when deleting or focusing frames + (add-hook 'focus-in-hook #'solaire-mode-reset) - (add-hook! '(minibuffer-setup-hook window-configuration-change-hook) - #'+doom-disable-fringes-in-minibuffer-h) - - (solaire-global-mode +1)) + ;; A global fringe color means the minibuffer (with its fringes) will always + ;; stand out, so we remove them (in which-key popups too). + (add-hook! 'solaire-mode-hook + (defun +doom-disable-fringes-in-minibuffer-h (&rest _) + (set-window-fringes (minibuffer-window) 0 0 nil))) + (defadvice! +doom--no-fringes-in-which-key-buffer-a (&rest _) + :after 'which-key--show-buffer-side-window + (+doom-disable-fringes-in-minibuffer-h) + (set-window-fringes (get-buffer-window which-key--buffer) 0 0 nil)) + (add-hook! '(minibuffer-setup-hook window-configuration-change-hook) + #'+doom-disable-fringes-in-minibuffer-h))) diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 0893eebed..46e44fbbc 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -2,4 +2,4 @@ ;;; ui/doom/packages.el (package! doom-themes :pin "8d5ddbbb72") -(package! solaire-mode :pin "4ac324ccb0") +(package! solaire-mode :pin "adc8c0c60d") From 279ca195d52bbb0ee8fff4bd0d6cab32cb33565d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 03:44:42 -0400 Subject: [PATCH 018/229] Auto-disable solaire-global-mode in tty daemon frames Or try, at least. This is very flimsy. --- modules/ui/doom/config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 5ae5ddacd..17b7e70cc 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -33,6 +33,13 @@ (solaire-mode-swap-bg))) #'solaire-global-mode) :config + (when (daemonp) + (add-hook! 'doom-switch-frame-hook + (defun +doom-disable-solaire-mode-maybe-h (frame) + (if (display-graphic-p frame) + (solaire-global-mode +1) + (solaire-global-mode -1))))) + ;; org-capture takes an org buffer and narrows it. The result is erroneously ;; considered an unreal buffer, so solaire-mode must be restored. (add-hook 'org-capture-mode-hook #'turn-on-solaire-mode) From 4431eac0abf4ee287f3606893b8176540c27b85b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 13:04:03 -0400 Subject: [PATCH 019/229] Fix void-function: pdf-tools-install-noverify For folks who try `M-x pdf-tools-install` at startup instead of simply loading a pdf file. --- modules/tools/pdf/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index 4aa9f3bf9..99956fdea 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -53,6 +53,7 @@ (setq-hook! 'pdf-view-mode-hook evil-normal-state-cursor (list nil)) ;; Install epdfinfo binary if needed, blocking until it is finished + (require 'pdf-tools) (unless (file-executable-p pdf-info-epdfinfo-program) (let ((wconf (current-window-configuration))) (pdf-tools-install) From efa599f076c3a140c6b4006c352fdba3361abebd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 13:08:08 -0400 Subject: [PATCH 020/229] Fix run-hooks: wrong-number-of-args error for daemon users --- modules/ui/doom/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 17b7e70cc..2c62ec2db 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -35,8 +35,8 @@ :config (when (daemonp) (add-hook! 'doom-switch-frame-hook - (defun +doom-disable-solaire-mode-maybe-h (frame) - (if (display-graphic-p frame) + (defun +doom-disable-solaire-mode-maybe-h () + (if (display-graphic-p) (solaire-global-mode +1) (solaire-global-mode -1))))) From 1c9a39bf26597d2e0f43c1eb4cf581f91c1ac0fa Mon Sep 17 00:00:00 2001 From: bdarcus Date: Thu, 23 Apr 2020 14:25:05 -0400 Subject: [PATCH 021/229] switching org-roam-completion to use 'default The conditional setup for completion system was causing fuzzy completion to fail. This fixes that. --- modules/lang/org/contrib/roam.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index a5dcc3e83..a28f3ff9a 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -36,11 +36,7 @@ (setq org-roam-directory (expand-file-name (or org-roam-directory "") org-directory) org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU - org-roam-completion-system - (cond ((featurep! :completion helm) 'helm) - ((featurep! :completion ivy) 'ivy) - ((featurep! :completion ido) 'ido) - ('default))) + org-roam-completion-system 'default) ;; HACK Hide the mode line in the org-roam buffer, since it serves no purpose. ;; This makes it easier to distinguish among other org buffers. From 7d38f503e2f353009ff76e002d5d39fe0ed5b218 Mon Sep 17 00:00:00 2001 From: bdarcus Date: Thu, 23 Apr 2020 14:46:13 -0400 Subject: [PATCH 022/229] updating per @hlissner suggestion --- modules/lang/org/contrib/roam.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index a28f3ff9a..ef1fb7761 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -36,7 +36,14 @@ (setq org-roam-directory (expand-file-name (or org-roam-directory "") org-directory) org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU - org-roam-completion-system 'default) + org-roam-completion-system + (cond ((featurep! :completion helm) 'helm) + ((featurep! :completion ivy) 'ivy) + ((featurep! :completion ido) 'ido) + ('default)) + org-roam-completion-fuzzy-match + (or (featurep! :completion helm +fuzzy) + (featurep! :completion ivy +fuzzy))) ;; HACK Hide the mode line in the org-roam buffer, since it serves no purpose. ;; This makes it easier to distinguish among other org buffers. From 09d344541feda9cfa9caf435f0f40c0c18407252 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 16:52:54 -0400 Subject: [PATCH 023/229] epa-pinentry-mode -> epg-pinentry-mode Because epa-pinentry-mode is deprecated in 27+ --- modules/config/default/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 490ec2a14..8ed0cf535 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -31,7 +31,10 @@ (after! epa ;; With GPG 2.1+, this forces gpg-agent to use the Emacs minibuffer to prompt ;; for the key passphrase. - (setq epa-pinentry-mode 'loopback) + (set (if EMACS27+ + 'epg-pinentry-mode + 'epa-pinentry-mode) ; DEPRECATED `epa-pinentry-mode' + 'loopback) ;; Default to the first secret key available in your keyring. (setq-default epa-file-encrypt-to From 21f27764334ccb796b5914778a0ad9c9b7795c83 Mon Sep 17 00:00:00 2001 From: Tyler Ware Date: Thu, 23 Apr 2020 21:13:28 -0600 Subject: [PATCH 024/229] tmux: Quote shell arg in listing windows / panes Specifying a session and / or window to +tmux-list-windows and +tmux-list-panes just failed, because of the special characters used in the ids for sessions & windows ($ and @). Quoting the ids before building up the tmux command fixes this. --- modules/tools/tmux/autoload/tmux.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/tmux/autoload/tmux.el b/modules/tools/tmux/autoload/tmux.el index 63f51156e..46e066318 100644 --- a/modules/tools/tmux/autoload/tmux.el +++ b/modules/tools/tmux/autoload/tmux.el @@ -104,7 +104,7 @@ but do not execute them." (if-let* ((lines (+tmux (format "list-windows %s -F '#{window_id};#{session_id};#{window_active};#{window_name};#{window_activity_flag}'" (if session - (concat "-t " (car session)) + (concat "-t " (shell-quote-argument (car session))) "-a"))))) (cl-loop for line in (split-string lines "\n" t) collect (let ((window (split-string line ";"))) @@ -122,7 +122,7 @@ but do not execute them." (if sess-or-win (concat (if (string-prefix-p "$" (car sess-or-win)) "-s ") "-t " - (car sess-or-win)) + (shell-quote-argument (car sess-or-win))) "-a"))))) (cl-loop for line in (split-string lines "\n" t) collect (let ((pane (split-string line ";"))) From 346a90c95d1bf8ba0d7373251add2038540ea3ca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 16:53:37 -0400 Subject: [PATCH 025/229] Refactor vterm module --- modules/term/vterm/config.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index 18938206c..e21b7a60a 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -2,25 +2,26 @@ (use-package! vterm :when (bound-and-true-p module-file-suffix) - :commands (vterm vterm-mode) - :preface (setq vterm-install t) + :commands vterm vterm-mode + :preface (setq vterm-install t) ; compile the package when you load vterm + :hook (vterm-mode . doom-mark-buffer-as-real-h) + :hook (vterm-mode . hide-mode-line-mode) ; modeline serves no purpose in vterm :config (set-popup-rule! "^vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0) + ;; Once vterm is dead, the vterm buffer is useless. Why keep it around? We can + ;; spawn another if want one. + (setq vterm-kill-buffer-on-exit t) + (setq-hook! 'vterm-mode-hook - ;; Don't prompt about processes when killing vterm + ;; Don't prompt about dying processes when killing vterm confirm-kill-processes nil ;; Prevent premature horizontal scrolling hscroll-margin 0) - (setq vterm-kill-buffer-on-exit t) - + ;; Restore the point's location when leaving and re-entering insert mode. (when (featurep! :editor evil) (add-hook! 'vterm-mode-hook (defun +vterm-init-remember-point-h () (add-hook 'evil-insert-state-exit-hook #'+vterm-remember-insert-point-h nil t) - (add-hook 'evil-insert-state-entry-hook #'+vterm-goto-insert-point-h nil t)))) - - (add-hook 'vterm-mode-hook #'doom-mark-buffer-as-real-h) - ;; Modeline serves no purpose in vterm - (add-hook 'vterm-mode-hook #'hide-mode-line-mode)) + (add-hook 'evil-insert-state-entry-hook #'+vterm-goto-insert-point-h nil t))))) From 17dd1c652774300b422fbaf9918b8067050ca73a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 17:04:31 -0400 Subject: [PATCH 026/229] Add add-node-modules-path package to lang/javascript And use it on json-mode. --- modules/lang/javascript/autoload.el | 12 ------------ modules/lang/javascript/config.el | 3 ++- modules/lang/javascript/packages.el | 1 + 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/modules/lang/javascript/autoload.el b/modules/lang/javascript/autoload.el index a570be4ff..d4633f6b6 100644 --- a/modules/lang/javascript/autoload.el +++ b/modules/lang/javascript/autoload.el @@ -83,18 +83,6 @@ Run this for any buffer you want to skewer." ;; ;; Hooks -;;;###autoload -(defun +javascript-add-node-modules-path-h () - "Add current project's `node_modules/.bin` to `exec-path', so js tools -prioritize project-local packages over global ones." - (make-local-variable 'exec-path) - (cl-pushnew (expand-file-name "node_modules/.bin/" - (or (locate-dominating-file - (or (buffer-file-name) default-directory) - "node_modules") - (doom-project-root))) - exec-path :test #'string=)) - ;;;###autoload (defun +javascript-cleanup-tide-processes-h () "Clean up dangling tsserver processes if there are no more buffers with diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index c2fddb09b..489418de8 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -292,10 +292,11 @@ to tide." web-mode markdown-mode js-mode + json-mode typescript-mode solidity-mode) :when (locate-dominating-file default-directory "package.json") - :add-hooks '(+javascript-add-node-modules-path-h npm-mode)) + :add-hooks '(add-node-modules-path npm-mode)) (def-project-mode! +javascript-gulp-mode :when (locate-dominating-file default-directory "gulpfile.js")) diff --git a/modules/lang/javascript/packages.el b/modules/lang/javascript/packages.el index 5c3f1f9ad..8d4d99010 100644 --- a/modules/lang/javascript/packages.el +++ b/modules/lang/javascript/packages.el @@ -11,6 +11,7 @@ (package! eslintd-fix :pin "0c431141be") (package! js2-refactor :pin "d4c40b5fc8") (package! npm-mode :pin "3ee7c0bad5") +(package! add-node-modules-path :pin "f31e69ccb6") ;; Eval (package! nodejs-repl :pin "6fad7d764f") From 2d766cfa0c0b80a25718ae2bb46cf6f375ea67d9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 17:34:17 -0400 Subject: [PATCH 027/229] Remove :lang assembly This module is too trivial, and provides nothing that the user couldn't install themselves. --- core/autoload/help.el | 3 --- docs/modules.org | 1 - init.example.el | 1 - modules/lang/assembly/autoload.el | 4 ---- modules/lang/assembly/packages.el | 6 ------ 5 files changed, 15 deletions(-) delete mode 100644 modules/lang/assembly/autoload.el delete mode 100644 modules/lang/assembly/packages.el diff --git a/core/autoload/help.el b/core/autoload/help.el index 3c5954d7d..7cd190969 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -3,9 +3,6 @@ (defvar doom--help-major-mode-module-alist '((dockerfile-mode :tools docker) (agda2-mode :lang agda) - (haxor-mode :lang assembly) - (mips-mode :lang assembly) - (nasm-mode :lang assembly) (c-mode :lang cc) (c++-mode :lang cc) (objc++-mode :lang cc) diff --git a/docs/modules.org b/docs/modules.org index 4a8dc11d4..9d133f884 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -92,7 +92,6 @@ Modules that reconfigure or augment packages or features built into Emacs. Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/agda/README.org][agda]] - TODO -+ assembly - TODO + [[file:../modules/lang/cc/README.org][cc]] =+lsp= - TODO + [[file:../modules/lang/clojure/README.org][clojure]] =+lsp= - TODO + common-lisp - TODO diff --git a/init.example.el b/init.example.el index be49b185d..70cfcf205 100644 --- a/init.example.el +++ b/init.example.el @@ -104,7 +104,6 @@ :lang ;;agda ; types of types of types of types... - ;;assembly ; assembly for fun or debugging ;;cc ; C/C++/Obj-C madness ;;clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all diff --git a/modules/lang/assembly/autoload.el b/modules/lang/assembly/autoload.el deleted file mode 100644 index 29e8ded24..000000000 --- a/modules/lang/assembly/autoload.el +++ /dev/null @@ -1,4 +0,0 @@ -;;; lang/assembly/autoload.el -*- lexical-binding: t; -*- - -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.hax\\'" . haxor-mode)) diff --git a/modules/lang/assembly/packages.el b/modules/lang/assembly/packages.el deleted file mode 100644 index 78e44be3d..000000000 --- a/modules/lang/assembly/packages.el +++ /dev/null @@ -1,6 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; lang/assembly/packages.el - -(package! mips-mode :pin "75152fc78b") -(package! haxor-mode :pin "6fa25a8e6b") -(package! nasm-mode :pin "65ca6546fc") From b151abfd34d60dda9b6e58ffb91240b0cacbc803 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 17:38:45 -0400 Subject: [PATCH 028/229] Add :lang json module Removes json-mode from :lang data and adds LSP support (#2502). --- docs/modules.org | 1 + init.example.el | 1 + modules/lang/data/config.el | 5 ----- modules/lang/data/packages.el | 1 - modules/lang/json/README.org | 40 +++++++++++++++++++++++++++++++++++ modules/lang/json/config.el | 14 ++++++++++++ modules/lang/json/packages.el | 5 +++++ 7 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 modules/lang/json/README.org create mode 100644 modules/lang/json/config.el create mode 100644 modules/lang/json/packages.el diff --git a/docs/modules.org b/docs/modules.org index 9d133f884..e921ce1a5 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -111,6 +111,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/haskell/README.org][haskell]] =+dante +ghcide +lsp= - TODO + hy - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO ++ [[file:../modules/lang/json/README.org][json]] =+lsp= - TODO + java =+meghanada +lsp= - TODO + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia =+lsp= - TODO diff --git a/init.example.el b/init.example.el index 70cfcf205..f44db3f3f 100644 --- a/init.example.el +++ b/init.example.el @@ -124,6 +124,7 @@ ;;(haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; + ;;json ; At least it ain't XML ;;(java +meghanada) ; the poster child for carpal tunnel syndrome ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB diff --git a/modules/lang/data/config.el b/modules/lang/data/config.el index e625d4fd0..de828f17f 100644 --- a/modules/lang/data/config.el +++ b/modules/lang/data/config.el @@ -34,11 +34,6 @@ :mode "\\.gql\\'" :config (setq-hook! 'graphql-mode-hook tab-width graphql-indent-level)) -(use-package! json-mode - :mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'" - :config - (set-electric! 'json-mode :chars '(?\n ?: ?{ ?}))) - (after! jsonnet-mode (set-electric! 'jsonnet-mode :chars '(?\n ?: ?{ ?}))) diff --git a/modules/lang/data/packages.el b/modules/lang/data/packages.el index 1c338af9e..20646ff7e 100644 --- a/modules/lang/data/packages.el +++ b/modules/lang/data/packages.el @@ -2,7 +2,6 @@ ;;; lang/data/packages.el (package! graphql-mode :pin "7c37aee28b") -(package! json-mode :pin "0e819e519a") (package! jsonnet-mode :pin "d8b486c837") (package! yaml-mode :pin "cecf4b106b") (package! csv-mode :pin "635337407c") diff --git a/modules/lang/json/README.org b/modules/lang/json/README.org new file mode 100644 index 000000000..6106c7ff1 --- /dev/null +++ b/modules/lang/json/README.org @@ -0,0 +1,40 @@ +#+TITLE: lang/json +#+DATE: April 23, 2020 +#+SINCE: v3.0.0 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +This module provides JSON support. + +** Maintainers +This module has no dedicated maintainers. + +** Module Flags ++ =+lsp= Enable integration with LSP servers, if one is available. Requires the + =:tools lsp= module to be enabled. + +** Plugins ++ [[https://github.com/joshwnj/json-mode][json-mode]] ++ [[https://github.com/Sterlingg/json-snatcher][json-snatcher]] + +* Prerequisites +This module has no prereqisites. + +* TODO Features +# An in-depth list of features, how to use them, and their dependencies. + +* TODO Configuration +# How to configure this module, including common problems and how to address them. + +* TODO Troubleshooting +# Common issues and their solution, or places to look for help. diff --git a/modules/lang/json/config.el b/modules/lang/json/config.el new file mode 100644 index 000000000..62db538af --- /dev/null +++ b/modules/lang/json/config.el @@ -0,0 +1,14 @@ +;;; lang/json/config.el -*- lexical-binding: t; -*- + +(use-package! json-mode + :mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'" + :init + (when (featurep! +lsp) + (add-hook 'json-mode-local-vars-hook #'lsp!)) + :config + (set-electric! 'json-mode :chars '(?\n ?: ?{ ?})) + + (map! :after json-mode + :map json-mode-map + :localleader + "s" #'jsons-print-path)) diff --git a/modules/lang/json/packages.el b/modules/lang/json/packages.el new file mode 100644 index 000000000..69d84fb8a --- /dev/null +++ b/modules/lang/json/packages.el @@ -0,0 +1,5 @@ +;; -*- no-byte-compile: t; -*- +;;; lang/json/packages.el + +(package! json-mode :pin "0e819e519a") +(package! json-snatcher :pin "c4cecc0a50") From 4a8c4815f1c684a0bf0a9b9876c88bee363c0203 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 17:43:42 -0400 Subject: [PATCH 029/229] Add :lang yaml module Removes yaml-mode from :lang data and adds LSP support (#2502). Closes #2502 Co-authored-by: Seong Yong-ju --- docs/modules.org | 1 + init.example.el | 1 + modules/lang/data/config.el | 3 --- modules/lang/data/packages.el | 1 - modules/lang/yaml/README.org | 38 +++++++++++++++++++++++++++++++++++ modules/lang/yaml/config.el | 9 +++++++++ modules/lang/yaml/packages.el | 4 ++++ 7 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 modules/lang/yaml/README.org create mode 100644 modules/lang/yaml/config.el create mode 100644 modules/lang/yaml/packages.el diff --git a/docs/modules.org b/docs/modules.org index e921ce1a5..5b3796d94 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -143,6 +143,7 @@ Modules that bring support for a language or group of languages to Emacs. + swift =+lsp= - TODO + terra - TODO + web =+lsp= - HTML and CSS (SCSS/SASS/LESS/Stylus) support. ++ [[file:../modules/lang/yaml/README.org][yaml]] =+lsp= - TODO * :term Modules that offer terminal emulation. diff --git a/init.example.el b/init.example.el index f44db3f3f..3c54247a7 100644 --- a/init.example.el +++ b/init.example.el @@ -158,6 +158,7 @@ ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. ;;web ; the tubes + ;;yaml ; JSON, but readable :email ;;(mu4e +gmail) diff --git a/modules/lang/data/config.el b/modules/lang/data/config.el index de828f17f..19776b4e4 100644 --- a/modules/lang/data/config.el +++ b/modules/lang/data/config.el @@ -37,9 +37,6 @@ (after! jsonnet-mode (set-electric! 'jsonnet-mode :chars '(?\n ?: ?{ ?}))) -(after! yaml-mode - (setq-hook! 'yaml-mode-hook tab-width yaml-indent-offset)) - ;; ;;; Frameworks diff --git a/modules/lang/data/packages.el b/modules/lang/data/packages.el index 20646ff7e..d98d089ad 100644 --- a/modules/lang/data/packages.el +++ b/modules/lang/data/packages.el @@ -3,7 +3,6 @@ (package! graphql-mode :pin "7c37aee28b") (package! jsonnet-mode :pin "d8b486c837") -(package! yaml-mode :pin "cecf4b106b") (package! csv-mode :pin "635337407c") (package! dhall-mode :pin "ef4d33debe") (package! protobuf-mode diff --git a/modules/lang/yaml/README.org b/modules/lang/yaml/README.org new file mode 100644 index 000000000..f036f5a24 --- /dev/null +++ b/modules/lang/yaml/README.org @@ -0,0 +1,38 @@ +#+TITLE: lang/yaml +#+DATE: April 23, 2020 +#+SINCE: v3.0.0 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +This module provides support for the [[https://yaml.org/][YAML file format]]. + +** Maintainers +This module has no dedicated maintainers. + +** Module Flags ++ =+lsp= Enables integration with LSP servers. Requires the =:tools lsp= module to be enabled. + +** Plugins ++ [[https://github.com/yoshiki/yaml-mode][yaml-mode]] + +* Prerequisites +This module has no prereqisites. + +* TODO Features +# An in-depth list of features, how to use them, and their dependencies. + +* TODO Configuration +# How to configure this module, including common problems and how to address them. + +* TODO Troubleshooting +# Common issues and their solution, or places to look for help. diff --git a/modules/lang/yaml/config.el b/modules/lang/yaml/config.el new file mode 100644 index 000000000..282b4ed7a --- /dev/null +++ b/modules/lang/yaml/config.el @@ -0,0 +1,9 @@ +;;; lang/yaml/config.el -*- lexical-binding: t; -*- + +(use-package! yaml-mode + :hook "Procfile\\'" + :init + (when (featurep! +lsp) + (add-hook 'yaml-mode-local-vars-hook #'lsp!)) + :config + (setq-hook! 'yaml-mode-hook tab-width yaml-indent-offset)) diff --git a/modules/lang/yaml/packages.el b/modules/lang/yaml/packages.el new file mode 100644 index 000000000..6e0f161f3 --- /dev/null +++ b/modules/lang/yaml/packages.el @@ -0,0 +1,4 @@ +;; -*- no-byte-compile: t; -*- +;;; lang/yaml/packages.el + +(package! yaml-mode :pin "cecf4b106b") From e24b8cd1d1e4ceb7e4454a267985b639d5e7eb06 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 17:44:12 -0400 Subject: [PATCH 030/229] Slim down from lang/data + Removes jsonnet, graphql, dhall & protobuf packages from the module. + Removes +data-vagrant-mode project minor mode (unused). I'm phasing out the lang/data module. Its original purpose was to be for data interchange formats, like JSON, but over time it became the dumping ground for languages with no clear defining feature. These packages are being removed first because their configs are non-existent or so trivial that it offers nothing a user couldn't set up themselves. graphql and jsonnet might get heir own modules (or jsonnet might be gated behind a flag in the :lang json module), but for now they gotta go. fixup! Remove jsonnet, graphql, dhall & protobuf modes from lang/data --- core/core-editor.el | 2 ++ modules/lang/data/config.el | 21 --------------------- modules/lang/data/packages.el | 6 ------ 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index b08f53670..1702c4d8e 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -174,6 +174,8 @@ possible." (push '("/LICENSE\\'" . text-mode) auto-mode-alist) (push '("\\.log\\'" . text-mode) auto-mode-alist) +(push '("rc\\'" . conf-mode) auto-mode-alist) +(push '("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode) auto-mode-alist) ;; diff --git a/modules/lang/data/config.el b/modules/lang/data/config.el index 19776b4e4..da0e72344 100644 --- a/modules/lang/data/config.el +++ b/modules/lang/data/config.el @@ -1,9 +1,5 @@ ;;; lang/data/config.el -*- lexical-binding: t; -*- -;; Built in plugins -(add-to-list 'auto-mode-alist '("/sxhkdrc\\'" . conf-mode)) -(add-to-list 'auto-mode-alist '("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode)) - (use-package! nxml-mode :mode "\\.p\\(?:list\\|om\\)\\'" ; plist, pom :mode "\\.xs\\(?:d\\|lt\\)\\'" ; xslt, xsd @@ -16,9 +12,6 @@ (setq-hook! 'nxml-mode-hook tab-width nxml-child-indent)) -;; -;;; Third-party plugins - ;;;###package csv-mode (map! :after csv-mode :localleader @@ -29,17 +22,3 @@ "S" #'csv-sort-numeric-fields "k" #'csv-kill-fields "t" #'csv-transpose) - -(use-package! graphql-mode - :mode "\\.gql\\'" - :config (setq-hook! 'graphql-mode-hook tab-width graphql-indent-level)) - -(after! jsonnet-mode - (set-electric! 'jsonnet-mode :chars '(?\n ?: ?{ ?}))) - - -;; -;;; Frameworks - -(def-project-mode! +data-vagrant-mode - :files ("Vagrantfile")) diff --git a/modules/lang/data/packages.el b/modules/lang/data/packages.el index d98d089ad..72a9dae2d 100644 --- a/modules/lang/data/packages.el +++ b/modules/lang/data/packages.el @@ -1,10 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/data/packages.el -(package! graphql-mode :pin "7c37aee28b") -(package! jsonnet-mode :pin "d8b486c837") (package! csv-mode :pin "635337407c") -(package! dhall-mode :pin "ef4d33debe") -(package! protobuf-mode - :recipe (:host github :repo "emacsmirror/protobuf-mode" :files (:defaults "*")) - :pin "94b7bd7e8b") From fe3f3d91c3a70bce471dbf36ccc0e48b6e1f6afa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 18:10:13 -0400 Subject: [PATCH 031/229] tools/magit: gate forge behind flag & add README #1166 --- docs/modules.org | 2 +- modules/tools/magit/README.org | 60 +++++++++++++++++++++++++++++++++ modules/tools/magit/config.el | 10 +++--- modules/tools/magit/packages.el | 3 +- 4 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 modules/tools/magit/README.org diff --git a/docs/modules.org b/docs/modules.org index 5b3796d94..5bd421faa 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -168,7 +168,7 @@ Small modules that give Emacs access to external tools & services. backend + [[file:../modules/tools/lsp/README.org][lsp]] =+peek= - TODO + macos - TODO -+ magit - TODO ++ [[file:../modules/tools/magit/README.org][magit]] =+forge= - TODO + make - TODO + pass - TODO + pdf - TODO diff --git a/modules/tools/magit/README.org b/modules/tools/magit/README.org new file mode 100644 index 000000000..2be927280 --- /dev/null +++ b/modules/tools/magit/README.org @@ -0,0 +1,60 @@ +#+TITLE: tools/magit +#+DATE: March 14, 2018 +#+SINCE: v2.0.0 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] + - [[#hacks][Hacks]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +This module provides Magit, an interface to the Git version control system. + +If you are new to Magit, see the [[https://github.com/magit/magit#getting-started][Getting Started]] section of its project readme. + +** Maintainers +This module has no dedicated maintainers. + +** Module Flags ++ =+forge= Enable Forge; a porcelain for managing issues and PRs from within + Emacs. Will take a while on first run to build emacsql-sqlite. + +** Plugins ++ [[https://github.com/magit/magit][magit]] ++ [[https://github.com/magit/forge][forge]]* (=+forge=) ++ [[https://github.com/jtatarik/magit-gitflow][magit-gitflow]] ++ [[https://github.com/alphapapa/magit-todos][magit-todos]] ++ [[https://github.com/charignon/github-review][github-review]] ++ [[https://github.com/emacs-evil/evil-magit][evil-magit]]* (=:editor evil +everywhere=) + +** Hacks ++ =forge= was modified to defer compilation of emacsql-sqlite until you try to + use forge, rather than when magit first loads (which could be as soon as + startup). ++ =magit= has been modified to recognize + =$XDG_CACHE_HOME/git/credential/socket=. ++ =magit= has been modified to invalidate the projectile cache when you check + out a new branch or commit. ++ =magit= has been modified to revert repo buffers (e.g. after changing + branches) when you later switch to them, rather than all at once. + +* Prerequisites +This module requires ~git~. + +Forge will require [[https://magit.vc/manual/forge/Token-Creation.html#Token-Creation][a Github API token]] the first time you run =forge-pull=. + +* TODO Features +# An in-depth list of features, how to use them, and their dependencies. + +* TODO Configuration +# How to configure this module, including common problems and how to address them. + +* TODO Troubleshooting +# Common issues and their solution, or places to look for help. diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 9bb3d8767..66cdff2ea 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -1,8 +1,5 @@ ;;; tools/magit/config.el -*- lexical-binding: t; -*- -;; -;;; Packages - (use-package! magit :commands magit-file-delete :defer-incrementally (dash f s with-editor git-commit package eieio lv transient) @@ -92,11 +89,12 @@ (use-package! forge + :when (featurep! +forge) ;; We defer loading even further because forge's dependencies will try to ;; compile emacsql, which is a slow and blocking operation. :after-call magit-status :commands forge-create-pullreq forge-create-issue - :init + :preface (setq forge-database-file (concat doom-etc-dir "forge/forge-database.sqlite")) :config ;; All forge list modes are derived from `forge-topic-list-mode' @@ -123,8 +121,8 @@ ensure it is built when we actually use Forge." (message (concat "Failed to build emacsql; forge may not work correctly.\n" "See *Compile-Log* buffer for details")) ;; HACK Due to changes upstream, forge doesn't initialize completely if - ;; it doesn't find `emacsql-sqlite-executable', so we have to do it - ;; manually after installing it. + ;; it doesn't find `emacsql-sqlite-executable', so we have to do it + ;; manually after installing it. (setq forge--sqlite-available-p t) (magit-add-section-hook 'magit-status-sections-hook 'forge-insert-pullreqs nil t) (magit-add-section-hook 'magit-status-sections-hook 'forge-insert-issues nil t) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index de80bc93d..0bc97b4e1 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -2,7 +2,8 @@ ;;; tools/magit/packages.el (when (package! magit :pin "0f1234e785") - (package! forge :pin "2e2d26cf42") + (when (featurep! +forge) + (package! forge :pin "2e2d26cf42")) (package! magit-gitflow :pin "cc41b561ec") (package! magit-todos :pin "a0e5d1f3c7") (package! github-review :pin "50c6bcc7cf") From fe8dd63f221dcaee12fcac83dc3a17e4e1faddf7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 19:45:26 -0400 Subject: [PATCH 032/229] Disable a couple modules by default An effort to reduce the number of packages for first-time install. These features aren't critical to the UX or character of Doom Emacs, so I've made them opt-in. --- init.example.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.example.el b/init.example.el index 3c54247a7..06bae4712 100644 --- a/init.example.el +++ b/init.example.el @@ -34,7 +34,7 @@ ;;hydra ;;indent-guides ; highlighted indent columns modeline ; snazzy, Atom-inspired modeline, plus API - nav-flash ; blink the current line after jumping + ;;nav-flash ; blink cursor line after big motions ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows @@ -44,7 +44,7 @@ ;;unicode ; extended unicode support for various languages vc-gutter ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB - window-select ; visually switch windows + ;;window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces ;;zen ; distraction-free coding or writing @@ -110,7 +110,7 @@ ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c ;;csharp ; unity, .NET, and mono shenanigans - data ; config/data formats + ;;data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;elixir ; erlang done right ;;elm ; care for a cup of TEA? From 28ec59cd20d0c74bfa0b55fd97ab1513b929ea99 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 20:00:31 -0400 Subject: [PATCH 033/229] lang/javascript: start tide/lsp later Gives direnv and other mode hooks a chance to set up the environment first. --- modules/lang/javascript/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 489418de8..4b6debd2d 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -133,7 +133,9 @@ ;; ;;; Tools -(add-hook! '(js-mode-hook typescript-mode-hook web-mode-hook) +(add-hook! '(js2-mode-local-vars-hook + typescript-mode-local-vars-hook + web-mode-local-vars-hook) (defun +javascript-init-lsp-or-tide-maybe-h () "Start `lsp' or `tide' in the current buffer. From 916ef0fbbef3e61716dbeacf0c2ddc441b69c23b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 23:41:03 -0400 Subject: [PATCH 034/229] Rename unmap! to undefine-key! unmap! gives the false impression that it is related or similar to map!, but it isn't. --- core/core-keybinds.el | 3 ++- docs/getting_started.org | 2 +- modules/tools/magit/config.el | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index a79258aee..7a698eab2 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -77,7 +77,8 @@ all hooks after it are ignored.") :init ;; Convenience aliases (defalias 'define-key! #'general-def) - (defalias 'unmap! #'general-unbind)) + (defalias 'undefine-key! #'general-unbind)) + ;; HACK `map!' uses this instead of `define-leader-key!' because it consumes ;; 20-30% more startup time, so we reimplement it ourselves. diff --git a/docs/getting_started.org b/docs/getting_started.org index 5745cbd2d..5e04916a9 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -910,7 +910,7 @@ also be helpful for debugging. + define-key + global-set-key + map! -+ unmap! ++ undefine-key! + define-key! ** Writing your own modules diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 66cdff2ea..ce2c785f2 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -162,7 +162,7 @@ ensure it is built when we actually use Forge." (setq evil-magit-state 'normal evil-magit-use-z-for-folds t) :config - (unmap! magit-mode-map + (undefine-key! magit-mode-map ;; Replaced by z1, z2, z3, etc "M-1" "M-2" "M-3" "M-4" "1" "2" "3" "4" From 06d5d5e6c0c595005c541cc6497a9b1df4d96120 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 23:49:35 -0400 Subject: [PATCH 035/229] General refactors, reformatting & comment revision --- core/autoload/config.el | 2 +- core/core-projects.el | 3 -- core/core-ui.el | 3 -- init.example.el | 8 ++--- modules/completion/helm/config.el | 9 +----- modules/config/default/+evil-bindings.el | 26 +++++++++------ modules/editor/snippets/config.el | 1 + modules/email/mu4e/README.org | 2 +- modules/input/chinese/config.el | 5 +-- modules/lang/clojure/config.el | 40 ++++++++++++++---------- modules/lang/emacs-lisp/packages.el | 3 ++ modules/lang/java/config.el | 4 +-- modules/lang/org/contrib/dragndrop.el | 12 +++---- modules/term/eshell/config.el | 2 +- modules/tools/lookup/config.el | 9 +++--- 15 files changed, 65 insertions(+), 64 deletions(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index eb3acac93..841a11b91 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -76,7 +76,7 @@ Runs `doom-reload-hook' afterwards." (interactive) (require 'core-cli) (when (and IS-WINDOWS (file-exists-p doom-env-file)) - (warn "Can't regenerate envvar file from within Emacs. Run 'doom env' from the console")) + (message "Can't regenerate envvar file from within Emacs. Run 'doom env' from the console")) ;; In case doom/reload is run before incrementally loaded packages are loaded, ;; which could cause odd load order issues. (mapc #'require (cdr doom-incremental-packages)) diff --git a/core/core-projects.el b/core/core-projects.el index 8b65e1ee9..daca64c3a 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -15,9 +15,6 @@ Emacs.") "fd") "name of `fd-find' executable binary") -(defvar doom-projectile-cache-timer-file (concat doom-cache-dir "projectile.timers") - "Where to save project file cache timers.") - ;; ;;; Packages diff --git a/core/core-ui.el b/core/core-ui.el index 103404615..ebbe798a1 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -278,9 +278,6 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq indicate-buffer-boundaries nil indicate-empty-lines nil) -;; remove continuation arrow on right fringe -(delq! 'continuation fringe-indicator-alist 'assq) - ;; ;;; Windows/frames diff --git a/init.example.el b/init.example.el index 06bae4712..370dd77d4 100644 --- a/init.example.el +++ b/init.example.el @@ -1,11 +1,11 @@ ;;; init.el -*- lexical-binding: t; -*- -;; This file controls what Doom modules are enabled and what order they load in. -;; Remember to run 'doom sync' after modifying it! +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! ;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's -;; documentation. There you'll find information about all of Doom's modules -;; and what flags they support. +;; documentation. There you'll find information about all of Doom's +;; modules and what flags they support. ;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or ;; 'C-c g k' for non-vim users) to view its documentation. This works on diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index c27d30113..66e8d7b9a 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -101,14 +101,7 @@ be negative.") :config (set-popup-rule! "^\\*helm" :vslot -100 :size 0.22 :ttl nil) - ;; HACK Doom doesn't support these commands, which invite the user to install - ;; the package via ELPA. Force them to use +helm/* instead, because they work - ;; out of the box. - (advice-add #'helm-projectile-rg :override #'+helm/project-search) - (advice-add #'helm-projectile-ag :override #'+helm/project-search) - (advice-add #'helm-projectile-grep :override #'+helm/project-search) - - ;; Hide the modeline + ;; Hide the modeline in helm windows as it serves little purpose. (defun +helm--hide-mode-line (&rest _) (with-current-buffer (helm-buffer-get) (unless helm-mode-line-string diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index ce615bb6f..43a3e3770 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -6,7 +6,8 @@ ;; Minibuffer (define-key! evil-ex-completion-map "C-a" #'evil-beginning-of-line - "C-b" #'evil-backward-char) + "C-b" #'evil-backward-char + "C-f" #'evil-forward-char) (define-key! :keymaps +default-minibuffer-maps [escape] #'abort-recursive-edit @@ -15,16 +16,21 @@ "C-u" #'evil-delete-back-to-indentation "C-v" #'yank "C-w" #'doom/delete-backward-word - "C-z" (λ! (ignore-errors (call-interactively #'undo))) - ;; Scrolling lines - "C-j" #'next-line - "C-k" #'previous-line - "C-S-j" #'scroll-up-command - "C-S-k" #'scroll-down-command) + "C-z" (λ! (ignore-errors (call-interactively #'undo)))) - (define-key! read-expression-map - "C-j" #'next-line-or-history-element - "C-k" #'previous-line-or-history-element)) + (when (featurep! :editor evil +everywhere) + (define-key! :keymaps +default-minibuffer-maps + "C-f" #'forward-word + "C-b" #'backward-word + "M-f" #'foward-char + "M-b" #'backward-char + "C-j" #'next-line + "C-k" #'previous-line + "C-S-j" #'scroll-up-command + "C-S-k" #'scroll-down-command) + (define-key! read-expression-map + "C-j" #'next-line-or-history-element + "C-k" #'previous-line-or-history-element))) ;; diff --git a/modules/editor/snippets/config.el b/modules/editor/snippets/config.el index d4b9728a8..2a337412f 100644 --- a/modules/editor/snippets/config.el +++ b/modules/editor/snippets/config.el @@ -21,6 +21,7 @@ (defvar yas-snippet-dirs nil) (if (daemonp) + ;; If in a daemon session, front-load this expensive work: (after! yasnippet (yas-reload-all)) ;; Ensure `yas-reload-all' is called as late as possible. Other modules ;; could have additional configuration for yasnippet. For example, diff --git a/modules/email/mu4e/README.org b/modules/email/mu4e/README.org index 9f4a95172..dcf51e24a 100644 --- a/modules/email/mu4e/README.org +++ b/modules/email/mu4e/README.org @@ -12,7 +12,7 @@ - [[#arch-linux][Arch Linux]] - [[#nixos][NixOS]] - [[#opensuse][openSUSE]] - - [[Debian/Ubuntu]] + - [[#debianubuntu][Debian/Ubuntu]] - [[#features][Features]] - [[#configuration][Configuration]] - [[#offlineimap][offlineimap]] diff --git a/modules/input/chinese/config.el b/modules/input/chinese/config.el index 666cfe395..ffa4e2669 100644 --- a/modules/input/chinese/config.el +++ b/modules/input/chinese/config.el @@ -2,9 +2,10 @@ (use-package! pyim :after-call after-find-file pre-command-hook + :init + (setq pyim-dcache-directory (concat doom-cache-dir "pyim/")) :config - (setq pyim-dcache-directory (concat doom-cache-dir "pyim/") - pyim-page-tooltip t + (setq pyim-page-tooltip t default-input-method "pyim")) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 36d8b0b75..7a091a3ae 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -11,21 +11,22 @@ ;; ;;; Packages -;;;###package clojure-mode -(add-hook 'clojure-mode-hook #'rainbow-delimiters-mode) -(when (featurep! +lsp) - (add-hook! '(clojure-mode-local-vars-hook - clojurec-mode-local-vars-hook - clojurescript-mode-local-vars-hook) - (defun +clojure-disable-lsp-indentation-h () - (setq-local lsp-enable-indentation nil)) - #'lsp!) - (after! lsp-clojure - (dolist (m '(clojure-mode - clojurec-mode - clojurescript-mode - clojurex-mode)) - (add-to-list 'lsp-language-id-configuration (cons m "clojure"))))) +(use-package! clojure-mode + :hook (clojure-mode . rainbow-delimiters-mode) + :config + (when (featurep! +lsp) + (add-hook! '(clojure-mode-local-vars-hook + clojurec-mode-local-vars-hook + clojurescript-mode-local-vars-hook) + (defun +clojure-disable-lsp-indentation-h () + (setq-local lsp-enable-indentation nil)) + #'lsp!) + (after! lsp-clojure + (dolist (m '(clojure-mode + clojurec-mode + clojurescript-mode + clojurex-mode)) + (add-to-list 'lsp-language-id-configuration (cons m "clojure")))))) (use-package! cider @@ -58,13 +59,18 @@ cider-repl-history-quit-action 'delete-and-restore cider-repl-history-highlight-inserted-item t cider-repl-history-size 1000 - cider-repl-pop-to-buffer-on-connect 'display-only cider-repl-result-prefix ";; => " cider-repl-print-length 100 cider-repl-use-clojure-font-lock t cider-repl-use-pretty-printing t cider-repl-wrap-history nil - cider-stacktrace-default-filters '(tooling dup)) + cider-stacktrace-default-filters '(tooling dup) + + ;; Don't focus the CIDER REPL when it starts. Since it can take so long + ;; to start up, you either wait for a minute doing nothing or be + ;; prepared for your cursor to suddenly change buffers without warning. + ;; See https://github.com/clojure-emacs/cider/issues/1872 + cider-repl-pop-to-buffer-on-connect 'display-only) ;; Error messages emitted from CIDER is silently funneled into *nrepl-server* ;; rather than the *cider-repl* buffer. How silly. We might want to see that diff --git a/modules/lang/emacs-lisp/packages.el b/modules/lang/emacs-lisp/packages.el index f953c3662..a72ea6124 100644 --- a/modules/lang/emacs-lisp/packages.el +++ b/modules/lang/emacs-lisp/packages.el @@ -4,6 +4,8 @@ (package! elisp-mode :built-in t) (package! highlight-quoted :pin "2410347815") + +;; Tools (package! macrostep :pin "424e3734a1") (package! overseer :pin "02d49f582e") (package! elisp-def :pin "368b04da68") @@ -11,4 +13,5 @@ (when (featurep! :checkers syntax) (package! flycheck-cask :pin "3457ae553c")) +;; Libraries (package! buttercup :pin "a91f282025") diff --git a/modules/lang/java/config.el b/modules/lang/java/config.el index 4b04f3dff..5e6dee5fd 100644 --- a/modules/lang/java/config.el +++ b/modules/lang/java/config.el @@ -22,7 +22,7 @@ If the depth is 2, the first two directories are removed: net.lissner.game.") ;; -;; java-mode +;;; java-mode (add-hook 'java-mode-hook #'rainbow-delimiters-mode) @@ -31,7 +31,7 @@ If the depth is 2, the first two directories are removed: net.lissner.game.") ;; -;; Common packages +;;; Common packages (use-package! android-mode :commands android-mode diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 84e2671e1..28f3229dc 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -38,7 +38,7 @@ (defadvice! +org--dragndrop-insert-link-a (_link filename) "Produces and inserts a link to FILENAME into the document. -If FILENAME is an image, produce an attach:%s path, otherwise use file:%s (with +If FILENAME is an image, produce an download:%s path, otherwise use file:%s (with an file icon produced by `+org-attach-icon-for')." :override #'org-download-insert-link (if (looking-back "^[ \t]+" (line-beginning-position)) @@ -54,11 +54,9 @@ an file icon produced by `+org-attach-icon-for')." (if (= org-download-image-org-width 0) "" (format "#+attr_org: :width %dpx\n" org-download-image-org-width)) (format org-download-link-format - (cond ((file-in-directory-p filename org-attach-id-dir) - (file-relative-name filename org-attach-id-dir)) - ((file-in-directory-p filename org-directory) - (file-relative-name filename org-directory)) - (filename))))) + (if (file-in-directory-p filename org-attach-id-dir) + (file-relative-name filename org-attach-id-dir) + filename)))) (org-display-inline-images)) ((insert (format "%s [[./%s][%s]] " @@ -72,6 +70,6 @@ an file icon produced by `+org-attach-icon-for')." :filter-return #'org-download--fullname (let ((dir (or (if buffer-file-name (file-name-directory buffer-file-name)) default-directory))) - (if (file-in-directory-p dir org-directory) + (if (file-in-directory-p dir org-attach-id-dir) (file-relative-name path dir) path)))) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 412d69bdc..217fa6ff4 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -48,7 +48,7 @@ You should use `set-eshell-alias!' to change this.") ;; -;; Packages +;;; Packages (after! eshell ; built-in (setq eshell-banner-message diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index 35179e360..cd78596b3 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -172,11 +172,10 @@ See https://github.com/magit/ghub/issues/81" (let ((gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")) (funcall orig-fn url))) - (use-package! helm-dash - :when (featurep! :completion helm)) - - (use-package! counsel-dash - :when (featurep! :completion ivy))) + (cond ((featurep! :completion helm) + (require 'helm-dash nil t)) + ((featurep! :completion ivy) + (require 'counsel-dash nil t)))) ;; From daec7b505779eae1722b9300df435279f39175c9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 23:50:40 -0400 Subject: [PATCH 036/229] Remove eslintd-fix package This package isn't hooked up to anything and has no keybinds. Its config is so trivial that users can install it themselves, so I decided it won't be included with the module by default. --- modules/lang/javascript/README.org | 1 - modules/lang/javascript/config.el | 7 ------- modules/lang/javascript/packages.el | 1 - 3 files changed, 9 deletions(-) diff --git a/modules/lang/javascript/README.org b/modules/lang/javascript/README.org index 2d45742fa..7edd05fc5 100644 --- a/modules/lang/javascript/README.org +++ b/modules/lang/javascript/README.org @@ -37,7 +37,6 @@ This module adds JavaScript and TypeScript support. + [[https://github.com/mooz/js2-mode][js2-mode]] + [[https://github.com/felipeochoa/rjsx-mode][rjsx-mode]] + [[https://github.com/emacs-typescript/typescript.el][typescript-mode]] -+ [[https://github.com/aaronjensen/eslintd-fix][eslintd-fix]] + [[https://github.com/magnars/js2-refactor.el][js2-refactor]] + [[https://github.com/mojochao/npm-mode][npm-mode]] + [[https://github.com/abicky/nodejs-repl.el][nodejs-repl]] diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 4b6debd2d..cb7f067ee 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -241,13 +241,6 @@ to tide." (js2r-add-keybindings-with-prefix (format "%s r" doom-localleader-key))))) -(use-package! eslintd-fix - :commands eslintd-fix - :config - (setq-hook! 'eslintd-fix-mode-hook - flycheck-javascript-eslint-executable eslintd-fix-executable)) - - ;;;###package skewer-mode (map! :localleader (:after js2-mode diff --git a/modules/lang/javascript/packages.el b/modules/lang/javascript/packages.el index 8d4d99010..483ef6f47 100644 --- a/modules/lang/javascript/packages.el +++ b/modules/lang/javascript/packages.el @@ -8,7 +8,6 @@ (package! typescript-mode :pin "102587e458") ;; Tools -(package! eslintd-fix :pin "0c431141be") (package! js2-refactor :pin "d4c40b5fc8") (package! npm-mode :pin "3ee7c0bad5") (package! add-node-modules-path :pin "f31e69ccb6") From b7836322f6f10ec689cfc5f8e4fe448f8297d8cd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 23:51:38 -0400 Subject: [PATCH 037/229] Refactor tide-mode's lookup handlers The remap bypass is no longer necessary. --- modules/lang/javascript/config.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index cb7f067ee..479116ec7 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -179,9 +179,11 @@ to tide." (setq-default company-backends (delq 'company-tide (default-value 'company-backends)))) (set-company-backend! 'tide-mode 'company-tide) ;; navigation - (set-lookup-handlers! 'tide-mode - :definition '(tide-jump-to-definition :async t) - :references '(tide-references :async t)) + (set-lookup-handlers! 'tide-mode :async t + :definition #'tide-jump-to-definition + :references #'tide-references + :documentation #'tide-documentation-at-point) + (set-popup-rule! "^\\*tide-documentation" :quit t) ;; resolve to `doom-project-root' if `tide-project-root' fails (advice-add #'tide-project-root :override #'+javascript-tide-project-root-a) ;; cleanup tsserver when no tide buffers are left @@ -194,8 +196,6 @@ to tide." ;; `tide-mode-hook' is too early, so... (advice-add #'tide-setup :after #'eldoc-mode) - (define-key tide-mode-map [remap +lookup/documentation] #'tide-documentation-at-point) - (map! :localleader :map tide-mode-map "R" #'tide-restart-server From 0acc6c4e98381e8a580a7ac0b93ee84cad203d4e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Apr 2020 23:52:59 -0400 Subject: [PATCH 038/229] Run julia-repl-use-emacsclient after opening a REPL --- modules/lang/julia/autoload.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/julia/autoload.el b/modules/lang/julia/autoload.el index 5d0d16641..d25f60b58 100644 --- a/modules/lang/julia/autoload.el +++ b/modules/lang/julia/autoload.el @@ -10,7 +10,8 @@ "Run an inferior instance of `julia' inside Emacs." (interactive) (if (require 'julia-repl nil t) - (julia-repl) + (prog1 (julia-repl) + (julia-repl-use-emacsclient)) (let ((buffer (get-buffer-create "*Julia*"))) (unless (comint-check-proc "*Julia*") (apply #'make-comint-in-buffer "Julia" "*Julia*" julia-program julia-arguments)) From 5205fde6199391cf493f5d58483bfe6118ca6166 Mon Sep 17 00:00:00 2001 From: Elais Player Date: Thu, 23 Apr 2020 22:00:27 -0600 Subject: [PATCH 039/229] Add useful defaults and bindings to scheme mode (#2947) * Add useful defaults and bindings to scheme mode Scheme mode was pretty bare for a long time now and lacked many of geiser's useful features like `geiser-smart-tab` and starting the geiser repl on entering a file. This turns them on by default for the productive schemer. Besides that the following key bindings were remapped + `SPC m e e` -> `geiser-eval-last-sexp` + `SPC m e d` -> `geiser-eval-definition` + `SPC m e D` -> `geiser-eval-definition-and-go` This brings the geiser keymaps in line with other lisp modes in doom. Another change involves adding macro expand commands under `SPC m m` so schemers can see what evil lurks beneath their commands. Geiser autodoc commands have also been added under `SPC m h` for schemers to read the docs, though they can still use `SPC c k` to do the same thing. * Remove package cookie Its only necessary when not using (use-package!) * Use setq instead of custom * Add `defer t` back * Add defer flag for scheme package If a user went directly to a scheme file after load they would get an error concerning rainbow-delimiters not being loaded. Deferring scheme mode stops that error from happening * Fix typo Co-authored-by: Elais Player --- modules/lang/scheme/config.el | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index 67e5bfd6a..261cfadd8 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -1,16 +1,19 @@ ;;; lang/scheme/config.el -*- lexical-binding: t; -*- -;;;###package scheme -(add-hook 'scheme-mode-hook #'rainbow-delimiters-mode) - +(use-package! scheme + :defer t + :hook ((scheme-mode . rainbow-delimiters-mode) + (scheme-mode . geiser-mode))) (use-package! geiser :defer t :init (setq geiser-active-implementations '(guile chicken mit chibi chez)) + (setq geiser-mode-start-repl-p t) + (setq geiser-smart-tab-p t) (unless (featurep! :lang racket) (push 'racket geiser-active-implementations)) - (after! scheme ; built-in + (after! scheme ; built-in (set-repl-handler! 'scheme-mode '+scheme/open-repl) (set-eval-handler! 'scheme-mode #'geiser-eval-region) (set-lookup-handlers! 'scheme-mode @@ -22,24 +25,34 @@ ( "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil))) (map! :localleader :map scheme-mode-map - "'" #'geiser-mode-switch-to-repl - "s" #'geiser-set-scheme + "'" #'geiser-mode-switch-to-repl + "\"" #'geiser-connect + "[" #'geiser-squarify + "\\" #'geiser-insert-lambda + "s" #'geiser-set-scheme (:prefix ("e" . "eval") "b" #'geiser-eval-buffer "B" #'geiser-eval-buffer-and-go - "e" #'geiser-eval-definition - "E" #'geiser-eval-definition-and-go + "e" #'geiser-eval-last-sexp + "d" #'geiser-eval-definition + "D" #'geiser-eval-definition-and-go "r" #'geiser-eval-region "R" #'geiser-eval-region-and-go) (:prefix ("h" . "help") - "d" 'geiser-autodoc) - ;; TODO add more help keybindings - + "d" #'geiser-autodoc + "<" #'geiser-xref-callers + ">" #'geiser-xref-callees + "i" #'geiser-doc-look-up-manual) + (:prefix ("m" . "macro") + "r" #'geiser-expand-region + "d" #'geiser-expand-definition + "e" #'geiser-expand-last-sexp) (:prefix ("r" . "repl") "b" #'geiser-switch-to-repl "q" #'geiser-repl-exit + "l" #'geiser-load-current-buffer "r" #'geiser-restart-repl "R" #'geiser-reload "c" #'geiser-repl-clear-buffer))) From 68c6225115062972d7e26679a3718f11db81f41e Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 24 Apr 2020 12:14:00 +0800 Subject: [PATCH 040/229] yaml: hook -> mode --- modules/lang/yaml/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/yaml/config.el b/modules/lang/yaml/config.el index 282b4ed7a..f9f081b57 100644 --- a/modules/lang/yaml/config.el +++ b/modules/lang/yaml/config.el @@ -1,7 +1,7 @@ ;;; lang/yaml/config.el -*- lexical-binding: t; -*- (use-package! yaml-mode - :hook "Procfile\\'" + :mode "Procfile\\'" :init (when (featurep! +lsp) (add-hook 'yaml-mode-local-vars-hook #'lsp!)) From 74d05552c1302614b7efb967166fb193d7c67548 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 00:33:54 -0400 Subject: [PATCH 041/229] Refactor scheme module --- modules/lang/scheme/config.el | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index 261cfadd8..2c2ce36a4 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -1,20 +1,19 @@ ;;; lang/scheme/config.el -*- lexical-binding: t; -*- (use-package! scheme - :defer t - :hook ((scheme-mode . rainbow-delimiters-mode) - (scheme-mode . geiser-mode))) + :hook (scheme-mode . rainbow-delimiters-mode)) + (use-package! geiser - :defer t + :hook (scheme-mode . geiser-mode) :init - (setq geiser-active-implementations '(guile chicken mit chibi chez)) - (setq geiser-mode-start-repl-p t) - (setq geiser-smart-tab-p t) + (setq geiser-active-implementations '(guile chicken mit chibi chez) + geiser-mode-start-repl-p t + geiser-smart-tab-p t) (unless (featurep! :lang racket) (push 'racket geiser-active-implementations)) (after! scheme ; built-in - (set-repl-handler! 'scheme-mode '+scheme/open-repl) + (set-repl-handler! 'scheme-mode #'+scheme/open-repl) (set-eval-handler! 'scheme-mode #'geiser-eval-region) (set-lookup-handlers! 'scheme-mode :definition #'geiser-edit-symbol-at-point @@ -30,7 +29,6 @@ "[" #'geiser-squarify "\\" #'geiser-insert-lambda "s" #'geiser-set-scheme - (:prefix ("e" . "eval") "b" #'geiser-eval-buffer "B" #'geiser-eval-buffer-and-go @@ -39,7 +37,6 @@ "D" #'geiser-eval-definition-and-go "r" #'geiser-eval-region "R" #'geiser-eval-region-and-go) - (:prefix ("h" . "help") "d" #'geiser-autodoc "<" #'geiser-xref-callers From abc201ae06c9af4c5914e5892e615687e15c3200 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 00:34:28 -0400 Subject: [PATCH 042/229] Improve indent logic in scheme-mode Better indentation for property lists and functions starting with 'define'. --- modules/lang/scheme/autoload.el | 45 +++++++++++++++++++++++++++++++++ modules/lang/scheme/config.el | 3 ++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/modules/lang/scheme/autoload.el b/modules/lang/scheme/autoload.el index 91729cb0b..464129d81 100644 --- a/modules/lang/scheme/autoload.el +++ b/modules/lang/scheme/autoload.el @@ -1,5 +1,50 @@ ;;; lang/scheme/autoload.el -*- lexical-binding: t; -*- +(defvar calculate-lisp-indent-last-sexp) + +;; Adapted from https://github.com/alezost/emacs-config/blob/master/utils/al-scheme.el#L76-L123 +;;;###autoload +(defun +scheme-scheme-indent-function-a (indent-point state) + "Advice to replace `scheme-indent-function'. + +This function is the same as `scheme-indent-function' except it indents property +lists properly and names starting with 'default'." + (let ((normal-indent (current-column))) + (goto-char (1+ (elt state 1))) + (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) + (if (and (elt state 2) + ;; NOTE looking-at -> looking-at-p + (not (looking-at-p "\\sw\\|\\s_"))) + (unless (> (save-excursion (forward-line 1) (point)) + calculate-lisp-indent-last-sexp) + (goto-char calculate-lisp-indent-last-sexp) + (beginning-of-line) + (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)) + (backward-prefix-chars) + (current-column) + (let* ((function (buffer-substring + (point) (progn (forward-sexp 1) (point)))) + (method (or (get (intern-soft function) 'scheme-indent-function) + (get (intern-soft function) 'scheme-indent-hook)))) + (cond ((or (eq method 'defun) + (and (null method) + (> (length function) 3) + ;; NOTE string-match -> string-match-p + ;; NOTE The original regexp is "\\`def" but it will mess + ;; indentation with such names as 'default-...'. + (string-match-p "\\`define" function))) + (lisp-indent-defform state indent-point)) + ;; NOTE Added this clause to handle alignment of keyword symbols + ((and (null method) + (> (length function) 1) + (string-match-p "\\`:" function)) + (let ((lisp-body-indent 1)) + (lisp-indent-defform state indent-point))) + ((integerp method) + (lisp-indent-specform method state indent-point normal-indent)) + (method + (funcall method state indent-point normal-indent))))))) + ;;;###autoload (defun +scheme/open-repl (&optional arg) "Open the Scheme REPL." diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index 2c2ce36a4..995868f96 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -1,7 +1,8 @@ ;;; lang/scheme/config.el -*- lexical-binding: t; -*- (use-package! scheme - :hook (scheme-mode . rainbow-delimiters-mode)) + :hook (scheme-mode . rainbow-delimiters-mode) + :config (advice-add #'scheme-indent-function :override #'+scheme-scheme-indent-function-a)) (use-package! geiser From a308f1a914412a9494d582d0d6915d40f9c4cbea Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:01:13 -0400 Subject: [PATCH 043/229] Bind SPC m l t -> org-toggle-link-display --- modules/lang/org/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 15aa2c126..17c031a68 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -657,12 +657,13 @@ between the two." "x" #'org-capture-goto-last-stored) (:prefix ("l" . "links") "c" #'org-cliplink + "d" #'+org/remove-link + "i" #'org-id-store-link "l" #'org-insert-link "L" #'org-insert-all-links "s" #'org-store-link "S" #'org-insert-last-stored-link - "i" #'org-id-store-link - "d" #'+org/remove-link) + "t" #'org-toggle-link-display) (:prefix ("r" . "refile") "." #'+org/refile-to-current-file "c" #'+org/refile-to-running-clock From a7b31eab2176245a5d38c010a3f3181f32d76bff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:02:53 -0400 Subject: [PATCH 044/229] Add org table keybinds under SPC m b --- modules/lang/org/config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 17c031a68..96716a831 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -623,9 +623,16 @@ between the two." (:prefix ("b" . "tables") "-" #'org-table-insert-hline "a" #'org-table-align + "b" #'org-table-blank-field "c" #'org-table-create-or-convert-from-region + "dc" #'org-table-delete-column + "dr" #'org-table-kill-row "e" #'org-table-edit-field + "f" #'org-table-edit-formulas "h" #'org-table-field-info + "s" #'org-table-sort-lines + "r" #'org-table-recalculate + "R" #'org-table-recalculate-buffer-tables (:when (featurep! +gnuplot) "p" #'org-plot/gnuplot)) (:prefix ("c" . "clock") From 42fd3d0cb65ce4caf934afced1ff30fd9b583f96 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:05:35 -0400 Subject: [PATCH 045/229] Move org deadline/schedule keys under SPC m d --- modules/lang/org/config.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 96716a831..970e11a60 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -590,7 +590,6 @@ between the two." "." #'helm-org-in-buffer-headings "/" #'helm-org-agenda-files-headings) "A" #'org-archive-subtree - "d" #'org-deadline "e" #'org-export-dispatch "f" #'org-footnote-new "h" #'org-toggle-heading @@ -600,7 +599,6 @@ between the two." "o" #'org-set-property "p" #'org-priority "q" #'org-set-tags-command - "s" #'org-schedule "t" #'org-todo "T" #'org-todo-list (:prefix ("a" . "attachments") @@ -648,6 +646,11 @@ between the two." "x" #'org-clock-cancel "=" #'org-clock-timestamps-up "-" #'org-clock-timestamps-down) + (:prefix ("d" . "date/deadline") + "d" #'org-deadline + "s" #'org-schedule + "t" #'org-time-stamp + "T" #'org-time-stamp-inactive) (:prefix ("g" . "goto") "g" #'org-goto (:when (featurep! :completion ivy) From b40d85e9b2e5feefa58aa3361c1ef6be5854289d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:06:41 -0400 Subject: [PATCH 046/229] Make SPC m c (clock) keybinds mnemonic + more clock keybinds --- modules/lang/org/config.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 970e11a60..80a5e4891 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -634,16 +634,18 @@ between the two." (:when (featurep! +gnuplot) "p" #'org-plot/gnuplot)) (:prefix ("c" . "clock") - "c" #'org-clock-in - "C" #'org-clock-out + "c" #'org-clock-cancel "d" #'org-clock-mark-default-task "e" #'org-clock-modify-effort-estimate "E" #'org-set-effort - "l" #'org-clock-in-last "g" #'org-clock-goto "G" (λ! (org-clock-goto 'select)) - "r" #'org-clock-report - "x" #'org-clock-cancel + "i" #'org-clock-in + "I" #'org-clock-in-last + "o" #'org-clock-out + "r" #'org-resolve-clocks + "R" #'org-clock-report + "t" #'org-evaluate-time-range "=" #'org-clock-timestamps-up "-" #'org-clock-timestamps-down) (:prefix ("d" . "date/deadline") From e8cd7b540485d34a257a1dae8fea425613c0debb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:08:09 -0400 Subject: [PATCH 047/229] Add SPC m {#,*,+} org keybinds --- modules/lang/org/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 80a5e4891..2a3a2b282 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -580,7 +580,10 @@ between the two." [remap doom/forward-to-last-non-comment-or-eol] #'org-end-of-line :localleader + "#" #'org-update-statistics-cookies "'" #'org-edit-special + "*" #'org-ctrl-c-star + "+" #'org-ctrl-c-minus "," #'org-switchb "." #'org-goto (:when (featurep! :completion ivy) From 38f957557ae29224ee91ba393e3b571a70ef1e2d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:32:52 -0400 Subject: [PATCH 048/229] Remove def-package macros They've been deprecated for some time now. --- core/core-modules.el | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index c0125b8dd..372872c5f 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -538,18 +538,5 @@ CATEGORY and MODULE can be omitted When this macro is used from inside a module (memq category (doom-module-get (car module) (cdr module) :flags))))) t)) -;; DEPRECATED -(defmacro def-package! (&rest args) - "Do not use this macro. Use `use-package!' instead." - (warn "`def-package!' is deprecated and was renamed to `use-package!'") - `(use-package! ,@args)) -(make-obsolete 'def-package! 'use-package! "2.0.9") - -(defmacro def-package-hook! (&rest args) - "Do not use this macro. Use `use-package!' instead." - (warn "`def-package-hook!' is deprecated and was renamed to `use-package-hook!'") - `(use-package-hook! ,@args)) -(make-obsolete 'def-package-hook! 'use-package-hook! "2.0.9") - (provide 'core-modules) ;;; core-modules.el ends here From c51b2d42ad3e4e839ffa9c27b642edbd8ded3d5e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:33:24 -0400 Subject: [PATCH 049/229] Remove require! macro This was meant for unit tests, which is where it will be moved to. --- core/core-modules.el | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index 372872c5f..f3c22fb71 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -481,39 +481,6 @@ WARNINGS: (lambda () ,@body) 'append))) -(defmacro require! (category module &rest flags) - "Loads the CATEGORY MODULE module with FLAGS. - -CATEGORY is a keyword, MODULE is a symbol and FLAGS are symbols. - - (require! :lang php +lsp) - -This is for testing and internal use. This is not the correct way to enable a -module." - `(let ((doom-modules (or ,doom-modules (doom-modules))) - (module-path (doom-module-locate-path ,category ',module))) - (doom-module-set - ,category ',module - (let ((plist (doom-module-get ,category ',module))) - ,(when flags - `(plist-put plist :flags `,flags)) - (unless (plist-member plist :path) - (plist-put plist :path ,(doom-module-locate-path category module))) - plist)) - (if (directory-name-p module-path) - (condition-case-unless-debug ex - (let ((doom--current-module ',(cons category module)) - (doom--current-flags ',flags)) - (load! "init" module-path :noerror) - (load! "config" module-path :noerror)) - ('error - (lwarn 'doom-modules :error - "%s in '%s %s' -> %s" - (car ex) ,category ',module - (error-message-string ex)))) - (warn 'doom-modules :warning "Couldn't find module '%s %s'" - ,category ',module)))) - (defmacro featurep! (category &optional module flag) "Returns t if CATEGORY MODULE is enabled. From 309e71eea7063baee1a45f7bfb23fae4a9174db4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:36:44 -0400 Subject: [PATCH 050/229] term/vterm: mention vterm-module-cmake-args in readme --- modules/term/vterm/README.org | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/term/vterm/README.org b/modules/term/vterm/README.org index 2eab1af61..019fc5882 100644 --- a/modules/term/vterm/README.org +++ b/modules/term/vterm/README.org @@ -88,6 +88,13 @@ There are several ways to manually install the module: 1. You can use =M-x vterm-module-compile= to let emacs automatically compile and install the module. + Modify ~vterm-module-cmake-args~ to pass arguments to the cmake build script. + e.g. To use a local build of libvterm instead of the included one. + + #+BEGIN_SRC elisp + (setq vterm-module-cmake-args "-DUSE_SYSTEM_LIBVTERM=yes") + #+END_SRC + *WARNING*: Emacs will hang during the compilation. It may take a while. 2. You can compile and install the module yourself. Go to the vterm installation From f8693d0f8c0833a576768f41bb1df5b13bf90027 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 04:07:57 -0400 Subject: [PATCH 051/229] Load snippets *after* yasnippet config in daemon --- modules/editor/snippets/config.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/editor/snippets/config.el b/modules/editor/snippets/config.el index 2a337412f..71218a728 100644 --- a/modules/editor/snippets/config.el +++ b/modules/editor/snippets/config.el @@ -20,9 +20,7 @@ ;; Remove default ~/.emacs.d/snippets (defvar yas-snippet-dirs nil) - (if (daemonp) - ;; If in a daemon session, front-load this expensive work: - (after! yasnippet (yas-reload-all)) + (unless (daemonp) ;; Ensure `yas-reload-all' is called as late as possible. Other modules ;; could have additional configuration for yasnippet. For example, ;; file-templates. @@ -89,7 +87,10 @@ ;; Replace commands with superior alternatives :map yas-minor-mode-map [remap yas-new-snippet] #'+snippets/new - [remap yas-visit-snippet-file] #'+snippets/edit)) + [remap yas-visit-snippet-file] #'+snippets/edit) + + ;; If in a daemon session, front-load this expensive work: + (if (daemonp) (yas-reload-all))) (use-package! auto-yasnippet From 2389332b90235b9ea2d76159c3cccc8877e31b24 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 05:01:27 -0400 Subject: [PATCH 052/229] Fix #2963: ripgrep backend error for counsel-file-jump --- modules/completion/ivy/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 8688311b6..d0693cbea 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -262,7 +262,10 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (cond ((executable-find doom-projectile-fd-binary) (cons doom-projectile-fd-binary (list "-t" "f" "-E" ".git"))) ((executable-find "rg") - (split-string (format counsel-rg-base-command "--files --no-messages") " " t)) + (append (list "rg" "-0" "--files" "--color=never" "--hidden" "--no-messages") + (cl-loop for dir in projectile-globally-ignored-directories + collect (format "--glob '!%s'" dir)) + (if IS-WINDOWS (list "--path-separator /")))) ((cons find-program args))) (unless (listp args) (user-error "`counsel-file-jump-args' is a list now, please customize accordingly.")) From 9fe35c5fa471df997b8546c824bac497c4481f86 Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Wed, 22 Apr 2020 23:38:07 +0200 Subject: [PATCH 053/229] mu4e: Adjust config to mu4e 1.4 mu4e 1.4 brings quite a few changes, including the deprecation of previously used variables. These are now guarded by a version comparison. org-mu4e is not needed for linking anymore, org-mu4e-link-query-in-headers-mode was renamed. It's new version defaults to nil and is therefore not set anymore -- I am not sure if the default was changed or setting it was not strictly needed previously. --- modules/email/mu4e/autoload/email.el | 7 ++++--- modules/email/mu4e/config.el | 13 ++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index 27d9a10db..f413207df 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -6,7 +6,7 @@ list of cons cells (VARIABLE . VALUE) -- you may want to modify: + `user-full-name' (this or the global `user-full-name' is required) - + `user-mail-address' (required) + + `user-mail-address' (required in mu4e < 1.4) + `smtpmail-smtp-user' (required for sending mail from Emacs) OPTIONAL: @@ -19,8 +19,9 @@ OPTIONAL: DEFAULT-P is a boolean. If non-nil, it marks that email account as the default/fallback account." (after! mu4e - (when-let (address (cdr (assq 'user-mail-address letvars))) - (add-to-list 'mu4e-user-mail-address-list address)) + (when (version< mu4e-mu-version "1.4") + (when-let (address (cdr (assq 'user-mail-address letvars))) + (add-to-list 'mu4e-user-mail-address-list address))) (setq mu4e-contexts (cl-loop for context in mu4e-contexts unless (string= (mu4e-context-name context) label) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 3bdb86efa..b61d1af6b 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -14,9 +14,11 @@ :commands mu4e mu4e-compose-new :init (provide 'html2text) ; disable obsolete package - (setq mu4e-maildir "~/.mail" - mu4e-attachment-dir "~/.mail/.attachments" - mu4e-user-mail-address-list nil) + (require 'mu4e-meta) + (when (version< mu4e-mu-version "1.4") + (setq mu4e-maildir "~/.mail" + mu4e-user-mail-address-list nil)) + (setq mu4e-attachment-dir "~/.mail/.attachments") :config (pcase +mu4e-backend (`mbsync @@ -104,8 +106,9 @@ (use-package! org-mu4e :hook (mu4e-compose-mode . org-mu4e-compose-org-mode) :config - (setq org-mu4e-link-query-in-headers-mode nil - org-mu4e-convert-to-html t) + (setq org-mu4e-convert-to-html t) + (when (version< mu4e-mu-version "1.4") + (setq org-mu4e-link-query-in-headers-mode nil)) ;; Only render to html once. If the first send fails for whatever reason, ;; org-mu4e would do so each time you try again. From 842283ec10bb72e0a08f06d02a0dd3c971962a8b Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Fri, 24 Apr 2020 12:09:38 +0200 Subject: [PATCH 054/229] Update mu4e README, add mbsync config section --- modules/email/mu4e/README.org | 55 ++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/modules/email/mu4e/README.org b/modules/email/mu4e/README.org index 9f4a95172..0001c53c2 100644 --- a/modules/email/mu4e/README.org +++ b/modules/email/mu4e/README.org @@ -12,11 +12,12 @@ - [[#arch-linux][Arch Linux]] - [[#nixos][NixOS]] - [[#opensuse][openSUSE]] - - [[Debian/Ubuntu]] + - [[#debianubuntu][Debian/Ubuntu]] - [[#features][Features]] - [[#configuration][Configuration]] - [[#offlineimap][offlineimap]] - [[#mbsync][mbsync]] + - [[#mu-and-mu4e][mu and mu4e]] - [[#troubleshooting][Troubleshooting]] - [[#no-such-file-or-directory-mu4e][=No such file or directory, mu4e=]] - [[#void-function-org-time-add-error-on-gentoo][~(void-function org-time-add)~ error on Gentoo]] @@ -105,20 +106,53 @@ sudo apt-get install maildir-utils # mu * Configuration ** offlineimap -This module uses =mbsync= by default. To change this, change ~+mu4e-backend~: +This module uses =mbsync= by default. To use =offlineimap=, change ~+mu4e-backend~: #+BEGIN_SRC emacs-lisp (setq +mu4e-backend 'offlineimap) #+END_SRC -Then you must set up offlineimap and index your mail: +Next, you need to write a configuration file for =offlineimap=. Mine can be found +[[https://github.com/hlissner/dotfiles/tree/master/shell/mu][in my dotfiles repository]]. It is configured to download mail to ~\~/.mail~. I +use [[https://www.passwordstore.org/][unix pass]] to securely store my login credentials. You can find a *very* +detailed configuration [[https://github.com/OfflineIMAP/offlineimap/blob/master/offlineimap.conf][here]]. -1. Write a ~\~/.offlineimaprc~. Mine can be found [[https://github.com/hlissner/dotfiles/tree/master/shell/mu][in my dotfiles repository]]. It - is configured to download mail to ~\~/.mail~. I use [[https://www.passwordstore.org/][unix pass]] to securely - store my login credentials. You can find a *very* detailed configuration - [[https://github.com/OfflineIMAP/offlineimap/blob/master/offlineimap.conf][here]]. -2. Download your email: ~offlineimap -o~ (may take a while) -3. Index it with mu: ~mu index --maildir ~/.mail~ +Next you can download your email with ~offlineimap -o~. This may take a while, +especially if you have thousands of mails. + +You can now proceed with the [[*mu and mu4e][mu and mu4e]] section. + +** mbsync +The steps needed to set up =mu4e= with =mbsync= are very similar to the ones for +[[*offlineimap][offlineimap]]. + +Start with writing a ~\~/.mbsyncrc~. An example for GMAIL can be found on +[[http://pragmaticemacs.com/emacs/migrating-from-offlineimap-to-mbsync-for-mu4e/][pragmaticemacs.com]]. A non-GMAIL example is available as a gist [[https://gist.github.com/agraul/60977cc497c3aec44e10591f94f49ef0][here]]. The [[http://isync.sourceforge.net/mbsync.html][manual +page]] contains all needed information to set up your own. + +Next you can download your email with ~mbsync --all~. This may take a while, but +should be quicker than =offlineimap= ;). + +You can now proceed with the [[*mu and mu4e][mu and mu4e]] section. + +** mu and mu4e +You should have your email downloaded already. If you have not, you need to set +=offlineimap= or =mbsync= up before you proceed. + +Before you can use =mu4e= or the cli program =mu=, you need to index your email +initially. How to do that differs a little depending on the version of =mu= you +use. You can check your version with ~mu --version~. + +For =mu= *>=1.4* you need to run two commands: +#+BEGIN_SRC sh +mu init --maildir ~/.mail --my-address email@example.com +mu index +#+END_SRC + +=mu= *<1.4* only requires one command: +#+BEGIN_SRC sh +mu index --maildir ~/.mail +#+END_SRC Then configure Emacs to use your email address: @@ -130,12 +164,11 @@ Then configure Emacs to use your email address: (mu4e-trash-folder . "/Lissner.net/Trash") (mu4e-refile-folder . "/Lissner.net/All Mail") (smtpmail-smtp-user . "henrik@lissner.net") - (user-mail-address . "henrik@lissner.net") + (user-mail-address . "henrik@lissner.net") ;; only needed for mu < 1.4 (mu4e-compose-signature . "---\nHenrik Lissner")) t) #+END_SRC -** TODO mbsync * Troubleshooting ** =No such file or directory, mu4e= You will get =No such file or directory, mu4e= errors if you don't run ~doom From ecdeb489f81f91909a43dd86e47779fcbbc86f46 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 15:12:33 -0400 Subject: [PATCH 055/229] Update {ivy,helm}-xref for Emacs 27 More variables to set! --- modules/tools/lookup/config.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index cd78596b3..a186ed10c 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -136,12 +136,17 @@ Dictionary.app behind the scenes to get definitions.") (use-package! ivy-xref :when (featurep! :completion ivy) :config - (setq xref-show-xrefs-function #'ivy-xref-show-xrefs) - (set-popup-rule! "^\\*xref\\*$" :ignore t)) + (set-popup-rule! "^\\*xref\\*$" :ignore t) + ;; xref initialization is different in Emacs 27 - there are two different + ;; variables which can be set rather than just one + (when EMACS27+ + (setq xref-show-definitions-function #'ivy-xref-show-defs)) + ;; Necessary in Emacs <27. In Emacs 27 it will affect all xref-based + ;; commands other than xref-find-definitions too (eg project-find-regexp) + (setq xref-show-xrefs-function #'ivy-xref-show-xrefs)) (use-package! helm-xref - :when (featurep! :completion helm) - :config (setq xref-show-xrefs-function (if EMACS27+ #'helm-xref-show-xrefs-27 #'helm-xref-show-xrefs)))) + :when (featurep! :completion helm))) ;; From 6bcd1063e6dfe6a9fbd2f35f5cdcf49acd9fb555 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 15:54:53 -0400 Subject: [PATCH 056/229] org-roam-buffer-no-delete-other-windows = t Make org-roam buffer sticky. --- modules/lang/org/contrib/roam.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index ef1fb7761..cdc4b841e 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -36,6 +36,7 @@ (setq org-roam-directory (expand-file-name (or org-roam-directory "") org-directory) org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU + org-roam-buffer-no-delete-other-windows t ; make org-roam buffer sticky org-roam-completion-system (cond ((featurep! :completion helm) 'helm) ((featurep! :completion ivy) 'ivy) From 169821b9eb7f715c4f06c7685ff21aae9287e1d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 15:56:39 -0400 Subject: [PATCH 057/229] Refactor hide-mode-line in org-roam buffer --- modules/lang/org/contrib/roam.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index cdc4b841e..a82594dfb 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -46,12 +46,9 @@ (or (featurep! :completion helm +fuzzy) (featurep! :completion ivy +fuzzy))) - ;; HACK Hide the mode line in the org-roam buffer, since it serves no purpose. - ;; This makes it easier to distinguish among other org buffers. - (defadvice! +org--hide-mode-line-a (&rest _) - :after #'org-roam-buffer--get-create - (with-current-buffer org-roam-buffer - (hide-mode-line-mode +1)))) + ;; Hide the mode line in the org-roam buffer, since it serves no purpose. This + ;; makes it easier to distinguish among other org buffers. + (add-hook 'org-roam-buffer-prepare-hook #'hide-mode-line-mode)) ;; Since the org module lazy loads org-protocol (waits until an org URL is From 635d070e9432b135d4f78448e5702cbce43991a5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 16:03:46 -0400 Subject: [PATCH 058/229] Open org-roam-buffer after org-roam-find-file Adds +org-roam-open-buffer-on-find-file option. --- modules/lang/org/contrib/roam.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index a82594dfb..72db4d5f8 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -1,6 +1,13 @@ ;;; lang/org/contrib/roam.el -*- lexical-binding: t; -*- ;;;###if (featurep! +roam) +(defvar +org-roam-open-buffer-on-find-file t + "If non-nil, open the org-roam buffer when opening an org roam file.") + + +;; +;;; Packages + (use-package! org-roam :hook (org-load . org-roam-mode) :hook (org-roam-backlinks-mode . turn-on-visual-line-mode) @@ -46,6 +53,18 @@ (or (featurep! :completion helm +fuzzy) (featurep! :completion ivy +fuzzy))) + ;; Normally, the org-roam buffer doesn't open until you explicitly call + ;; `org-roam'. If `+org-roam-open-buffer-on-find-file' is non-nil, the + ;; org-roam buffer will be opened for you when you use `org-roam-find-file' + ;; (but not `find-file', to limit the scope of this behavior). + (add-hook! 'find-file-hook + (defun +org-roam-open-buffer-maybe-h () + (and +org-roam-open-buffer-on-find-file + (memq 'org-roam-buffer--update-maybe post-command-hook) + (not (eq 'visible (org-roam-buffer--visibility))) + (with-current-buffer (window-buffer) + (org-roam-buffer--get-create))))) + ;; Hide the mode line in the org-roam buffer, since it serves no purpose. This ;; makes it easier to distinguish among other org buffers. (add-hook 'org-roam-buffer-prepare-hook #'hide-mode-line-mode)) From 71e23fb2506c9d82ee4c82b1ed006f4800467595 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 18:47:10 -0400 Subject: [PATCH 059/229] Refactor how solaire-mode is activated Otherwise we are swapping bg faces even if the user removes solaire-global-mode from doom-load-theme-hook. --- modules/ui/doom/config.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 2c62ec2db..656f96fbc 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -24,14 +24,7 @@ (use-package! solaire-mode :when (or (daemonp) (display-graphic-p)) - :defer t - :init - (add-hook! 'doom-load-theme-hook :append - (defun +doom-solaire-swap-bg-faces-maybe-h () - (when (string-prefix-p "doom-" (symbol-name doom-theme)) - (require 'solaire-mode) - (solaire-mode-swap-bg))) - #'solaire-global-mode) + :hook (doom-load-theme . solaire-global-mode) :config (when (daemonp) (add-hook! 'doom-switch-frame-hook @@ -40,6 +33,12 @@ (solaire-global-mode +1) (solaire-global-mode -1))))) + (add-hook! 'solaire-global-mode-hook + (defun +doom-solaire-swap-bg-faces-maybe-h () + (and solaire-global-mode + (string-prefix-p "doom-" (symbol-name doom-theme)) + (solaire-mode-swap-bg)))) + ;; org-capture takes an org buffer and narrows it. The result is erroneously ;; considered an unreal buffer, so solaire-mode must be restored. (add-hook 'org-capture-mode-hook #'turn-on-solaire-mode) From 2c0935cb6204efe2e3e252fc96389e208704a249 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 18:57:18 -0400 Subject: [PATCH 060/229] Feature detect set-face-extend In case there are folks out there using versions of Emacs 27 before :extend was introduced. --- modules/ui/nav-flash/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/nav-flash/config.el b/modules/ui/nav-flash/config.el index 862be30d2..5bfdd2747 100644 --- a/modules/ui/nav-flash/config.el +++ b/modules/ui/nav-flash/config.el @@ -37,4 +37,5 @@ (advice-add #'what-cursor-position :after #'+nav-flash-blink-cursor-a) :config - (if EMACS27+ (set-face-extend 'nav-flash-face t))) + (when (fboundp 'set-face-extend) + (set-face-extend 'nav-flash-face t))) From 6159068b4d9917468880cb840e1e0d6568be271c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 20:41:56 -0400 Subject: [PATCH 061/229] Rewrite custom org link types This should fix a few issues with links (like org-download links) resolving to the incorrect org-directory or org-id-attach-dir (because it's resolved too early). I've also simplified and refactored the API to make it easier to grok. --- modules/lang/org/autoload/org-link.el | 64 +++++++++++++++++---------- modules/lang/org/config.el | 14 +++--- modules/lang/org/contrib/dragndrop.el | 12 ++--- 3 files changed, 54 insertions(+), 36 deletions(-) diff --git a/modules/lang/org/autoload/org-link.el b/modules/lang/org/autoload/org-link.el index bc4317183..dd887a5a8 100644 --- a/modules/lang/org/autoload/org-link.el +++ b/modules/lang/org/autoload/org-link.el @@ -1,43 +1,59 @@ ;;; lang/org/autoload/org-link.el -*- lexical-binding: t; -*- -(defun +org--relpath (path root) +(defun +org--relative-path (path root) (if (and buffer-file-name (file-in-directory-p buffer-file-name root)) (file-relative-name path) path)) -;;;###autoload -(defun +org-def-link (key dir) - (org-link-set-parameters - key - :complete (lambda () (+org--relpath (+org-link-read-file key dir) dir)) - :follow (lambda (link) (find-file (expand-file-name link dir))) - :face (lambda (link) - (if (file-exists-p (expand-file-name link dir)) - 'org-link - 'error)))) +(defun +org--read-link-path (key dir &optional fn) + (let ((file (funcall (or fn #'read-file-name) (format "%s: " (capitalize key)) dir))) + (format "%s:%s" key (file-relative-name file dir)))) ;;;###autoload -(defun +org-link-read-file (key dir) - (let ((file (read-file-name (format "%s: " (capitalize key)) dir))) - (format "%s:%s" - key - (file-relative-name file dir)))) +(defun +org-define-basic-link (key dir-var &rest plist) + "Define a link with some basic completion & fontification. + +KEY is the name of the link type. DIR-VAR is the directory variable to resolve +links relative to. PLIST is passed to `org-link-set-parameters' verbatim. + +Links defined with this will be rendered in the `error' face if the file doesn't +exist, and `org-link' otherwise." + (declare (indent 2)) + (let ((requires (plist-get plist :requires))) + (apply #'org-link-set-parameters + key + :complete (lambda () + (if requires (mapc #'require (doom-enlist requires))) + (+org--relative-path (+org--read-link-path key (symbol-value dir-var)) + (symbol-value dir-var))) + :follow (lambda (link) (find-file (expand-file-name link (symbol-value dir-var)))) + :face (lambda (link) + (if (file-exists-p (expand-file-name link (symbol-value dir-var))) + 'org-link + 'error)) + (doom-plist-delete plist :requires)))) + + +;; +;;; Image data functions (for custom inline images) ;;;###autoload -(defun +org-link-read-directory (key dir) - (let ((file (read-directory-name (format "%s: " (capitalize key)) dir))) - (format "%s:%s" - key - (file-relative-name file dir)))) +(defun +org-image-file-data-fn (protocol link _description) + "Intepret LINK as an image file path and return its data." + (when (and (file-exists-p link) + (image-type-from-file-name link)) + (with-temp-buffer + (insert-file-contents-literally link) + (buffer-string)))) ;;;###autoload -(defun +org-inline-data-image (_protocol link _description) +(defun +org-inline-image-data-fn (_protocol link _description) "Interpret LINK as base64-encoded image data." (base64-decode-string link)) ;;;###autoload -(defun +org-image-link (protocol link _description) - "Interpret LINK as base64-encoded image data." +(defun +org-http-image-data-fn (protocol link _description) + "Interpret LINK as an URL to an image file." (when (image-type-from-file-name link) (if-let* ((buf (url-retrieve-synchronously (concat protocol ":" link)))) (with-current-buffer buf diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2a3a2b282..d6e0073e6 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -397,15 +397,15 @@ underlying, modified buffer. This fixes that." '("wolfram" . "https://wolframalpha.com/input/?i=%s") '("doom-repo" . "https://github.com/hlissner/doom-emacs/%s")) - (+org-def-link "org" org-directory) - (+org-def-link "doom" doom-emacs-dir) - (+org-def-link "doom-docs" doom-docs-dir) - (+org-def-link "doom-modules" doom-modules-dir) + (+org-define-basic-link "org" 'org-directory) + (+org-define-basic-link "doom" 'doom-emacs-dir) + (+org-define-basic-link "doom-docs" 'doom-docs-dir) + (+org-define-basic-link "doom-modules" 'doom-modules-dir) ;; Allow inline image previews of http(s)? urls or data uris - (org-link-set-parameters "http" :image-data-fun #'+org-image-link) - (org-link-set-parameters "https" :image-data-fun #'+org-image-link) - (org-link-set-parameters "img" :image-data-fun #'+org-inline-data-image) + (org-link-set-parameters "http" :image-data-fun #'+org-http-image-data-fn) + (org-link-set-parameters "https" :image-data-fun #'+org-http-image-data-fn) + (org-link-set-parameters "img" :image-data-fun #'+org-inline-image-data-fn) ;; Add support for youtube links + previews (require 'org-yt nil t)) diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 28f3229dc..bd57a7042 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -16,12 +16,14 @@ (after! org ;; A shorter link to attachments - (+org-def-link "download" org-attach-id-dir) - (setf (alist-get "download" org-link-abbrev-alist nil nil #'equal) - (abbreviate-file-name org-attach-id-dir))) + (+org-define-basic-link "download" 'org-attach-id-dir + :image-data-fun #'+org-image-file-data-fn + :requires 'org-download)) :config - (setq org-download-image-dir org-attach-id-dir - org-download-link-format "[[download:%s]]\n" + (unless org-download-image-dir + (setq org-download-image-dir (expand-file-name (or org-attach-id-dir "") + org-directory))) + (setq org-download-link-format "[[download:%s]]\n" org-download-method 'attach org-download-heading-lvl nil org-download-timestamp "_%Y%m%d_%H%M%S" From 211519270aed31e78445fb643220c3a563a13f34 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 20:45:21 -0400 Subject: [PATCH 062/229] Resolve org download links relative to org-download-image-dir --- modules/lang/org/contrib/dragndrop.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index bd57a7042..7d5e18ff3 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -16,7 +16,7 @@ (after! org ;; A shorter link to attachments - (+org-define-basic-link "download" 'org-attach-id-dir + (+org-define-basic-link "download" 'org-download-image-dir :image-data-fun #'+org-image-file-data-fn :requires 'org-download)) :config From 903460cd101be896c9744ebcd3955f47f50744f6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 21:22:12 -0400 Subject: [PATCH 063/229] Base org-download links off of org-download-image-dir --- modules/lang/org/contrib/dragndrop.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 7d5e18ff3..a0c2490df 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -56,8 +56,8 @@ an file icon produced by `+org-attach-icon-for')." (if (= org-download-image-org-width 0) "" (format "#+attr_org: :width %dpx\n" org-download-image-org-width)) (format org-download-link-format - (if (file-in-directory-p filename org-attach-id-dir) - (file-relative-name filename org-attach-id-dir) + (if (file-in-directory-p filename org-download-image-dir) + (file-relative-name filename org-download-image-dir) filename)))) (org-display-inline-images)) ((insert From efee551709e2f72e1105312302856bd976f7b813 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 22:00:17 -0400 Subject: [PATCH 064/229] doctor: check for fc-list (fontconfig) Instead of find-font, which the doc doesn't even use. --- core/cli/doctor.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/cli/doctor.el b/core/cli/doctor.el index 5f790ccfa..22e690e2e 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -123,11 +123,8 @@ in." "both is rarely intentional; you should one or the other.")) ;; Check for fonts - (if (not (fboundp 'find-font)) - (progn - (warn! "Warning: unable to detect font") - (explain! "The `find-font' function is missing. This could indicate the incorrect " - "version of Emacs is being used!")) + (if (not (executable-find "fc-list")) + (warn! "Warning: unable to detect fonts because fontconfig isn't installed") ;; all-the-icons fonts (when (and (pcase system-type (`gnu/linux (concat (or (getenv "XDG_DATA_HOME") From ddc7bf782ca4b06253067f6d69058bd368ea5554 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 00:18:30 -0400 Subject: [PATCH 065/229] Activate jit-lock Improves scrolling and buffer performance by deferring font-locking until you're idle. YMMV --- core/core.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/core.el b/core/core.el index 5c93aa91b..f25296992 100644 --- a/core/core.el +++ b/core/core.el @@ -273,6 +273,11 @@ users).") ;; quickly self-correct. (setq fast-but-imprecise-scrolling t) +;; Font locking is the source of much slowness in Emacs. jit-lock-mode tries to +;; defer fontification until the user is idle. This should help... in theory. +(setq jit-lock-defer-time 0 ; only defer while processing input + jit-lock-stealth-time 2) ; fontify the rest of the buffer after a delay + ;; Resizing the Emacs frame can be a terribly expensive part of changing the ;; font. By inhibiting this, we halve startup times, particularly when we use ;; fonts that are larger than the system default (which would resize the frame). From efee633311330d1e061a680a27dda908701cfca3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 00:48:20 -0400 Subject: [PATCH 066/229] Reduce wasteful after! blocks in map! expansion When there are no labels, it produces empty after! forms, which do nothing. --- core/core-keybinds.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 7a698eab2..19b0517c4 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -109,8 +109,8 @@ all hooks after it are ignored.") (general--concat t doom-leader-key ,key) ,desc)))))))) (macroexp-progn - (cons `(after! which-key ,@(nreverse wkforms)) - (nreverse forms))))) + (append (and wkforms `((after! which-key ,@(nreverse wkforms)))) + (nreverse forms))))) (defmacro define-leader-key! (&rest args) "Define keys. From adbe9041cea7ab3d5ff877f22b5ca9dd88480040 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 01:23:55 -0400 Subject: [PATCH 067/229] Fix inline previews for download:* links --- modules/lang/org/autoload/org-link.el | 25 +++++++++++++++++++------ modules/lang/org/contrib/dragndrop.el | 2 +- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/modules/lang/org/autoload/org-link.el b/modules/lang/org/autoload/org-link.el index dd887a5a8..17d8c1517 100644 --- a/modules/lang/org/autoload/org-link.el +++ b/modules/lang/org/autoload/org-link.el @@ -19,16 +19,20 @@ links relative to. PLIST is passed to `org-link-set-parameters' verbatim. Links defined with this will be rendered in the `error' face if the file doesn't exist, and `org-link' otherwise." (declare (indent 2)) - (let ((requires (plist-get plist :requires))) + (let ((requires (plist-get plist :requires)) + (dir-fn (if (functionp dir-var) + dir-var + (lambda () (symbol-value 'dir-var))))) (apply #'org-link-set-parameters key :complete (lambda () (if requires (mapc #'require (doom-enlist requires))) - (+org--relative-path (+org--read-link-path key (symbol-value dir-var)) - (symbol-value dir-var))) - :follow (lambda (link) (find-file (expand-file-name link (symbol-value dir-var)))) + (+org--relative-path (+org--read-link-path key (funcall dir-fn)) + (funcall dir-fn))) + :follow (lambda (link) + (org-link-open-as-file (expand-file-name link (funcall dir-fn)) nil)) :face (lambda (link) - (if (file-exists-p (expand-file-name link (symbol-value dir-var))) + (if (file-exists-p (expand-file-name link (funcall dir-fn))) 'org-link 'error)) (doom-plist-delete plist :requires)))) @@ -40,11 +44,20 @@ exist, and `org-link' otherwise." ;;;###autoload (defun +org-image-file-data-fn (protocol link _description) "Intepret LINK as an image file path and return its data." + (setq + link (expand-file-name + link + (pcase protocol + ("download" (or org-download-image-dir org-attach-id-dir default-directory)) + ("attachment" org-attach-id-dir) + (_ default-directory)))) (when (and (file-exists-p link) (image-type-from-file-name link)) (with-temp-buffer + (set-buffer-multibyte nil) + (setq buffer-file-coding-system 'binary) (insert-file-contents-literally link) - (buffer-string)))) + (buffer-substring-no-properties (point-min) (point-max))))) ;;;###autoload (defun +org-inline-image-data-fn (_protocol link _description) diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index a0c2490df..2611b792f 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -16,7 +16,7 @@ (after! org ;; A shorter link to attachments - (+org-define-basic-link "download" 'org-download-image-dir + (+org-define-basic-link "download" (lambda () (or org-download-image-dir org-attach-id-dir ".")) :image-data-fun #'+org-image-file-data-fn :requires 'org-download)) :config From 8c1525e3d80d6d8a5bafc7abf6a1ec9f423a3703 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 01:27:25 -0400 Subject: [PATCH 068/229] Rewrite org-download/attach systems + Cut down on unnecessary code & advice + Fix 'attach and 'download methods for org-download so that a) their links actually work and b) inline previews of their links show up. + Allow users to only set org-attach-id-dir (which will be mirrored to org-download-image-dir, unless the user has changed it). + Prevent a few edge cases where org-attach-id-dir or org-download-image-dir were blank. --- modules/lang/org/autoload/org-attach.el | 4 +- modules/lang/org/config.el | 14 ++--- modules/lang/org/contrib/dragndrop.el | 82 +++++++++++-------------- 3 files changed, 44 insertions(+), 56 deletions(-) diff --git a/modules/lang/org/autoload/org-attach.el b/modules/lang/org/autoload/org-attach.el index fa41685b2..dbe88739b 100644 --- a/modules/lang/org/autoload/org-attach.el +++ b/modules/lang/org/autoload/org-attach.el @@ -42,7 +42,7 @@ PATH (a string) can be an url, a local file path, or a base64 encoded datauri." (unless (eq major-mode 'org-mode) (user-error "Not in an org buffer")) (require 'org-download) - (condition-case ex + (condition-case-unless-debug e (let ((raw-uri (url-unhex-string path))) (cond ((string-match-p "^data:image/png;base64," path) (org-download-dnd-base64 path nil)) @@ -56,4 +56,4 @@ PATH (a string) can be an url, a local file path, or a base64 encoded datauri." ;; insert the link (org-download-insert-link raw-uri new-path))))) (error - (user-error "Failed to attach file: %s" (error-message-string ex))))) + (user-error "Failed to attach file: %s" (error-message-string e))))) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index d6e0073e6..2674fc9f0 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -367,11 +367,10 @@ underlying, modified buffer. This fixes that." (defun +org-init-attachments-h () "Sets up org's attachment system." ;; Centralized attachments directory - (setq org-attach-id-dir (doom-path org-directory org-attach-id-dir) - ;; Store a link to attachments when they are attached - org-attach-store-link-p t - ;; Inherit attachment properties from parent nodes - org-attach-use-inheritance t) + (unless org-attach-id-dir + (setq org-attach-id-dir (expand-file-name ".attach/" org-directory))) + (setq org-attach-store-link-p t ; store link when attaching files + org-attach-use-inheritance t) ; inherit attachment properties from parent nodes (after! projectile (add-to-list 'projectile-globally-ignored-directories org-attach-id-dir))) @@ -932,9 +931,8 @@ compelling reason, so..." org-capture :preface ;; Change org defaults (should be set before org loads) - (setq org-directory "~/org/" - org-attach-id-dir ".attach/" - org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/") + (defvar org-attach-id-dir nil) ; set later + (setq org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/") org-preview-latex-image-directory (concat doom-cache-dir "org-latex/")) ;; Make most of the default modules opt-in, because I sincerely doubt most diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 2611b792f..8d7b54699 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -21,57 +21,47 @@ :requires 'org-download)) :config (unless org-download-image-dir - (setq org-download-image-dir (expand-file-name (or org-attach-id-dir "") - org-directory))) - (setq org-download-link-format "[[download:%s]]\n" - org-download-method 'attach - org-download-heading-lvl nil + (setq org-download-image-dir org-attach-id-dir)) + (setq org-download-method 'attach org-download-timestamp "_%Y%m%d_%H%M%S" org-download-screenshot-method (cond (IS-MAC "screencapture -i %s") (IS-LINUX (cond ((executable-find "maim") "maim -s %s") ((executable-find "scrot") "scrot -s %s") - ((executable-find "gnome-screenshot") "gnome-screenshot -a -f %s"))))) + ((executable-find "gnome-screenshot") "gnome-screenshot -a -f %s")))) - ;; Handle non-image files a little differently. Images should be inserted - ;; as-is, as image previews. Other files, like pdfs or zips, should be linked - ;; to, with an icon indicating the type of file. - (defadvice! +org--dragndrop-insert-link-a (_link filename) - "Produces and inserts a link to FILENAME into the document. + org-download-heading-lvl nil + org-download-link-format "[[download:%s]]\n" + org-download-annotate-function (lambda (_link) "") + org-download-link-format-function + (lambda (filename) + (if (eq org-download-method 'attach) + (format "[[attachment:%s]]\n" + (org-link-escape + (file-relative-name filename (org-attach-dir)))) + ;; Handle non-image files a little differently. Images should be + ;; inserted as normal with previews. Other files, like pdfs or zips, + ;; should be linked to, with an icon indicating the type of file. + (format (concat (unless (image-type-from-file-name filename) + (concat (+org-attach-icon-for filename) + " ")) + org-download-link-format) + (org-link-escape + (funcall org-download-abbreviate-filename-function filename))))) + org-download-abbreviate-filename-function + (lambda (path) + (if (file-in-directory-p path org-download-image-dir) + (file-relative-name path org-download-image-dir) + path))) -If FILENAME is an image, produce an download:%s path, otherwise use file:%s (with -an file icon produced by `+org-attach-icon-for')." - :override #'org-download-insert-link - (if (looking-back "^[ \t]+" (line-beginning-position)) - (delete-region (match-beginning 0) (match-end 0)) - (newline)) - (cond ((image-type-from-file-name filename) - (insert - (concat - (if (= org-download-image-html-width 0) "" - (format "#+attr_html: :width %dpx\n" org-download-image-html-width)) - (if (= org-download-image-latex-width 0) "" - (format "#+attr_latex: :width %dcm\n" org-download-image-latex-width)) - (if (= org-download-image-org-width 0) "" - (format "#+attr_org: :width %dpx\n" org-download-image-org-width)) - (format org-download-link-format - (if (file-in-directory-p filename org-download-image-dir) - (file-relative-name filename org-download-image-dir) - filename)))) - (org-display-inline-images)) - ((insert - (format "%s [[./%s][%s]] " - (+org-attach-icon-for filename) - (file-relative-name filename (file-name-directory buffer-file-name)) - (file-name-nondirectory (directory-file-name filename))))))) - - (advice-add #'org-download--dir-2 :override #'ignore) - (defadvice! +org--dragndrop-download-fullname-a (path) - "Write PATH relative to current file." - :filter-return #'org-download--fullname - (let ((dir (or (if buffer-file-name (file-name-directory buffer-file-name)) - default-directory))) - (if (file-in-directory-p dir org-attach-id-dir) - (file-relative-name path dir) - path)))) + (defadvice! +org--dragndrop-then-display-inline-images-a (_link filename) + :after #'org-download-insert-link + (when (image-type-from-file-name filename) + (save-excursion + (org-display-inline-images + t t + (progn (org-back-to-heading t) (point)) + (progn (org-end-of-subtree t t) + (when (and (org-at-heading-p) (not (eobp))) (backward-char 1)) + (point))))))) From 2d1a2ed8b39ea6480339430d56bc0d565c678642 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 01:55:54 -0400 Subject: [PATCH 069/229] Fix basic links not returning correct paths A silly typo by a silly goose. --- modules/lang/org/autoload/org-link.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/autoload/org-link.el b/modules/lang/org/autoload/org-link.el index 17d8c1517..59d6c477b 100644 --- a/modules/lang/org/autoload/org-link.el +++ b/modules/lang/org/autoload/org-link.el @@ -22,7 +22,7 @@ exist, and `org-link' otherwise." (let ((requires (plist-get plist :requires)) (dir-fn (if (functionp dir-var) dir-var - (lambda () (symbol-value 'dir-var))))) + (lambda () (symbol-value dir-var))))) (apply #'org-link-set-parameters key :complete (lambda () From 096803e2fe0c018d335f9a646902c8ae8ebd4080 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 02:40:20 -0400 Subject: [PATCH 070/229] Don't trigger redraw on every frame switch --- modules/ui/doom/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 656f96fbc..adbb35714 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -30,8 +30,10 @@ (add-hook! 'doom-switch-frame-hook (defun +doom-disable-solaire-mode-maybe-h () (if (display-graphic-p) - (solaire-global-mode +1) - (solaire-global-mode -1))))) + (unless solaire-global-mode + (solaire-global-mode +1)) + (when solaire-global-mode + (solaire-global-mode -1)))))) (add-hook! 'solaire-global-mode-hook (defun +doom-solaire-swap-bg-faces-maybe-h () From 30dea4bf0c3854f991d02efa73c3d38c5d9a7640 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 02:55:06 -0400 Subject: [PATCH 071/229] Update tools/lookup readme Relevant to #1166 --- modules/tools/lookup/README.org | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/modules/tools/lookup/README.org b/modules/tools/lookup/README.org index b69d6b25e..5c51aeb78 100644 --- a/modules/tools/lookup/README.org +++ b/modules/tools/lookup/README.org @@ -25,13 +25,14 @@ - [[#commands][Commands]] * Description -Integrates with code navigation and documentation tools to help you quickly look -up definitions, references and documentation. +This module adds code navigation and documentation lookup tools to help you +quickly look up definitions, references, documentation, dictionary definitions +or synonyms. + Jump-to-definition and find-references implementations that just work. + Powerful xref integration for languages that support it. -+ Documentation lookup for a variety of online sources (like devdocs.io, - stackoverflow or youtube). ++ Search online providers like devdocs.io, stackoverflow, google, duckduckgo or + youtube (duckduckgo and google have live suggestions). + Integration with Dash.app docsets. + Support for online (and offline) dictionaries and thesauruses. @@ -43,14 +44,27 @@ up definitions, references and documentation. ** Plugins + [[https://github.com/jacktasia/dumb-jump][dumb-jump]] + [[https://github.com/alexmurray/ivy-xref][ivy-xref]] or [[https://github.com/brotzeit/helm-xref][helm-xref]] -+ [[https://github.com/nathankot/counsel-dash][counsel-dash]] or [[https://github.com/areina/helm-dash][helm-dash]] ++ [[https://github.com/tkf/emacs-request][request]] ++ =+docsets= + + [[https://github.com/dash-docs-el/dash-docs][dash-docs]] + + [[https://github.com/nathankot/counsel-dash][counsel-dash]] or [[https://github.com/areina/helm-dash][helm-dash]] ++ =+dictionary= + + if macOS + + [[https://github.com/xuchunyang/osx-dictionary.el][osx-dictionary]]* (on macOS) + + else + + [[https://github.com/abo-abo/define-word][define-word]] + + [[https://github.com/maxchaos/emacs-powerthesaurus][powerthesaurus]] + + =+offline= + + [[https://github.com/gromnitsky/wordnut][wordnut]] + + [[https://github.com/hpdeifel/synosaurus][synosaurus]] * Prerequisites This module has several soft dependencies: + ~ripgrep~ as a last-resort fallback for jump-to-definition/find-references. -+ ~sqlite3~ for Dash docset support. -+ ~wordnet~ for offline dictionary and thesaurus support. ++ ~sqlite3~ for Dash docset support (if you have =+docsets= enabled) ++ ~wordnet~ for offline dictionary and thesaurus support (if you have + =+dictionary +offline= enabled). ** MacOS #+BEGIN_SRC sh From 2fdffb746610390ae16a74a39410507e3a47f48c Mon Sep 17 00:00:00 2001 From: Viktor Astakhov Date: Sat, 25 Apr 2020 16:39:55 +0300 Subject: [PATCH 072/229] Add poetry flag to the documentation --- docs/modules.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules.org b/docs/modules.org index 4a8dc11d4..432792920 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -129,7 +129,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/php/README.org][php]] =+lsp= - TODO + plantuml - TODO + purescript - TODO -+ [[file:../modules/lang/python/README.org][python]] =+lsp +pyenv +conda= - TODO ++ [[file:../modules/lang/python/README.org][python]] =+lsp +pyenv +conda +poetry= - TODO + qt - TODO + racket - TODO + [[file:../modules/lang/rest/README.org][rest]] - TODO From ade60c9265c45239d8866d5683d8c49c7659a9d5 Mon Sep 17 00:00:00 2001 From: Eugene Diachkin Date: Sat, 25 Apr 2020 16:53:06 +0300 Subject: [PATCH 073/229] Fix typo in key bindings --- modules/config/default/+evil-bindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 43a3e3770..33346997a 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -22,7 +22,7 @@ (define-key! :keymaps +default-minibuffer-maps "C-f" #'forward-word "C-b" #'backward-word - "M-f" #'foward-char + "M-f" #'forward-char "M-b" #'backward-char "C-j" #'next-line "C-k" #'previous-line From 77542bcccc3beb04af55b7d7315d86a9580200be Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 14:04:09 -0400 Subject: [PATCH 074/229] Bind C-j/C-k to next/prev history in evil-ex --- modules/config/default/+evil-bindings.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 43a3e3770..468e0dcc5 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -7,7 +7,9 @@ (define-key! evil-ex-completion-map "C-a" #'evil-beginning-of-line "C-b" #'evil-backward-char - "C-f" #'evil-forward-char) + "C-f" #'evil-forward-char + "C-j" #'previous-complete-history-element + "C-k" #'next-complete-history-element) (define-key! :keymaps +default-minibuffer-maps [escape] #'abort-recursive-edit From 6cb1390fac83262b91d0ed624aefabb0ba95608f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 15:40:24 -0400 Subject: [PATCH 075/229] Fix #2968: refactor how org-directory default is set --- modules/config/default/autoload/files.el | 8 ++++-- modules/lang/org/config.el | 35 ++++++++++++++++-------- modules/lang/org/contrib/roam.el | 2 +- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/modules/config/default/autoload/files.el b/modules/config/default/autoload/files.el index 3c90f6d23..e49e8255f 100644 --- a/modules/config/default/autoload/files.el +++ b/modules/config/default/autoload/files.el @@ -27,11 +27,15 @@ ;;;###autoload (defun +default/browse-notes () "Browse files from `org-directory'." - (interactive) (doom-project-browse org-directory)) + (interactive) + (require 'org) + (doom-project-browse org-directory)) ;;;###autoload (defun +default/find-in-notes () "Find a file under `org-directory', recursively." - (interactive) (doom-project-find-file org-directory)) + (interactive) + (require 'org) + (doom-project-find-file org-directory)) ;;;###autoload (defun +default/find-file-under-here () diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2674fc9f0..86fc7beb9 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -65,6 +65,12 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default ;; ;;; `org-load' hooks +(defun +org-init-org-directory-h () + (unless org-directory + (setq org-directory "~/org")) + (setq org-id-locations-file (expand-file-name ".orgids" org-directory))) + + (defun +org-init-agenda-h () (unless org-agenda-files (setq org-agenda-files (list org-directory))) @@ -340,7 +346,7 @@ relative to `org-directory', unless it is an absolute path." (defadvice! +org--prevent-save-prompts-when-refiling-a (&rest _) "Fix #462: when refiling from org-capture, Emacs prompts to kill the underlying, modified buffer. This fixes that." - :after 'org-refile + :after #'org-refile (when (bound-and-true-p org-capture-is-refiling) (org-save-all-org-buffers))) @@ -366,13 +372,15 @@ underlying, modified buffer. This fixes that." (defun +org-init-attachments-h () "Sets up org's attachment system." + (setq org-attach-store-link-p t ; store link after attaching files + org-attach-use-inheritance t) ; inherit properties from parent nodes + ;; Centralized attachments directory - (unless org-attach-id-dir - (setq org-attach-id-dir (expand-file-name ".attach/" org-directory))) - (setq org-attach-store-link-p t ; store link when attaching files - org-attach-use-inheritance t) ; inherit attachment properties from parent nodes - (after! projectile - (add-to-list 'projectile-globally-ignored-directories org-attach-id-dir))) + (after! org-attach + (unless org-attach-id-dir + (setq org-attach-id-dir (expand-file-name ".attach/" org-directory))) + (after! projectile + (add-to-list 'projectile-globally-ignored-directories org-attach-id-dir)))) (defun +org-init-custom-links-h () @@ -457,9 +465,9 @@ underlying, modified buffer. This fixes that." (defun +org-init-hacks-h () "Getting org to behave." - ;; Don't open separate windows + ;; Open file links in current window, rather than new ones (setf (alist-get 'file org-link-frame-setup) #'find-file) - ;; Open directory links in Emacs + ;; Open directory links in dired (add-to-list 'org-file-apps '(directory . emacs)) ;; When you create a sparse tree and `org-indent-mode' is enabled, the @@ -930,8 +938,11 @@ compelling reason, so..." org-list org-pcomplete org-src org-footnote org-macro ob org org-agenda org-capture :preface - ;; Change org defaults (should be set before org loads) - (defvar org-attach-id-dir nil) ; set later + ;; Set these to nil now so we can detect user changes to them later (and fall + ;; back on defaults otherwise) + (defvar org-directory nil) + (defvar org-attach-id-dir nil) + (setq org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/") org-preview-latex-image-directory (concat doom-cache-dir "org-latex/")) @@ -974,6 +985,7 @@ compelling reason, so..." #'+org-unfold-to-2nd-level-or-point-h) (add-hook! 'org-load-hook + #'+org-init-org-directory-h #'+org-init-appearance-h #'+org-init-agenda-h #'+org-init-attachments-h @@ -1007,7 +1019,6 @@ compelling reason, so..." ;; Global ID state means we can have ID links anywhere. This is required for ;; `org-brain', however. (setq org-id-track-globally t - org-id-locations-file (expand-file-name ".orgids" org-directory) org-id-locations-file-relative t) ;; HACK `org-id' doesn't check if `org-id-locations-file' exists or is diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index 72db4d5f8..62641dc6f 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -40,7 +40,7 @@ :desc "Tomorrow" "m" #'org-roam-dailies-tomorrow :desc "Yesterday" "y" #'org-roam-dailies-yesterday)) :config - (setq org-roam-directory (expand-file-name (or org-roam-directory "") + (setq org-roam-directory (expand-file-name (or org-roam-directory "roam") org-directory) org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU org-roam-buffer-no-delete-other-windows t ; make org-roam buffer sticky From e68e68755b8c221a3862273331fe3304d1c62ac3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 15:52:38 -0400 Subject: [PATCH 076/229] Don't auto-open roam buffer in capture popups --- modules/lang/org/contrib/roam.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index 62641dc6f..91e150b0e 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -61,6 +61,7 @@ (defun +org-roam-open-buffer-maybe-h () (and +org-roam-open-buffer-on-find-file (memq 'org-roam-buffer--update-maybe post-command-hook) + (not (window-parameter nil 'window-side)) ; don't proc for popups (not (eq 'visible (org-roam-buffer--visibility))) (with-current-buffer (window-buffer) (org-roam-buffer--get-create))))) From b93e3e41ed44db096df825bca0443b618b153375 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 16:07:20 -0400 Subject: [PATCH 077/229] Fix duplicate files in org-roam db due to symlinks --- modules/lang/org/contrib/roam.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index 91e150b0e..0af9b60b9 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -53,6 +53,16 @@ (or (featurep! :completion helm +fuzzy) (featurep! :completion ivy +fuzzy))) + ;; HACK On first invocation, `org-roam-db-build-cache' builds the cache with a + ;; list of unresolved file paths. If those are symlinks, you will later + ;; end up with duplicate entries in your roam DB (e.g. after + ;; `org-roam-capture'ing to an existing file). + ;; TODO Report/PR this upstream! + (defadvice! +org-roam-resolve-symlinks-a (args) + :filter-args #'org-roam--list-files + (setcar args (file-truename (car args))) + args) + ;; Normally, the org-roam buffer doesn't open until you explicitly call ;; `org-roam'. If `+org-roam-open-buffer-on-find-file' is non-nil, the ;; org-roam buffer will be opened for you when you use `org-roam-find-file' From afe3033627533424322a70ad1750131f4e2f6de8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 16:10:02 -0400 Subject: [PATCH 078/229] Bump :lang org Kungsgeten/org-brain@3630eb8 -> Kungsgeten/org-brain@7ffbf68 bastibe/org-journal@3fdb5b3 -> bastibe/org-journal@8bf06b2 dzop/emacs-jupyter@62ad054 -> dzop/emacs-jupyter@785edbb emacs-straight/org-mode@9994e8e -> emacs-straight/org-mode@14d6f95 fuxialexander/org-pdftools@22d9a36 -> fuxialexander/org-pdftools@8cc15bb jethrokuan/org-roam@6175739 -> jethrokuan/org-roam@963692f kaushalmodi/ox-hugo@b6f4142 -> kaushalmodi/ox-hugo@5106b43 --- modules/lang/org/packages.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 7ef518d73..afca11882 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -27,7 +27,7 @@ :recipe (:host github :repo "emacs-straight/org-mode" :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) - :pin "9994e8ee89") + :pin "14d6f95bec") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) @@ -47,11 +47,11 @@ :recipe (:host github :repo "hlissner/evil-org-mode") :pin "4d44e9bbdc")) (when (featurep! :tools pdf) - (package! org-pdftools :pin "22d9a367ab")) + (package! org-pdftools :pin "8cc15bb801")) (when (featurep! :tools magit) (package! orgit :pin "e147f05577")) (when (featurep! +brain) - (package! org-brain :pin "3630eb88a3")) + (package! org-brain :pin "7ffbf6816a")) (when (featurep! +dragndrop) (package! org-download :pin "46417e2bd3")) (when (featurep! +gnuplot) @@ -60,9 +60,11 @@ (when (featurep! +ipython) ; DEPRECATED (package! ob-ipython :pin "7147455230")) (when (featurep! +jupyter) - (package! jupyter :pin "62ad054001")) + (package! jupyter :pin "785edbbff6")) (when (featurep! +journal) - (package! org-journal :pin "3fdb5b3036")) + (package! org-journal :pin "8bf06b28d6")) +(when (featurep! +noter) + (package! org-noter :pin "9ead81d42d")) (when (featurep! +pomodoro) (package! org-pomodoro :pin "aa07c11318")) (when (featurep! +present) @@ -72,11 +74,9 @@ (package! org-tree-slide :pin "7bf09a02bd") (package! org-re-reveal :pin "61549f4c00")) (when (featurep! +roam) - (package! org-roam :pin "6175739b33") + (package! org-roam :pin "963692f353") (when (featurep! :completion company) (package! company-org-roam :pin "0913d86f16"))) -(when (featurep! +noter) - (package! org-noter :pin "9ead81d42d")) ;;; Babel (package! ob-async :pin "80a30b96a0") @@ -105,6 +105,6 @@ (when (featurep! +hugo) (package! ox-hugo :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) - :pin "b6f4142de2")) + :pin "5106b430a1")) (when (featurep! :lang rst) (package! ox-rst :pin "9158bfd180")) From a16b305c0fae7d99eddd280a7748e179100cfaab Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 16:24:31 -0400 Subject: [PATCH 079/229] Add REVIEW comment for org-roam symlink advice See jethrokuan/org-roam#518 --- modules/lang/org/contrib/roam.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index 0af9b60b9..83f8c0bb9 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -57,7 +57,7 @@ ;; list of unresolved file paths. If those are symlinks, you will later ;; end up with duplicate entries in your roam DB (e.g. after ;; `org-roam-capture'ing to an existing file). - ;; TODO Report/PR this upstream! + ;; REVIEW When jethrokuan/org-roam#518 is merged (defadvice! +org-roam-resolve-symlinks-a (args) :filter-args #'org-roam--list-files (setcar args (file-truename (car args))) From aff4a337ace9b1b73e65c9ceba846ca76e646128 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 17:00:57 -0400 Subject: [PATCH 080/229] Fix #2971: void-function doom-modeline-update-env errors --- modules/ui/modeline/autoload.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/ui/modeline/autoload.el b/modules/ui/modeline/autoload.el index 58ecd562b..4fc40237a 100644 --- a/modules/ui/modeline/autoload.el +++ b/modules/ui/modeline/autoload.el @@ -31,14 +31,16 @@ Meant for `doom-change-font-size-hook'." "Update version strings in all buffers." (dolist (window (window-list)) (with-selected-window window - (doom-modeline-update-env) + (when (fboundp 'doom-modeline-update-env) + (doom-modeline-update-env)) (force-mode-line-update)))) ;;;###autoload (defun +modeline-clear-env-in-all-windows-h (&rest _) "Blank out version strings in all buffers." - (dolist (buffer (buffer-list)) - (with-current-buffer buffer - (setq doom-modeline-env--version - (bound-and-true-p doom-modeline-load-string)))) + (unless (featurep! +light) + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (setq doom-modeline-env--version + (bound-and-true-p doom-modeline-load-string))))) (force-mode-line-update t)) From 91cf27939cf0ab00333b595fd990e959aea8d50a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 17:01:15 -0400 Subject: [PATCH 081/229] Fix void-function set-modeline! errors When `:ui (modeline +light)` is enabled. --- modules/ui/modeline/autoload.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ui/modeline/autoload.el b/modules/ui/modeline/autoload.el index 4fc40237a..55b55a3dd 100644 --- a/modules/ui/modeline/autoload.el +++ b/modules/ui/modeline/autoload.el @@ -1,13 +1,13 @@ ;;; ui/modeline/autoload/modeline.el -*- lexical-binding: t; -*- ;;;###autodef -(defalias 'def-modeline-format! #'doom-modeline-def-modeline) +(fset 'def-modeline-format! #'doom-modeline-def-modeline) ;;;###autodef -(defalias 'def-modeline-segment! #'doom-modeline-def-segment) +(fset 'def-modeline-segment! #'doom-modeline-def-segment) ;;;###autodef -(defalias 'set-modeline! #'doom-modeline-set-modeline) +(fset 'set-modeline! #'doom-modeline-set-modeline) (defvar +modeline--old-bar-height nil) From 632175d1e2f38ecc070d48a65b776577a4260a7b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 17:02:47 -0400 Subject: [PATCH 082/229] Fix #2322: delete open posframes on doom/reload --- modules/completion/ivy/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index d0693cbea..2c3e9aba7 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -331,7 +331,9 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ;; posframe. (dolist (fn '(swiper counsel-rg counsel-grep counsel-git-grep)) (setf (alist-get fn ivy-posframe-display-functions-alist) - #'ivy-display-function-fallback))) + #'ivy-display-function-fallback)) + + (add-hook 'doom-reload-hook #'posframe-delete-all)) (use-package! flx From db03746daf8c3c04df73ced5ac4e723238532076 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 18:36:51 -0400 Subject: [PATCH 083/229] editor/evil: mention vim-unimpaired in ported plugins --- modules/editor/evil/README.org | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 46053eaad..bbb2bd803 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -71,6 +71,7 @@ The following vim plugins have been ported to evil: | vim-lion | evil-lion | omap =gl= / =gL= | | vim-seek or vim-sneak | evil-snipe | mmap =s= / =S=, omap =z= / =Z= & =x= / =X= | | vim-surround | evil-embrace and evil-surround | vmap =S=, omap =ys= | +| vim-unimpaired | (provided by Doom) | [[https://github.com/hlissner/doom-emacs/blob/develop/modules/editor/evil/config.el#L413-L460][see the list]] | This module has also ported vim-unimpaired keybinds to Emacs. From 993888cd2b27e1e29376d891bb82aa0e12318150 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:23:13 -0400 Subject: [PATCH 084/229] Enable hl-line-mode in special-mode buffers --- core/core-ui.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index ebbe798a1..6ff9e85ba 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -419,7 +419,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (use-package! hl-line ;; Highlights the current line - :hook ((prog-mode text-mode conf-mode) . hl-line-mode) + :hook ((prog-mode text-mode conf-mode special-mode) . hl-line-mode) :config ;; Not having to render the hl-line overlay in multiple buffers offers a tiny ;; performance boost. I also don't need to see it in other buffers. From bba82465a040499bf9e2f40e5928805d06821968 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:45:31 -0400 Subject: [PATCH 085/229] Bump :lang org hlissner/evil-org-mode@4d44e9b -> hlissner/evil-org-mode@9cf661a --- modules/lang/org/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index afca11882..290071e58 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -45,7 +45,7 @@ (when (featurep! :editor evil +everywhere) (package! evil-org :recipe (:host github :repo "hlissner/evil-org-mode") - :pin "4d44e9bbdc")) + :pin "9cf661af8f")) (when (featurep! :tools pdf) (package! org-pdftools :pin "8cc15bb801")) (when (featurep! :tools magit) From 55d34174826fcd27b59dc0f0480ca26b9a295d13 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:47:07 -0400 Subject: [PATCH 086/229] Remove unused autodefs for :ui modeline #2971 --- modules/ui/modeline/autoload.el | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/modules/ui/modeline/autoload.el b/modules/ui/modeline/autoload.el index 55b55a3dd..437390db3 100644 --- a/modules/ui/modeline/autoload.el +++ b/modules/ui/modeline/autoload.el @@ -1,15 +1,5 @@ ;;; ui/modeline/autoload/modeline.el -*- lexical-binding: t; -*- -;;;###autodef -(fset 'def-modeline-format! #'doom-modeline-def-modeline) - -;;;###autodef -(fset 'def-modeline-segment! #'doom-modeline-def-segment) - -;;;###autodef -(fset 'set-modeline! #'doom-modeline-set-modeline) - - (defvar +modeline--old-bar-height nil) ;;;###autoload (defun +modeline-resize-for-font-h () From 740b16a33f37ebfb918590975e8ab0d9d0ea8122 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:50:03 -0400 Subject: [PATCH 087/229] Bump :tools lsp emacs-lsp/helm-lsp@46a72f5 -> emacs-lsp/helm-lsp@db24399 emacs-lsp/lsp-ivy@a6b7841 -> emacs-lsp/lsp-ivy@81e81ce emacs-lsp/lsp-mode@e8e52fd -> emacs-lsp/lsp-mode@4898d35 --- modules/tools/lsp/packages.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index 70e65dead..29c0649a0 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode :pin "e8e52fd4b1") +(package! lsp-mode :pin "4898d35ace") (package! lsp-ui :pin "242dfe859c") (when (featurep! :completion company) (package! company-lsp :pin "f921ffa0cd")) (when (featurep! :completion ivy) - (package! lsp-ivy :pin "a6b7841e08")) + (package! lsp-ivy :pin "81e81ced99")) (when (featurep! :completion helm) - (package! helm-lsp :pin "46a72f5af1")) + (package! helm-lsp :pin "db243993ea")) From 217a032035c52261ede0975ad0c35f039d34d94a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:52:10 -0400 Subject: [PATCH 088/229] Bump :tools magit magit/magit@0f1234e -> magit/magit@8de6ecf magit/forge@2e2d26c -> magit/forge@e2da806 --- modules/tools/magit/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index 0bc97b4e1..97ac695ce 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit :pin "0f1234e785") +(when (package! magit :pin "8de6ecf5c5") (when (featurep! +forge) - (package! forge :pin "2e2d26cf42")) + (package! forge :pin "e2da80660a")) (package! magit-gitflow :pin "cc41b561ec") (package! magit-todos :pin "a0e5d1f3c7") (package! github-review :pin "50c6bcc7cf") From f2813a35d7feda3803faa3ad8660abddf2cb5fa4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:52:49 -0400 Subject: [PATCH 089/229] Bump :tools lookup abo-abo/define-word@d8c76d5 -> abo-abo/define-word@08c71b1 jacktasia/dumb-jump@73b2b48 -> jacktasia/dumb-jump@d760aa8 --- modules/tools/lookup/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 59d3251a1..0206f4c1f 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -8,7 +8,7 @@ (package! helm)) ;; -(package! dumb-jump :pin "73b2b48fda") +(package! dumb-jump :pin "d760aa880f") (when (featurep! :completion ivy) (package! ivy-xref :pin "3d4c35fe2b")) (when (featurep! :completion helm) @@ -27,7 +27,7 @@ (when (featurep! +dictionary) (if IS-MAC (package! osx-dictionary :pin "1b79ff64c7") - (package! define-word :pin "d8c76d503b") + (package! define-word :pin "08c71b1ff4") ;; HACK Fix #2945: the main package is broken (see ;; SavchenkoValeriy/emacs-powerthesaurus). We use this fork until it is ;; merged. From 90197eed707a3e1ea3f439cbf9d1d394f78d54c9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:58:42 -0400 Subject: [PATCH 090/229] Bump :ui treemacs Alexander-Miller/treemacs@2bb14ac -> Alexander-Miller/treemacs@ee1b523 --- modules/ui/treemacs/packages.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index cf79e6efd..a1e1ead7e 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,7 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs :pin "2bb14ac262") +(package! treemacs :pin "ee1b523b28") +;; These packages have no :pin because they're in the same repo (when (featurep! :editor evil +everywhere) (package! treemacs-evil)) (package! treemacs-projectile) From c68ca95dad3d4d1c9b6ea7f8b094a7e1fb46b3b4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Apr 2020 21:59:02 -0400 Subject: [PATCH 091/229] Bump :ui modeline seagle0128/doom-modeline@0ce0acd -> seagle0128/doom-modeline@c177959 --- modules/ui/modeline/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index 4a8eae288..f9427d43e 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "0ce0acd7bc")) + (package! doom-modeline :pin "c177959bbf")) (package! anzu :pin "3e34fb3df5") (when (featurep! :editor evil) (package! evil-anzu :pin "9bca6ca14d")) From 2ae397b88582d5854365f0ddf0a26c2ae45e50b3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 01:48:07 -0400 Subject: [PATCH 092/229] Redesign project readme --- README.md | 367 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 216 insertions(+), 151 deletions(-) diff --git a/README.md b/README.md index 60125414e..484051841 100644 --- a/README.md +++ b/README.md @@ -1,185 +1,250 @@ - - Made with Doom Emacs - - - Supports Emacs 26.x - 27.0.50 - - - Build status: develop - - - Join our discord server - -

+
+ +# Doom Emacs + +[Website] • [Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute) + +![Made with Doom Emacs](https://img.shields.io/github/tag/hlissner/doom-emacs.svg?style=flat-square&label=release&color=58839b) +![Supports Emacs 26-27](https://img.shields.io/badge/Supports-Emacs_26.1_--_27.x-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white) +![Latest commit](https://img.shields.io/github/last-commit/hlissner/doom-emacs/develop?style=flat-square) +![Build status: develop](https://img.shields.io/github/workflow/status/hlissner/doom-emacs/CI/develop?style=flat-square) +[![Discord Server](https://img.shields.io/discord/406534637242810369?color=blue&label=Discord%20Chat&logo=discord&logoColor=white&style=flat-square)][Discord] ![Doom Emacs Screenshot](https://raw.githubusercontent.com/hlissner/doom-emacs/screenshots/main.png) -

- Screenshots - | - Get started - | - Contribute - | - Documentation - | - FAQ -

+
--- -**Quick start** +### Table of Contents +- [Introduction](#introduction) +- [Features](#features) +- [Prerequisites](#prerequisites) +- [Install](#install) +- [Roadmap](#roadmap) +- [Getting help](#getting-help) +- [Contributing](#contributing) -1. **Install Emacs 26.1+**. 27 is recommended. _28+ is not supported_. -2. Install [ripgrep](https://github.com/BurntSushi/ripgrep) 11.0+. -3. Windows and BSD users will need GNU Find. -4. Clone Doom and run its installer: - - ```bash - git clone https://github.com/hlissner/doom-emacs ~/.emacs.d - ~/.emacs.d/bin/doom install - ``` - -Find more detailed install instructions [in the -documentation](docs/getting_started.org#install). - -**Table of Contents** - -- [What is Doom Emacs](#what-is-doom-emacs) - - [Doom's mantras](#dooms-mantras) - - [Features](#features) -- [Getting Help](#getting-help) - - [Community](#community) - - [Troubleshooting](#troubleshooting) - - [Contributing](#contributing) - -# What is Doom Emacs +# Introduction - + -It is a story as old as time. A stubborn, shell-dwelling, and melodramatic -vimmer -- envious of the features of modern text editors -- spirals into despair -before succumbing to the [dark side][url:evil-mode]. This is his config. +> It is a story as old as time. A stubborn, shell-dwelling, and melodramatic +> vimmer -- envious of the features of modern text editors -- spirals into +> despair before he succumbs to the [dark side][evil-mode]. This is his config. -Doom is a configuration framework for [GNU -Emacs](https://www.gnu.org/software/emacs/) tailored for Emacs bankruptcy -veterans who want less framework in their frameworks and the performance of a -hand rolled config (or better). It can be a foundation for your own config or a -resource for Emacs enthusiasts to learn more about our favorite OS. +Doom is a configuration framework for [GNU Emacs] tailored for Emacs bankruptcy +veterans who want less framework in their frameworks, a modicum of stability +(and reproducibility) from their package manager, and the performance of a hand +rolled config (or better). It can be a foundation for your own config or a +resource for Emacs enthusiasts to learn more about our favorite operating +system. -## Doom's mantras +Its design is guided by these mantras: -- **Gotta go fast.** Startup and run-time performance are priorities. Doom goes - beyond lazy loading packages by modifying them to be snappier and load lazier! -- **Close to metal.** There's less between you and vanilla Emacs by design. - There's less to grok, on top of Emacs. -- **Readability counts.** Internals ought to be written as if reading them were - part of the user experience, and it is! Modules should be syntactically sweet. - Backend logic should be functional (as much as elisp permits), abstraction - light and (hopefully) documented. -- **Opinionated, but not stubborn.** Doom is a bundle of reasonable defaults and - curated opinions, but all of it should be optional. Use as little or as much - of it as you like. -- **Your system, your rules.** There are more ways to set up your development - environment than there are dislikes on Youtube Rewind '18, so Doom leaves it - to you. Doom will not *automatically* install system dependencies (and will - coerce its plugins not to do so either). Use `doom doctor` to figure out - what's missing. ++ **Gotta go fast.** Startup and run-time performance are priorities. Doom goes + beyond by modifying packages to be snappier and load lazier. ++ **Close to metal.** There's less between you and vanilla Emacs by design. + That's less to grok and less to work around when you tinker. Internals ought + to be written as if reading them were part of Doom's UX, and it is! ++ **Opinionated, but not stubborn.** Doom is about reasonable defaults and + curated opinions, but use as little or as much of it as you like. ++ **Your system, your rules.** You know better. At least, Doom hopes so! It + won't *automatically* install system dependencies (and will force plugins not + to either). Rely on `doom doctor` to tell you what's missing. ++ **Nix/Guix was a great idea!** The Emacs ecosystem is temperamental. Things + break and they break often. Disaster recovery should be a priority! Doom's + package management should be declarative and your private config reproducible, + and comes with a means to roll back releases and updates (still a WIP). + +Check out [the FAQ][FAQ] for answers to common questions about the project. -## Features +# Features - Minimalistic good looks inspired by modern editors. -- A modular architecture that can be extended to your own configs. -- A standard library suited to simplifying your config. -- A declarative [package management system][doom:packages] (powered by - [straight.el][url:straight]) with a command line interface. Install packages - from anywhere, not just (M)ELPA. -- (Optional) Vim-emulation powered by [evil-mode][url:evil-mode], including - ports of popular vim plugins and functionality. - Curated and sane defaults for many packages, (major) OSes, and Emacs itself. +- A modular organizational structure for separating concerns in your config. +- A standard library designed to simplify your elisp bike shedding. +- A declarative [package management system][package-management] (powered by + [straight.el]) with a command line interface. Install packages from anywhere, + not just (M)ELPA, and pin them to any commit. +- Optional vim emulation powered by [evil-mode], including ports of popular vim + plugins like [vim-sneak], [vim-easymotion], [vim-unimpaired] and + [more][ported-vim-plugins]! +- Opt-in LSP integration for many languages, using [lsp-mode]. - Support for *many* programming languages. Includes syntax highlighting, linters/checker integration, inline code evaluation, code completion (where possible), REPLs, documentation lookups, snippets, and more! - Support for *many* tools, like docker, pass, ansible, terraform, and more. -- A Spacemacs-esque [keybinding scheme][doom:bindings], centered around leader - and localleader prefix keys (SPC and SPCm, by - default). -- A rule-based [popup management system][doom:popups] to control how temporary - or disposable buffers are displayed (and disposed of). -- Automatic indentation detection and [editorconfig][url:editorconfig] - integration. Let someone else argue about tabs vs **\_\***spaces**\*\_**. +- A Spacemacs-esque [keybinding scheme][bindings], centered around leader + and localleader prefix keys (SPC and SPCm for + evil users, C-c and C-c l for vanilla users). +- A rule-based [popup manager][popup-system] to control how temporary buffers + are displayed (and disposed of). +- Per-file indentation style detection and [editorconfig] integration. Let + someone else can argue about tabs vs **_spaces_**. - Project-management tools and framework-specific minor modes with their own snippets libraries. -- Project search (and replace) utilities, powered by [ripgrep][url:ripgrep]. +- Project search (and replace) utilities, powered by [ripgrep] and [ivy] or + [helm]. - Isolated and persistent workspaces (also substitutes for vim tabs). -- An envvar file generator that captures a snapshot of your shell environment - for Doom to load at startup. No more struggling to get Emacs to inherit your - `PATH`, among other things. +- Support for Chinese and Japanese input systems. +- Save a snapshot of your shell environment to a file for Emacs to load at + startup. No more struggling to get Emacs to inherit your `PATH`, among other + things. -# Getting Help -## Community +# Prerequisites ++ Git 2.23+ ++ Emacs 26.1+ *(27 is recommended)* with GNUTLS support ++ [ripgrep] 11.0+ ++ GNU `find` ++ *OPTIONAL:* [fd] 7.3.0+ (improves file indexing performance for some commands) + +Doom is comprised of [~150 optional modules][Modules], some of which may have +additional dependencies. [Visit their documentation][Modules] or run `bin/doom +doctor` to check for any that you may have missed. -We have [a Discord server][url:discord]! Hop on and say hi! -## Troubleshooting +# Install +``` sh +git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d +~/.emacs.d/bin/doom install +``` -Encountered a problem? Here are some things to try before shooting off that bug -report: +Then [read our Getting Started guide][docs] to be walked through setting up, +configuring and maintaining Doom Emacs. -- Run `bin/doom sync`. This ensures Doom is properly set up and its autoloads - files are up-to-date. -- Folks who have byte-compiled their config (with `bin/doom compile`) should run - `bin/doom clean` to rule out stale bytecode. Never debug with a byte-compiled - config. It makes your job harder. -- Run `bin/doom doctor` to detect common issues in your development environment - and missing third party dependencies. -- Search [Doom's issue tracker][github:issues] in case your issue was already +It's a good idea to add `~/.emacs.d/bin` to your `PATH`! Other `bin/doom` +commands you should know about: + ++ `doom sync` to synchronize your private config with Doom. Installs new + packages, removes orphaned packages and regenerates caches. Run this whenever + you modify your private `init.el` or `packages.el`, or install/remove an Emacs + package through your OS package manager (e.g. mu4e or agda). ++ `doom upgrade` to update Doom to the latest release & all installed packages. ++ `doom doctor` to diagnose common issues with your system and config. ++ `doom env` to dump a snapshot of your shell environment to a file that Doom + will load at startup. This allows Emacs to inherit your `PATH`, among other + things. ++ `doom build` to recompile all installed packages (use this if you up/downgrade + Emacs). + + +# Roadmap +Doom is an active and ongoing project. To make that development more +transparent, its roadmap (and other concerns) are published across three github +project boards and a newsletter: + ++ [Development Roadmap](/projects/3): roughly outlines our goals between release + milestones and their progress. ++ [Plugins under review](/projects/2): lists plugins we are watching and + considering for inclusion, and what their status for inclusion is. Please + consult this list before requesting new packages/features. ++ [Upstream bugs](/projects/5): lists issues that originate from elsewhere, and + whether or not we have local workarounds or temporary fixes for them. ++ ~~Doom's newsletter~~ (not finished) will contain changelogs in between + releases. + + +# Getting help +Emacs is no journey of a mere thousand miles. You _will_ run into problems and +mysterious errors. When you do, here are some places you can look for help: + ++ [Our documentation][docs] covers many use cases. + + [The Configuration section][configuration] covers how to configure Doom and + its packages. + + [The Package Management section][package-management] covers how to install + and disable packages. + + [This section][bin/doom] explains the `bin/doom` script's most important + commands. + + [This section][common-mistakes] lists some common configuration mistakes new + users make, when migrating a config from another distro or their own. + + [This answer][change-theme] shows you how to add your own themes to your + private config. + + [This answer][change-font] shows you how to change the default font. + + Your issue may be documented in the [FAQ]. ++ With Emacs built-in help system documentation is a keystroke away: + + For functions: `SPC h f` or `C-h f` + + For variables: `SPC h v` or `C-h v` + + For a keybind: `SPC h k` or `C-h k` + + To search available keybinds: `SPC h b b` or `C-h b b` ++ Run `bin/doom doctor` to detect common issues with your development + environment and private config. ++ Check out the [FAQ], in case your question has already been answered. ++ Search [Doom's issue tracker](/issues) in case your issue was already reported. -- [Visit our FAQ][docs:faq] to see if your issue is listed. - -If all else fails, [file that bug report][github:new-issue]! **Please do not -ignore the issue template!** It's a great help if you can [include a backtrace -with errors][docs:backtrace]. - -## Contributing - -Doom (and my Emacs work in general) is a labor of love and incurable madness, -done on my spare time. If you'd like to support my work, there are many things -you can do to help. I welcome contributions! - -- I love pull requests and bug reports. Check out the [Contributing - Guidelines][docs:contributing] to find out how you can help out. -- I welcome Elisp pointers! Don't hesitate to [tell me my Elisp-fu - sucks][github:new-issue] (but please tell me why). -- Hop on [our Discord server][url:discord] and say hi! Help others out, hang out - or talk to me about Emacs, or gamedev, or programming, machine learning, - physics, pixel art, anime, gaming -- anything you like. Nourish this lonely - soul! -- If you'd like to support my work financially, consider buying me a drink - through [liberapay][url:liberapay] or [paypal][url:paypal]. Donations are a - great help. My work here contends with studies, ventures in indie gamedev, and - my freelance work. ++ Hop on [our Discord server][discord]; it's active and friendly! Keep an eye on + the #announcements channel, where I announce breaking updates and releases. -[docs:wiki]: docs/index.org -[docs:wiki-quickstart]: docs/getting_started.org -[docs:wiki-modules]: docs/index.org#Module%20List -[docs:wiki-customization]: docs/getting_started.org#Customize -[docs:contributing]: docs/contributing.org -[docs:faq]: docs/faq.org -[docs:backtrace]: https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#how-to-extract-a-backtrace-from-an-error -[github:new-issue]: https://github.com/hlissner/doom-emacs/issues/new -[github:issues]: https://github.com/hlissner/doom-emacs/issues -[doom:bindings]: modules/config/default/+evil-bindings.el -[doom:packages]: core/autoload/packages.el -[doom:popups]: modules/ui/popup/README.org -[url:discord]: https://discord.gg/qvGgnVx -[url:liberapay]: https://liberapay.com/hlissner/donate -[url:paypal]: https://paypal.me/henriklissner/10 -[url:editorconfig]: http://editorconfig.org/ -[url:evil-mode]: https://github.com/emacs-evil/evil -[url:ripgrep]: https://github.com/BurntSushi/ripgrep -[url:straight]: https://github.com/raxod502/straight.el +# Contribute +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) +[![Elisp styleguide](https://img.shields.io/badge/elisp-style%20guide-purple?style=flat-square)](https://github.com/bbatsov/emacs-lisp-style-guide) +[![Donate on liberapay](https://img.shields.io/badge/liberapay-donate-1.svg?style=flat-square&logo=liberapay&color=blue)][liberapay] +[![Donate on paypal](https://img.shields.io/badge/paypal-donate-1?style=flat-square&logo=paypal&color=blue)][paypal] + +Doom is a labor of love and incurable madness, but I'm only one guy. Doom +wouldn't be where it is today without your help. I welcome contributions of any +kind! + ++ I :heart: pull requests and bug reports (see the [Contributing + Guidelines][contribute])! ++ Don't hesitate to [tell me my Elisp-fu sucks](/issues/new), but please tell me + why. ++ Hop on [our Discord server][Discord] and say hi! Help others, hang out or talk + to me about Emacs, gamedev, programming, physics, pixel art, anime, gaming -- + anything you like. Nourish this lonely soul. ++ If you'd like to support my work financially, buy me a drink through + [liberapay] or [paypal]. My work contends with studies, adventures in indie + gamedev and freelance work. Donations help me allocate more time to my Emacs + and OSS capers. + +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/0)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/0) +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/1)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/1) +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/2)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/2) +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/3)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/3) +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/4)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/4) +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/5)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/5) +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/6)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/6) +[![](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/images/7)](https://sourcerer.io/fame/hlissner/hlissner/doom-emacs/links/7) + + +[contribute]: docs/contributing.org +[discord]: https://discord.gg/qvGgnVx +[documentation]: docs/index.org +[faq]: docs/faq.org +[install]: docs/getting_started.org#install +[backtrace]: docs/getting_started.org#how-to-extract-a-backtrace-from-an-error +[configuration]: docs/getting_started.org#configuring-doom +[package-management]: docs/getting_started.org#package-management +[bin/doom]: docs/getting_started.org#the-bindoom-utility +[common-mistakes]: docs/getting_started.org#common-mistakes-when-configuring-doom-emacs +[change-theme]: docs/faq.org#how-do-i-change-the-theme +[change-font]: docs/faq.org#how-do-i-change-the-fonts +[modules]: docs/modules.org +[popup-system]: modules/ui/popup/README.org +[screenshots]: #screenshots +[website]: https://doomemacs.org + +[bindings]: modules/config/default/+evil-bindings.el +[editorconfig]: http://editorconfig.org/ +[evil-mode]: https://github.com/emacs-evil/evil +[fd]: https://github.com/sharkdp/fd +[gnu emacs]: https://www.gnu.org/software/emacs/ +[helm]: https://github.com/emacs-helm/helm +[ivy]: https://github.com/abo-abo/swiper +[lsp-mode]: https://github.com/emacs-lsp/lsp-mode +[nix]: https://nixos.org +[ported-vim-plugins]: modules/editor/evil/README.org#ported-vim-plugins +[ripgrep]: https://github.com/BurntSushi/ripgrep +[straight.el]: https://github.com/raxod502/straight.el +[vim-easymotion]: https://github.com/easymotion/vim-easymotion +[vim-lion]: https://github.com/tommcdo/vim-lion +[vim-sneak]: https://github.com/justinmk/vim-sneak +[vim-unimpaired]: https://github.com/tpope/vim-unimpaired + +[liberapay]: https://liberapay.com/hlissner/donate +[paypal]: https://paypal.me/henriklissner/10 From 3202b68b01817cab3230d77ee549a850e524fb5c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 01:52:09 -0400 Subject: [PATCH 093/229] Fix "Found argument '--glob ...' which wasn't expected" error When using +ivy/projectile-find-file. --- modules/completion/ivy/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 2c3e9aba7..4b91aea31 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -264,7 +264,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ((executable-find "rg") (append (list "rg" "-0" "--files" "--color=never" "--hidden" "--no-messages") (cl-loop for dir in projectile-globally-ignored-directories - collect (format "--glob '!%s'" dir)) + collect "--glob" and collect (concat "!" dir)) (if IS-WINDOWS (list "--path-separator /")))) ((cons find-program args))) (unless (listp args) From edef4d6c7d3fad89865aa7fde23fce92efce5494 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 01:54:44 -0400 Subject: [PATCH 094/229] Fix documentation links in readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 484051841..25e1339fa 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,8 @@ git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d ~/.emacs.d/bin/doom install ``` -Then [read our Getting Started guide][docs] to be walked through setting up, -configuring and maintaining Doom Emacs. +Then [read our Getting Started guide][documentation] to be walked through +setting up, configuring and maintaining Doom Emacs. It's a good idea to add `~/.emacs.d/bin` to your `PATH`! Other `bin/doom` commands you should know about: @@ -153,7 +153,7 @@ project boards and a newsletter: Emacs is no journey of a mere thousand miles. You _will_ run into problems and mysterious errors. When you do, here are some places you can look for help: -+ [Our documentation][docs] covers many use cases. ++ [Our documentation][documentation] covers many use cases. + [The Configuration section][configuration] covers how to configure Doom and its packages. + [The Package Management section][package-management] covers how to install From 8532aa8dbe6b85738660afa13e7e3e934d9b48c5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 02:01:10 -0400 Subject: [PATCH 095/229] Don't null-byte delimit ripgrep file list --- modules/completion/ivy/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 4b91aea31..db5baab53 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -262,7 +262,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (cond ((executable-find doom-projectile-fd-binary) (cons doom-projectile-fd-binary (list "-t" "f" "-E" ".git"))) ((executable-find "rg") - (append (list "rg" "-0" "--files" "--color=never" "--hidden" "--no-messages") + (append (list "rg" "--files" "--color=never" "--hidden" "--no-messages") (cl-loop for dir in projectile-globally-ignored-directories collect "--glob" and collect (concat "!" dir)) (if IS-WINDOWS (list "--path-separator /")))) From e4b570c9aeb15473e56d6c8351108706fdaee366 Mon Sep 17 00:00:00 2001 From: "M. Yas. Davoodeh" Date: Sun, 26 Apr 2020 10:33:10 +0430 Subject: [PATCH 096/229] Fix tex-lsp related commented issues --- docs/modules.org | 2 +- modules/lang/latex/README.org | 4 ++-- modules/lang/latex/config.el | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 25ed94402..e062d5113 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -114,7 +114,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO + kotlin =+lsp+= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex= =+lsp= - TODO ++ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex +lsp= - TODO + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO + lua =+moonscript= - TODO diff --git a/modules/lang/latex/README.org b/modules/lang/latex/README.org index 9b6fe2e4b..8a52cea48 100644 --- a/modules/lang/latex/README.org +++ b/modules/lang/latex/README.org @@ -30,8 +30,8 @@ Provide a helping hand when working with LaTeX documents. ** Module Flags + =+latexmk= Use LatexMk instead of LaTeX to compile documents. + =+cdlatex= Enable [[https://github.com/cdominik/cdlatex][cdlatex]] for fast math insertion. -+ =+lsp= Start LSP automatically in `tex-mode-hook`. This - requires the =:tools lsp= module. ++ =+lsp= Start LSP automatically in `tex-mode-hook`. This requires the =:tools + lsp= module. Supported servers are `digestif` and `TexLab`. ** Plugins + [[http://www.gnu.org/software/auctex/][auctex]] diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 081edf29b..19a12c7b4 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -76,9 +76,10 @@ If no viewers are found, `latex-preview-pane' is used.") ;; quotes or not, via `+latex-enable-plain-double-quotes' (sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))) ;; Hook lsp if enabled - (when (and (featurep! +lsp) (featurep! :tools lsp)) - (add-hook 'tex-mode-local-vars-hook #'lsp!) - (add-hook 'latex-mode-local-vars-hook #'lsp!))) + (when (featurep! +lsp) + (add-hook! '(tex-mode-local-vars-hook + latex-mode-local-vars-hook) + #'lsp!))) (after! latex @@ -178,6 +179,7 @@ If no viewers are found, `latex-preview-pane' is used.") (add-to-list '+latex--company-backends #'company-auctex-environments nil #'eq) (add-to-list '+latex--company-backends #'company-auctex-macros nil #'eq)) + (use-package! company-math :when (featurep! :completion company) :defer t From e4001ebcaed320372fab43c34d432d73ad54afb1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 02:31:52 -0400 Subject: [PATCH 097/229] Remove website link from readme It's not up yet! --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 25e1339fa..a62df627e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Doom Emacs -[Website] • [Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute) +[Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute) ![Made with Doom Emacs](https://img.shields.io/github/tag/hlissner/doom-emacs.svg?style=flat-square&label=release&color=58839b) ![Supports Emacs 26-27](https://img.shields.io/badge/Supports-Emacs_26.1_--_27.x-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white) @@ -227,7 +227,6 @@ kind! [modules]: docs/modules.org [popup-system]: modules/ui/popup/README.org [screenshots]: #screenshots -[website]: https://doomemacs.org [bindings]: modules/config/default/+evil-bindings.el [editorconfig]: http://editorconfig.org/ From fe5e6fff9ad9b5f518a44382607826f1538935ec Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 02:33:06 -0400 Subject: [PATCH 098/229] Remove redundant yasnippet keybinds --- modules/config/default/+emacs-bindings.el | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 25391b39c..f059cefce 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -541,14 +541,4 @@ ;;; treemacs (:when (featurep! :ui treemacs) "" #'+treemacs/toggle - "" #'+treemacs/find-file) - - ;;; yasnippet - (:after yasnippet - :map yas-keymap ; keymap while editing an inserted snippet - "C-e" #'+snippets/goto-end-of-field - "C-a" #'+snippets/goto-start-of-field - "" #'yas-prev-field - "" #'+snippets/delete-to-start-of-field - [backspace] #'+snippets/delete-backward-char - [delete] #'+snippets/delete-forward-char-or-field)) + "" #'+treemacs/find-file)) From e1a9bf234faaef1f47f4bd1f6404f402756f34ff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 02:33:37 -0400 Subject: [PATCH 099/229] Minor refactors --- modules/editor/file-templates/templates/org-mode/__doom-readme | 2 +- modules/email/mu4e/config.el | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/editor/file-templates/templates/org-mode/__doom-readme b/modules/editor/file-templates/templates/org-mode/__doom-readme index 56a1f25a8..695067459 100644 --- a/modules/editor/file-templates/templates/org-mode/__doom-readme +++ b/modules/editor/file-templates/templates/org-mode/__doom-readme @@ -7,7 +7,7 @@ (match-string 2 buffer-file-name)) "")`} #+DATE: `(format (format-time-string "%B %%s, %Y") (string-to-number (format-time-string "%d")))` -#+SINCE: ${2:{replace with next tagged release version}} +#+SINCE: ${2:} #+STARTUP: inlineimages nofold * Table of Contents :TOC_3:noexport: diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 3bdb86efa..cfd43a3a7 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -109,8 +109,7 @@ ;; Only render to html once. If the first send fails for whatever reason, ;; org-mu4e would do so each time you try again. - (add-hook! 'message-send-hook - (setq-local org-mu4e-convert-to-html nil))) + (setq-hook! 'message-send-hook org-mu4e-convert-to-html nil)) ;; From 5edfcec2dfa588bcd8946cde454538e9deaac13e Mon Sep 17 00:00:00 2001 From: tecosaur Date: Sun, 26 Apr 2020 15:35:04 +0800 Subject: [PATCH 100/229] Critical bugfixes! Momentus edits of paramount importance crucial to the long-term success of the project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A few tweaks to the readme: 1. Replaced typographic approximation of em dashes with … em dashes 2. Made parenthesis surrounding italic text non-italic (yes, it's an improvement — Robert Bringhurst agrees with me [5.3.2 of his book]) 3. Made `project/?` links actually link to the project pages (relative links like `/?` resolve to `/blob/?`) 4. Replaced code blocks around keypresses with `` as is used earlier in the readme 5. Fixed new issue link, as in (3) --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a62df627e..7b17fdb53 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ > It is a story as old as time. A stubborn, shell-dwelling, and melodramatic -> vimmer -- envious of the features of modern text editors -- spirals into +> vimmer—envious of the features of modern text editors—spirals into > despair before he succumbs to the [dark side][evil-mode]. This is his config. Doom is a configuration framework for [GNU Emacs] tailored for Emacs bankruptcy @@ -98,7 +98,7 @@ Check out [the FAQ][FAQ] for answers to common questions about the project. # Prerequisites + Git 2.23+ -+ Emacs 26.1+ *(27 is recommended)* with GNUTLS support ++ Emacs 26.1+ (*27 is recommended*) with GNUTLS support + [ripgrep] 11.0+ + GNU `find` + *OPTIONAL:* [fd] 7.3.0+ (improves file indexing performance for some commands) @@ -138,12 +138,12 @@ Doom is an active and ongoing project. To make that development more transparent, its roadmap (and other concerns) are published across three github project boards and a newsletter: -+ [Development Roadmap](/projects/3): roughly outlines our goals between release ++ [Development Roadmap](https://github.com/hlissner/doom-emacs/projects/3): roughly outlines our goals between release milestones and their progress. -+ [Plugins under review](/projects/2): lists plugins we are watching and ++ [Plugins under review](https://github.com/hlissner/doom-emacs/projects/2): lists plugins we are watching and considering for inclusion, and what their status for inclusion is. Please consult this list before requesting new packages/features. -+ [Upstream bugs](/projects/5): lists issues that originate from elsewhere, and ++ [Upstream bugs](https://github.com/hlissner/doom-emacs/projects/5): lists issues that originate from elsewhere, and whether or not we have local workarounds or temporary fixes for them. + ~~Doom's newsletter~~ (not finished) will contain changelogs in between releases. @@ -167,10 +167,10 @@ mysterious errors. When you do, here are some places you can look for help: + [This answer][change-font] shows you how to change the default font. + Your issue may be documented in the [FAQ]. + With Emacs built-in help system documentation is a keystroke away: - + For functions: `SPC h f` or `C-h f` - + For variables: `SPC h v` or `C-h v` - + For a keybind: `SPC h k` or `C-h k` - + To search available keybinds: `SPC h b b` or `C-h b b` + + For functions: SPC h for or C-h f + + For variables: SPC h v or C-h v + + For a keybind: SPC h k or C-h k + + To search available keybinds: SPC h b b or C-h b b + Run `bin/doom doctor` to detect common issues with your development environment and private config. + Check out the [FAQ], in case your question has already been answered. @@ -192,7 +192,7 @@ kind! + I :heart: pull requests and bug reports (see the [Contributing Guidelines][contribute])! -+ Don't hesitate to [tell me my Elisp-fu sucks](/issues/new), but please tell me ++ Don't hesitate to [tell me my Elisp-fu sucks](https://github.com/hlissner/doom-emacs/issues/new), but please tell me why. + Hop on [our Discord server][Discord] and say hi! Help others, hang out or talk to me about Emacs, gamedev, programming, physics, pixel art, anime, gaming -- From 077b6f00d4dc410a490af0fdcd47d83dce0b0bd2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 04:09:46 -0400 Subject: [PATCH 101/229] Swap C-j/C-k history keys in evil-ex Typo reported by @howsiwei in hlissner/doom-emacs@77542bc --- modules/config/default/+evil-bindings.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 468e0dcc5..0df43b08c 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -8,8 +8,8 @@ "C-a" #'evil-beginning-of-line "C-b" #'evil-backward-char "C-f" #'evil-forward-char - "C-j" #'previous-complete-history-element - "C-k" #'next-complete-history-element) + "C-j" #'next-complete-history-element + "C-k" #'previous-complete-history-element) (define-key! :keymaps +default-minibuffer-maps [escape] #'abort-recursive-edit From 50ff934ff2169866e2fb38b32ae015a7268bb85a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 04:12:33 -0400 Subject: [PATCH 102/229] Fix #2832: filename modifiers replaced with empty strings --- modules/editor/evil/autoload/advice.el | 119 ++++++++++++------------- modules/editor/evil/autoload/ex.el | 4 +- modules/editor/evil/config.el | 2 +- modules/editor/evil/test/test-evil.el | 4 +- modules/term/eshell/autoload/evil.el | 2 +- 5 files changed, 65 insertions(+), 66 deletions(-) diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index 834f40315..e54a1ab90 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -7,7 +7,7 @@ (call-interactively #'doom/escape))) ;;;###autoload -(defun +evil-resolve-vim-path-a (file-name) +(defun +evil-replace-filename-modifiers-a (file-name) "Take a path and resolve any vim-like filename modifiers in it. This adds support for most vim file modifiers, as well as: @@ -15,66 +15,65 @@ support for most vim file modifiers, as well as: See http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers for more information on modifiers." - (let (case-fold-search) + (let ((origin-buffer (current-buffer)) + case-fold-search) (with-temp-buffer - (save-excursion (insert file-name)) - (while (re-search-forward "\\(^\\|[^\\\\]\\)\\(\\([%#]\\)\\(:\\([PphtreS~.]\\|g?s\\)\\)*\\)" nil t) - (catch 'continue - (unless buffer-file-name - (replace-match (match-string 1) t t nil 2) - (throw 'continue t)) - (let ((beg (match-beginning 2)) - (end (match-end 3)) - (path (pcase (match-string 3) - ("%" (file-relative-name buffer-file-name)) - ("#" (and (other-buffer) - (buffer-file-name (other-buffer))))))) - (save-match-data - (goto-char beg) - (while (re-search-forward ":\\([PphtreS~.]\\|g?s\\)" (+ (point) 3) t) - (let* ((modifier (match-string 1)) - (global (string-prefix-p "gs" modifier))) - (when global - (setq modifier (substring modifier 1))) - (setq end (match-end 1) - path - (or (when path - (pcase (substring modifier 0 1) - ("p" (expand-file-name path)) - ("~" (concat "~/" (file-relative-name path "~"))) - ("." (file-relative-name path default-directory)) - ("t" (file-name-nondirectory (directory-file-name path))) - ("r" (file-name-sans-extension path)) - ("e" (file-name-extension path)) - ("S" (shell-quote-argument path)) - ("h" - (let ((parent (file-name-directory (expand-file-name path)))) - (unless (file-equal-p path parent) - (if (file-name-absolute-p path) - (directory-file-name parent) - (file-relative-name parent))))) - ("s" - (if (featurep 'evil) - (when-let (args (evil-delimited-arguments (substring modifier 1) 2)) - (let ((pattern (evil-transform-vim-style-regexp (car args))) - (replace (cadr args))) - (replace-regexp-in-string - (if global pattern (concat "\\(" pattern "\\).*\\'")) - (evil-transform-vim-style-regexp replace) path t t - (unless global 1)))) - path)) - ("P" - (let ((project-root (doom-project-root (file-name-directory (expand-file-name path))))) - (unless project-root - (user-error "Not in a project")) - (abbreviate-file-name project-root))))) - "")) - ;; strip trailing slash, if applicable - (or (string-empty-p path) - (not (equal (substring path -1) "/")) - (setq path (substring path 0 -1)))))) - (replace-match path t t nil 2)))) - (replace-regexp-in-string "\\\\\\([#%]\\)" "\\1" (buffer-string) t)))) + (let ((buffer-file-name (buffer-file-name origin-buffer))) + (save-excursion (insert file-name)) + (while (re-search-forward "\\(^\\|[^\\\\]\\)\\(\\([%#]\\)\\(:\\([PphtreS~.]\\|g?s\\)\\)*\\)" nil t) + (if (null buffer-file-name) + (replace-match (match-string 1) t t nil 2) + (let ((beg (match-beginning 2)) + (end (match-end 3)) + (path (pcase (match-string 3) + ("%" (file-relative-name buffer-file-name default-directory)) + ("#" (and (other-buffer origin-buffer) + (buffer-file-name (other-buffer origin-buffer))))))) + (save-match-data + (goto-char beg) + (while (re-search-forward ":\\([PphtreS~.]\\|g?s\\)" (+ (point) 3) t) + (let* ((modifier (match-string 1)) + (global (string-prefix-p "gs" modifier))) + (when global + (setq modifier (substring modifier 1))) + (setq end (match-end 1) + path + (pcase (and path (substring modifier 0 1)) + (`nil "") + ("p" (expand-file-name path)) + ("~" (concat "~/" (file-relative-name path "~"))) + ("." (file-relative-name path)) + ("t" (file-name-nondirectory (directory-file-name path))) + ("r" (file-name-sans-extension path)) + ("e" (file-name-extension path)) + ("S" (shell-quote-argument path)) + ("h" + (let ((parent (file-name-directory (expand-file-name path)))) + (unless (file-equal-p path parent) + (if (file-name-absolute-p path) + (directory-file-name parent) + (file-relative-name parent))))) + ("s" + (if (featurep 'evil) + (when-let (args (evil-delimited-arguments (substring modifier 1) 2)) + (let ((pattern (evil-transform-vim-style-regexp (car args))) + (replace (cadr args))) + (replace-regexp-in-string + (if global pattern (concat "\\(" pattern "\\).*\\'")) + (evil-transform-vim-style-regexp replace) path t t + (unless global 1)))) + path)) + ("P" + (let ((project-root (doom-project-root (file-name-directory (expand-file-name path))))) + (unless project-root + (user-error "Not in a project")) + (abbreviate-file-name project-root))))) + ;; strip trailing slash, if applicable + (or (string-empty-p path) + (not (equal (substring path -1) "/")) + (setq path (substring path 0 -1)))))) + (replace-match path t t nil 2)))) + (replace-regexp-in-string "\\\\\\([#%]\\)" "\\1" (buffer-string) t))))) (defun +evil--insert-newline (&optional above _noextranewline) (let ((pos (save-excursion (beginning-of-line-text) (point))) diff --git a/modules/editor/evil/autoload/ex.el b/modules/editor/evil/autoload/ex.el index 09b18ed70..bdcb5d6fa 100644 --- a/modules/editor/evil/autoload/ex.el +++ b/modules/editor/evil/autoload/ex.el @@ -108,7 +108,7 @@ g Repeat alignment on all matches in each line" If BANG is non-nil, open compilation output in a comint buffer. If BANG, then run ARGUMENTS as a full command. This command understands vim file -modifiers (like %:p:h). See `+evil-resolve-vim-path-a' for details." +modifiers (like %:p:h). See `+evil-replace-filename-modifiers-a' for details." (interactive "") (let ((compile-command "make")) (+evil:compile (if (stringp arguments) @@ -122,7 +122,7 @@ modifiers (like %:p:h). See `+evil-resolve-vim-path-a' for details." If BANG is non-nil, open compilation output in a comint buffer. This command understands vim file modifiers (like %:p:h). See -`+evil-resolve-vim-path-a' for details." +`+evil-replace-filename-modifiers-a' for details." (interactive "") (compile (evil-ex-replace-special-filenames (format "%s %s" diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 3dfb39fd3..358e0cb1f 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -159,7 +159,7 @@ directives. By default, this only recognizes C directives.") ;; monkey patch `evil-ex-replace-special-filenames' to improve support for ;; file modifiers like %:p:h. This adds support for most of vim's modifiers, ;; and one custom one: %:P (expand to the project root). - (advice-add #'evil-ex-replace-special-filenames :override #'+evil-resolve-vim-path-a) + (advice-add #'evil-ex-replace-special-filenames :override #'+evil-replace-filename-modifiers-a) ;; make `try-expand-dabbrev' (from `hippie-expand') work in minibuffer (add-hook 'minibuffer-inactive-mode-hook #'+evil--fix-dabbrev-in-minibuffer-h) diff --git a/modules/editor/evil/test/test-evil.el b/modules/editor/evil/test/test-evil.el index dd77fd0f4..3b77c9cc3 100644 --- a/modules/editor/evil/test/test-evil.el +++ b/modules/editor/evil/test/test-evil.el @@ -9,10 +9,10 @@ (load! "../autoload/evil") (before-each - (fset 'resv #'+evil-resolve-vim-path-a) + (fset 'resv #'+evil-replace-filename-modifiers-a) (spy-on 'doom-project-root :and-call-fake (lambda () project-root))) - ;; `evil-ex-replace-special-filenames' / `+evil-resolve-vim-path-a' + ;; `evil-ex-replace-special-filenames' / `+evil-replace-filename-modifiers-a' (describe "file modifiers" (it "supports basic vim file modifiers" (let ((buffer-file-name "~/.emacs.d/test/modules/feature/test-evil.el") diff --git a/modules/term/eshell/autoload/evil.el b/modules/term/eshell/autoload/evil.el index a3326e322..04e45d377 100644 --- a/modules/term/eshell/autoload/evil.el +++ b/modules/term/eshell/autoload/evil.el @@ -6,7 +6,7 @@ "TODO" (interactive "") (let ((buffer (+eshell-last-buffer)) - (command (+evil-resolve-vim-path-a command))) + (command (+evil-replace-filename-modifiers-a command))) (cond (buffer (select-window (get-buffer-window buffer)) (+eshell-run-command command buffer)) From 4d8ab273d54377977ead3b7acb540b8b5ebe3cbd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 04:46:05 -0400 Subject: [PATCH 103/229] Remove duplicate latex entry in docs/modules.org --- docs/modules.org | 3 +-- modules/lang/latex/config.el | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index cedcf262a..cd5b7e282 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -116,8 +116,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia =+lsp= - TODO + kotlin =+lsp+= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex +lsp= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex +fold= - TODO ++ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex +fold +lsp= - TODO + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO + lua =+moonscript= - TODO diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 680778f4d..31227ae65 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -221,5 +221,6 @@ is mostly for \\section etc." :init (add-to-list '+latex--company-backends #'+latex-symbols-company-backend nil #'eq)) + ;; bibtex + reftex (load! "+ref") From b719f1917c7e74e5939cdad09ea243dce059bc77 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 04:48:24 -0400 Subject: [PATCH 104/229] Reflow long text in readme --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7b17fdb53..70afa116b 100644 --- a/README.md +++ b/README.md @@ -138,13 +138,15 @@ Doom is an active and ongoing project. To make that development more transparent, its roadmap (and other concerns) are published across three github project boards and a newsletter: -+ [Development Roadmap](https://github.com/hlissner/doom-emacs/projects/3): roughly outlines our goals between release - milestones and their progress. -+ [Plugins under review](https://github.com/hlissner/doom-emacs/projects/2): lists plugins we are watching and - considering for inclusion, and what their status for inclusion is. Please - consult this list before requesting new packages/features. -+ [Upstream bugs](https://github.com/hlissner/doom-emacs/projects/5): lists issues that originate from elsewhere, and - whether or not we have local workarounds or temporary fixes for them. ++ [Development Roadmap](https://github.com/hlissner/doom-emacs/projects/3): + roughly outlines our goals between release milestones and their progress. ++ [Plugins under review](https://github.com/hlissner/doom-emacs/projects/2): + lists plugins we are watching and considering for inclusion, and what their + status for inclusion is. Please consult this list before requesting new + packages/features. ++ [Upstream bugs](https://github.com/hlissner/doom-emacs/projects/5): lists + issues that originate from elsewhere, and whether or not we have local + workarounds or temporary fixes for them. + ~~Doom's newsletter~~ (not finished) will contain changelogs in between releases. @@ -192,7 +194,8 @@ kind! + I :heart: pull requests and bug reports (see the [Contributing Guidelines][contribute])! -+ Don't hesitate to [tell me my Elisp-fu sucks](https://github.com/hlissner/doom-emacs/issues/new), but please tell me ++ Don't hesitate to [tell me my Elisp-fu + sucks](https://github.com/hlissner/doom-emacs/issues/new), but please tell me why. + Hop on [our Discord server][Discord] and say hi! Help others, hang out or talk to me about Emacs, gamedev, programming, physics, pixel art, anime, gaming -- From 0bb2dc129a6700bacdddf945779354d6d8eecd52 Mon Sep 17 00:00:00 2001 From: tecosaur Date: Sun, 26 Apr 2020 17:47:43 +0800 Subject: [PATCH 105/229] Oooops, I did a boo-boo Abbrev-mode betrayed me :( for that you get two commits for the price of one. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70afa116b..a5df26390 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ mysterious errors. When you do, here are some places you can look for help: + [This answer][change-font] shows you how to change the default font. + Your issue may be documented in the [FAQ]. + With Emacs built-in help system documentation is a keystroke away: - + For functions: SPC h for or C-h f + + For functions: SPC h f or C-h f + For variables: SPC h v or C-h v + For a keybind: SPC h k or C-h k + To search available keybinds: SPC h b b or C-h b b From 3f6cf65c148209595a14d552a5d7631c62c4bfc2 Mon Sep 17 00:00:00 2001 From: Axel Soll Date: Sun, 26 Apr 2020 21:51:01 +0200 Subject: [PATCH 106/229] Add .jinja2 file extension to supported web files. (#2977) --- modules/lang/web/+html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index 345521889..150b5a655 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -12,7 +12,7 @@ :mode "\\.svelte\\'" :mode "\\.vue\\'" :mode "\\.twig\\'" - :mode "\\.jinja\\'" + :mode "\\.jinja2?\\'" :mode "wp-content/themes/.+/.+\\.php\\'" :mode "templates/.+\\.php\\'" ;; REVIEW We associate TSX files with `web-mode' because `typescript-mode' From 681851dd85a2d3dbe821830be38ee0148f43eeff Mon Sep 17 00:00:00 2001 From: Gennady Uraltsev Date: Sun, 26 Apr 2020 16:52:05 -0400 Subject: [PATCH 107/229] Make rg --path-separator argument work under Windows --- modules/completion/ivy/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index db5baab53..73276413f 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -265,7 +265,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (append (list "rg" "--files" "--color=never" "--hidden" "--no-messages") (cl-loop for dir in projectile-globally-ignored-directories collect "--glob" and collect (concat "!" dir)) - (if IS-WINDOWS (list "--path-separator /")))) + (if IS-WINDOWS (list "--path-separator" "/")))) ((cons find-program args))) (unless (listp args) (user-error "`counsel-file-jump-args' is a list now, please customize accordingly.")) From a21b6d35a4587a2329ff276088cd6d6e935eb081 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 14:03:33 -0400 Subject: [PATCH 108/229] Make C-` & C-~ available outside of normal mode --- modules/config/default/+evil-bindings.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 56d61bf54..96c800365 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -194,9 +194,9 @@ ;;; :ui (map! (:when (featurep! :ui popup) - :n "C-`" #'+popup/toggle - :n "C-~" #'+popup/raise - :g "C-x p" #'+popup/other) + "C-`" #'+popup/toggle + "C-~" #'+popup/raise + "C-x p" #'+popup/other) (:when (featurep! :ui workspaces) :n "C-t" #'+workspace/new From 9509897db1825360c14790eb4cafd323a4335852 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 16:50:26 -0400 Subject: [PATCH 109/229] dumb-jump-prefer-searcher = rg --- modules/tools/lookup/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index a186ed10c..6381956a2 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -104,6 +104,7 @@ Dictionary.app behind the scenes to get definitions.") :commands dumb-jump-result-follow :config (setq dumb-jump-default-project doom-emacs-dir + dumb-jump-prefer-searcher 'rg dumb-jump-aggressive nil dumb-jump-selector (cond ((featurep! :completion ivy) 'ivy) From d6c5d18a87829846cafa917ae80669bea2c7f508 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Apr 2020 20:26:38 -0400 Subject: [PATCH 110/229] Bump to emacs-straight/org-mode@3106837 From emacs-straight/org-mode@14d6f95 Fixes void-function org-get-outline-path when invoking eldoc, because org-get-outline-path was moved to org-refile in a recent refactor upstream. --- modules/lang/org/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 290071e58..07fc7a7cf 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -27,7 +27,7 @@ :recipe (:host github :repo "emacs-straight/org-mode" :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) - :pin "14d6f95bec") + :pin "31068373dc") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) From 64f15bfe3cbbe3281d9c1c0a23813f643c3347c0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 00:07:49 -0400 Subject: [PATCH 111/229] Fix getting started link in readme --- README.md | 5 +++-- modules/config/default/+evil-bindings.el | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a5df26390..755b648e6 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,8 @@ git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d ~/.emacs.d/bin/doom install ``` -Then [read our Getting Started guide][documentation] to be walked through -setting up, configuring and maintaining Doom Emacs. +Then [read our Getting Started guide][getting-started] to be walked through +installing, configuring and maintaining Doom Emacs. It's a good idea to add `~/.emacs.d/bin` to your `PATH`! Other `bin/doom` commands you should know about: @@ -219,6 +219,7 @@ kind! [discord]: https://discord.gg/qvGgnVx [documentation]: docs/index.org [faq]: docs/faq.org +[getting-started]: docs/getting_started.org [install]: docs/getting_started.org#install [backtrace]: docs/getting_started.org#how-to-extract-a-backtrace-from-an-error [configuration]: docs/getting_started.org#configuring-doom diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 96c800365..8b8c9434b 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -4,7 +4,7 @@ ;; NOTE SPC u replaces C-u as the universal argument. ;; Minibuffer - (define-key! evil-ex-completion-map + (define-key! :keymaps '(evil-ex-completion-map evil-ex-search-keymap) "C-a" #'evil-beginning-of-line "C-b" #'evil-backward-char "C-f" #'evil-forward-char From c1127a5bde1779a98749bd63b8d6df345d7e7d6b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 01:42:31 -0400 Subject: [PATCH 112/229] Rewrite move/copy/delete file commands To use rename-file, copy-file and delete-file, so these commands can enjoy the benefits of any plugins that have advised these, like org-roam does for rename-file. --- core/autoload/files.el | 169 +++++++++++--------------- modules/editor/evil/autoload/files.el | 4 +- 2 files changed, 71 insertions(+), 102 deletions(-) diff --git a/core/autoload/files.el b/core/autoload/files.el index 65d0a6639..b62925d43 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -203,52 +203,29 @@ single file or nested compound statement of `and' and `or' statements." ;; ;;; Helpers -(defun doom--forget-file (path) - "Ensure `recentf', `projectile' and `save-place' forget OLD-PATH." - (when (bound-and-true-p recentf-mode) - (recentf-remove-if-non-kept path)) - (when (and (bound-and-true-p projectile-mode) - (doom-project-p) - (projectile-file-cached-p path (doom-project-root))) - (projectile-purge-file-from-cache path)) - (when (bound-and-true-p save-place-mode) - (save-place-forget-unreadable-files))) - -(defun doom--update-file (path) - (when (featurep 'vc) - (vc-file-clearprops path) - (vc-resynch-buffer path nil t)) - (when (featurep 'magit) - (when-let (default-directory (magit-toplevel (file-name-directory path))) - (magit-refresh)))) - -(defun doom--copy-file (old-path new-path &optional force-p) - (let* ((new-path (expand-file-name new-path)) - (old-path (file-truename old-path)) - (new-path (apply #'expand-file-name - (if (or (directory-name-p new-path) - (file-directory-p new-path)) - (list (file-name-nondirectory old-path) new-path) - (list new-path)))) - (new-path-dir (file-name-directory new-path)) - (project-root (doom-project-root)) - (short-new-name (if (and project-root (file-in-directory-p new-path project-root)) - (file-relative-name new-path project-root) - (abbreviate-file-name new-path)))) - (unless (file-directory-p new-path-dir) - (make-directory new-path-dir t)) - (when (buffer-modified-p) - (save-buffer)) - (cond ((file-equal-p old-path new-path) - (throw 'status 'overwrite-self)) - ((and (file-exists-p new-path) - (not force-p) - (not (y-or-n-p (format "File already exists at %s, overwrite?" short-new-name)))) - (throw 'status 'aborted)) - ((file-exists-p old-path) - (copy-file old-path new-path t) - short-new-name) - (short-new-name)))) +(defun doom--update-files (&rest files) + "Ensure FILES are updated in `recentf', `magit' and `save-place'." + (let (toplevels) + (dolist (file files) + (when (featurep 'vc) + (vc-file-clearprops file) + (when-let (buffer (get-file-buffer file)) + (with-current-buffer buffer + (vc-refresh-state)))) + (when (featurep 'magit) + (when-let (default-directory (magit-toplevel (file-name-directory file))) + (cl-pushnew default-directory toplevels))) + (unless (file-readable-p file) + (when (bound-and-true-p recentf-mode) + (recentf-remove-if-non-kept file)) + (when (and (bound-and-true-p projectile-mode) + (doom-project-p) + (projectile-file-cached-p file (doom-project-root))) + (projectile-purge-file-from-cache file)))) + (dolist (default-directory toplevels) + (magit-refresh)) + (when (bound-and-true-p save-place-mode) + (save-place-forget-unreadable-files)))) ;; @@ -256,73 +233,67 @@ single file or nested compound statement of `and' and `or' statements." ;;;###autoload (defun doom/delete-this-file (&optional path force-p) - "Delete FILENAME (defaults to the file associated with current buffer) and -kills the buffer. If FORCE-P, force the deletion (don't ask for confirmation)." + "Delete PATH, kill its buffers and expunge it from vc/magit cache. + +If PATH is not specified, default to the current buffer's file. + +If FORCE-P, delete without confirmation." (interactive - (list (file-truename (buffer-file-name)) + (list (buffer-file-name (buffer-base-buffer)) current-prefix-arg)) - (let* ((fbase (file-name-sans-extension (file-name-nondirectory path))) - (buf (current-buffer))) - (cond ((not (file-exists-p path)) - (error "File doesn't exist: %s" path)) - ((not (or force-p (y-or-n-p (format "Really delete %s?" fbase)))) - (message "Aborted") - nil) - ((unwind-protect - (progn (delete-file path) t) - (let ((short-path (file-relative-name path (doom-project-root)))) - (if (file-exists-p path) - (error "Failed to delete %s" short-path) - ;; Ensures that windows displaying this buffer will be switched - ;; to real buffers (`doom-real-buffer-p') - (doom/kill-this-buffer-in-all-windows buf t) - (doom--forget-file path) - (doom--update-file path) - (message "Successfully deleted %s" short-path)))))))) + (let* ((path (or path (buffer-file-name (buffer-base-buffer)))) + (short-path (abbreviate-file-name path))) + (unless (and path (file-exists-p path)) + (user-error "Buffer is not visiting any file")) + (unless (file-exists-p path) + (error "File doesn't exist: %s" path)) + (unless (or force-p (y-or-n-p (format "Really delete %S?" short-path))) + (user-error "Aborted")) + (let ((buf (current-buffer))) + (unwind-protect + (progn (delete-file path) t) + (if (file-exists-p path) + (error "Failed to delete %S" short-path) + ;; Ensures that windows displaying this buffer will be switched to + ;; real buffers (`doom-real-buffer-p') + (doom/kill-this-buffer-in-all-windows buf t) + (doom--update-files path) + (message "Deleted %S" short-path)))))) ;;;###autoload (defun doom/copy-this-file (new-path &optional force-p) - "Copy current buffer's file to NEW-PATH. If FORCE-P, overwrite the destination -file if it exists, without confirmation." + "Copy current buffer's file to NEW-PATH. + +If FORCE-P, overwrite the destination file if it exists, without confirmation." (interactive (list (read-file-name "Copy file to: ") current-prefix-arg)) - (pcase (catch 'status - (when-let (dest (doom--copy-file (buffer-file-name) new-path force-p)) - (doom--update-file new-path) - (message "File successfully copied to %s" dest))) - (`overwrite-self (error "Cannot overwrite self")) - (`aborted (message "Aborted")) - (_ t))) + (unless (and buffer-file-name (file-exists-p buffer-file-name)) + (user-error "Buffer is not visiting any file")) + (let ((old-path (buffer-file-name (buffer-base-buffer))) + (new-path (expand-file-name new-path))) + (make-directory (file-name-directory new-path) 't) + (copy-file old-path new-path (or force-p 1)) + (doom--update-files old-path new-path) + (message "File copied to %S" (abbreviate-file-name new-path)))) ;;;###autoload (defun doom/move-this-file (new-path &optional force-p) - "Move current buffer's file to NEW-PATH. If FORCE-P, overwrite the destination -file if it exists, without confirmation." + "Move current buffer's file to NEW-PATH. + +If FORCE-P, overwrite the destination file if it exists, without confirmation." (interactive (list (read-file-name "Move file to: ") current-prefix-arg)) - (pcase (catch 'status - (let ((old-path (buffer-file-name)) - (new-path (expand-file-name new-path))) - (when-let (dest (doom--copy-file old-path new-path force-p)) - (doom--forget-file old-path) - (when (file-exists-p old-path) - (delete-file old-path)) - (mapc #'doom--update-file - (delq - nil (list (if (ignore-errors - (file-equal-p (doom-project-root old-path) - (doom-project-root new-path))) - nil - old-path) - new-path))) - (kill-current-buffer) - (find-file new-path) - (message "File successfully moved to %s" dest)))) - (`overwrite-self (error "Cannot overwrite self")) - (`aborted (message "Aborted")) - (_ t))) + (unless (and buffer-file-name (file-exists-p buffer-file-name)) + (user-error "Buffer is not visiting any file")) + (let ((old-path (buffer-file-name (buffer-base-buffer))) + (new-path (expand-file-name new-path))) + (make-directory (file-name-directory new-path) 't) + (rename-file old-path new-path (or force-p 1)) + (set-visited-file-name new-path t t) + (doom--update-files old-path new-path) + (message "File moved to %S" (abbreviate-file-name new-path)))) (defun doom--sudo-file-path (file) (let ((host (or (file-remote-p file 'host) "localhost"))) diff --git a/modules/editor/evil/autoload/files.el b/modules/editor/evil/autoload/files.el index ac3daed1b..93de22915 100644 --- a/modules/editor/evil/autoload/files.el +++ b/modules/editor/evil/autoload/files.el @@ -6,8 +6,7 @@ kills the buffer. If FORCE-P, force the deletion (don't ask for confirmation)." :repeat nil (interactive "") - (doom/delete-this-file (or filename (file-truename buffer-file-name)) - force-p)) + (doom/delete-this-file filename force-p)) ;;;###autoload (autoload '+evil:move-this-file "editor/evil/autoload/files" nil t) (evil-define-command +evil:move-this-file (new-path &optional force-p) @@ -30,4 +29,3 @@ overwrite the destination file if it exists, without confirmation." (when (or (not new-path) (string-empty-p new-path)) (user-error "No new path was specified")) (doom/copy-this-file new-path force-p)) - From 01ab30adeb5d975d36d8d960cd1bb3d99dc54180 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 01:43:51 -0400 Subject: [PATCH 113/229] Flip C-f/C-b and M-f/M-b back to their defaults To stay consistent with Emacs' keybinds. --- modules/config/default/+evil-bindings.el | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 8b8c9434b..b3ab8da21 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -22,10 +22,6 @@ (when (featurep! :editor evil +everywhere) (define-key! :keymaps +default-minibuffer-maps - "C-f" #'forward-word - "C-b" #'backward-word - "M-f" #'forward-char - "M-b" #'backward-char "C-j" #'next-line "C-k" #'previous-line "C-S-j" #'scroll-up-command From c601382a5525e10a6542257caefa973af2b01b7c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 02:12:47 -0400 Subject: [PATCH 114/229] Add EMACS28+ const --- core/core.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core.el b/core/core.el index f25296992..7d0596ba7 100644 --- a/core/core.el +++ b/core/core.el @@ -8,6 +8,7 @@ "Current version of Doom Emacs.") (defconst EMACS27+ (> emacs-major-version 26)) +(defconst EMACS28+ (> emacs-major-version 27)) (defconst IS-MAC (eq system-type 'darwin)) (defconst IS-LINUX (eq system-type 'gnu/linux)) (defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos))) From 019e988b8dcc40be516f3cfe47bd4839f6d99fe4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 13:33:00 -0400 Subject: [PATCH 115/229] org-roam-graph-show -> org-roam-graph org-roam-graph-show is deprecated Closes #2987 --- modules/config/default/+emacs-bindings.el | 2 +- modules/config/default/+evil-bindings.el | 2 +- modules/lang/org/contrib/roam.el | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index f059cefce..fc8b67fe2 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -157,7 +157,7 @@ :desc "Switch to buffer" "b" #'org-roam-switch-to-buffer :desc "Org Roam Capture" "c" #'org-roam-capture :desc "Find file" "f" #'org-roam-find-file - :desc "Show graph" "g" #'org-roam-graph-show + :desc "Show graph" "g" #'org-roam-graph :desc "Insert" "i" #'org-roam-insert :desc "Org Roam" "r" #'org-roam (:prefix ("d" . "by date") diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index b3ab8da21..52df2ec1b 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -490,7 +490,7 @@ :desc "Switch to buffer" "b" #'org-roam-switch-to-buffer :desc "Org Roam Capture" "c" #'org-roam-capture :desc "Find file" "f" #'org-roam-find-file - :desc "Show graph" "g" #'org-roam-graph-show + :desc "Show graph" "g" #'org-roam-graph :desc "Insert" "i" #'org-roam-insert :desc "Org Roam" "r" #'org-roam (:prefix ("d" . "by date") diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index 83f8c0bb9..064f342d1 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -13,7 +13,7 @@ :hook (org-roam-backlinks-mode . turn-on-visual-line-mode) :commands (org-roam-buffer-toggle-display org-roam-find-file - org-roam-graph-show + org-roam-graph org-roam-insert org-roam-switch-to-buffer org-roam-dailies-date @@ -31,7 +31,7 @@ :prefix ("m" . "org-roam") "b" #'org-roam-switch-to-buffer "f" #'org-roam-find-file - "g" #'org-roam-graph-show + "g" #'org-roam-graph "i" #'org-roam-insert "m" #'org-roam (:prefix ("d" . "by date") From b681940cceeb0749aead6d2b6a8bdca7122f0db8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 14:08:36 -0400 Subject: [PATCH 116/229] Prevent 'cannot find file: mu4e-meta' error For users with older versions of mu4e installed. --- modules/email/mu4e/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 9b496e70c..54c5efb61 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -14,8 +14,8 @@ :commands mu4e mu4e-compose-new :init (provide 'html2text) ; disable obsolete package - (require 'mu4e-meta) - (when (version< mu4e-mu-version "1.4") + (when (or (not (require 'mu4e-meta nil t)) + (version< mu4e-mu-version "1.4")) (setq mu4e-maildir "~/.mail" mu4e-user-mail-address-list nil)) (setq mu4e-attachment-dir "~/.mail/.attachments") From 0c80ba122174a29b4df722c0d98d136728739187 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 14:09:06 -0400 Subject: [PATCH 117/229] Update plugin list in email/mu4e readme --- modules/email/mu4e/README.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/email/mu4e/README.org b/modules/email/mu4e/README.org index 0001c53c2..93f2ab37c 100644 --- a/modules/email/mu4e/README.org +++ b/modules/email/mu4e/README.org @@ -38,13 +38,13 @@ via IMAP) and ~mu~ (to index my mail into a format ~mu4e~ can understand). + ~+gmail~ Enables gmail-specific configuration. ** Plugins -+ [[https://github.com/agpchil/mu4e-maildirs-extension][mu4e-maildirs-extension]] +This module install no plugins. * Prerequisites This module requires: + Either ~mbsync~ (default) or ~offlineimap~ (to sync mail with) -+ ~mu~ (to index your downloaded messages) ++ ~mu~, to index your downloaded messages and to provide the ~mu4e~ package. ** MacOS #+BEGIN_SRC sh From e9b288744d41e152cee5ee2b1444e01cce2ce588 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 16:32:21 -0400 Subject: [PATCH 118/229] Support evil-collection-setup-minibuffer --- modules/editor/evil/init.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/editor/evil/init.el b/modules/editor/evil/init.el index 1674bceb4..439082071 100644 --- a/modules/editor/evil/init.el +++ b/modules/editor/evil/init.el @@ -258,6 +258,9 @@ and complains if a module is loaded too early (during startup)." (+evil-collection-init 'elisp-mode)) (add-transient-hook! 'occur-mode (+evil-collection-init '(occur replace))) + (add-transient-hook! 'minibuffer-setup-hook + (when evil-collection-setup-minibuffer + (+evil-collection-init 'minibuffer))) ;; HACK Do this ourselves because evil-collection break's `eval-after-load' ;; load order by loading their target plugin before applying keys. This From 9acba6b269a936921ef05be358c0a2bc3b6fac75 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 17:27:32 -0400 Subject: [PATCH 119/229] Speed up project root detection by resolving it less often Projectile can consume a lot of cycles, especially in indirect buffers or because of project-root-sensitive path segments in the modeline. This experimental fix should spare you that heartache. --- core/core-projects.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/core-projects.el b/core/core-projects.el index daca64c3a..ebb8d803e 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -40,6 +40,16 @@ Emacs.") :config (projectile-mode +1) + ;; REVIEW Resolve the project root once, when the file/buffer is opened. This + ;; speeds up projectile's project root resolution by leaps, but does + ;; put you at risk of having a stale project root. + (setq-hook! '(after-change-major-mode-hook + ;; In case the user saves the file to a new location + after-save-hook + ;; ...or makes external changes then returns to Emacs + focus-in-hook) + projectile-project-root (if default-directory (doom-project-root))) + ;; Projectile runs four functions to determine the root (in this order): ;; ;; + `projectile-root-local' -> checks the `projectile-project-root' variable From 3e67f8f801a1bc4e0553546cc8f9a63c30e8c9f0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 17:30:23 -0400 Subject: [PATCH 120/229] Fix C-{S,M}-RET in tty Emacs --- modules/lang/org/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 86fc7beb9..587f6ed57 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -575,6 +575,9 @@ between the two." "C-c C-S-l" #'+org/remove-link "C-c C-i" #'org-toggle-inline-images ;; textmate-esque newline insertion + "C-RET" #'+org/insert-item-below + "C-S-RET" #'+org/insert-item-above + "C-M-RET" #'org-insert-subheading [C-return] #'+org/insert-item-below [C-S-return] #'+org/insert-item-above [C-M-return] #'org-insert-subheading From 82f9dc2566b00d10adacba8de60892e37ab11940 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Apr 2020 17:43:29 -0400 Subject: [PATCH 121/229] Fix #2972: infinite recursion in org src blocks --- modules/lang/org/config.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 587f6ed57..4a2b58faa 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -168,12 +168,17 @@ This forces it to read the background before rendering." ("HOLD" . +org-todo-onhold) ("PROJ" . +org-todo-project))) - (defadvice! +org-display-link-in-eldoc-a (orig-fn &rest args) + (after! org-eldoc + ;; HACK Fix #2972: infinite recursion when eldoc kicks in in an 'org' src + ;; block. + ;; TODO Should be reported upstream! + (puthash "org" "ignore" org-eldoc-local-functions-cache)) + + (defadvice! +org-display-link-in-eldoc-a (&rest args) "Display full link in minibuffer when cursor/mouse is over it." - :around #'org-eldoc-documentation-function - (or (when-let (link (org-element-property :raw-link (org-element-context))) - (format "Link: %s" link)) - (apply orig-fn args))) + :before-until #'org-eldoc-documentation-function + (when-let (link (org-element-property :raw-link (org-element-context))) + (format "Link: %s" link))) ;; Automatic indent detection in org files is meaningless (add-to-list 'doom-detect-indentation-excluded-modes 'org-mode) From d95d63da934d4d7781a51acc08841eabb70f82f8 Mon Sep 17 00:00:00 2001 From: James Ravn Date: Tue, 28 Apr 2020 11:22:43 +0100 Subject: [PATCH 122/229] Fix langtool config for Linux Fixes https://github.com/hlissner/doom-emacs/issues/2072. I have left the mac portion alone as I don't have a mac handy to test this. --- modules/checkers/grammar/config.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/checkers/grammar/config.el b/modules/checkers/grammar/config.el index 58a505fb5..f972eaa61 100644 --- a/modules/checkers/grammar/config.el +++ b/modules/checkers/grammar/config.el @@ -8,15 +8,16 @@ :init (setq langtool-default-language "en-US") :config (unless (or langtool-bin - langtool-language-tool-jar) - (setq langtool-language-tool-jar - (cond (IS-MAC + langtool-language-tool-jar + langtool-java-classpath) + (cond (IS-MAC + (setq langtool-language-tool-jar (locate-file "libexec/languagetool-commandline.jar" (doom-files-in "/usr/local/Cellar/languagetool" :type 'dirs - :depth 2))) - (IS-LINUX - "/usr/share/java/languagetool/languagetool-commandline.jar"))))) + :depth 2)))) + (IS-LINUX + (setq langtool-java-classpath "/usr/share/languagetool:/usr/share/java/languagetool/*"))))) ;; Detects weasel words, passive voice and duplicates. Proselint would be a From d34633cb0ab737602c1ced0edb58779f1014d7d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Apr 2020 14:39:10 -0400 Subject: [PATCH 123/229] Bump to emacs-straight/org-mode@e68ae40 From emacs-straight/org-mode@3106837 Fixes #2993 --- modules/lang/org/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 07fc7a7cf..4d3996a18 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -27,7 +27,7 @@ :recipe (:host github :repo "emacs-straight/org-mode" :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) - :pin "31068373dc") + :pin "e68ae40bdb") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) From 6e8487e1d4f55d8c21ce6bafb2c028b705523b74 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Apr 2020 15:10:59 -0400 Subject: [PATCH 124/229] Fix #2992: wrong-type-arg stringp on switch-to-buffer (switch-to-buffer nil) should switch to other-buffer, as per its documentation, which was not respected by our switch-buffer hook mechanism. --- core/core-ui.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index 6ff9e85ba..b742d97e2 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -105,7 +105,10 @@ size.") (defun doom-run-switch-buffer-hooks-a (orig-fn buffer-or-name &rest args) (let ((gc-cons-threshold most-positive-fixnum)) (if (or doom-inhibit-switch-buffer-hooks - (eq (current-buffer) (get-buffer buffer-or-name)) + (eq (current-buffer) + (get-buffer (or buffer-or-name + (if (eq orig-fn #'switch-to-buffer) + (other-buffer))))) (and (eq orig-fn #'switch-to-buffer) (car args))) (apply orig-fn buffer-or-name args) (let ((doom-inhibit-switch-buffer-hooks t) From bd58f0ae7169fbdf9c432e4cf02dd42198c7f0b6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Apr 2020 17:29:11 -0400 Subject: [PATCH 125/229] Fix #2995: doom-modeline save icon & ligature conflict There is no good solution to this. I've decided the ligatures should lose a character, instead of the modeline losing an icon. --- modules/ui/pretty-code/+fira.el | 2 ++ modules/ui/pretty-code/+iosevka.el | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/ui/pretty-code/+fira.el b/modules/ui/pretty-code/+fira.el index f1983a99d..99e9a6d08 100644 --- a/modules/ui/pretty-code/+fira.el +++ b/modules/ui/pretty-code/+fira.el @@ -119,6 +119,8 @@ (defun +pretty-code-setup-fira-ligatures-h () (set-fontset-font t '(#Xe100 . #Xe16f) +pretty-code-fira-code-font-name) + (when (featurep 'doom-modeline) + (set-fontset-font t #Xe161 nil)) (setq-default prettify-symbols-alist (append prettify-symbols-alist (mapcar #'+pretty-code--correct-symbol-bounds diff --git a/modules/ui/pretty-code/+iosevka.el b/modules/ui/pretty-code/+iosevka.el index 315dbd754..35c62c0ce 100644 --- a/modules/ui/pretty-code/+iosevka.el +++ b/modules/ui/pretty-code/+iosevka.el @@ -225,6 +225,8 @@ (defun +pretty-code-setup-iosevka-ligatures-h () (set-fontset-font t '(#Xe100 . #Xe1cc) +pretty-code-iosevka-font-name) + (when (featurep 'doom-modeline) + (set-fontset-font t #Xe161 nil)) (setq-default prettify-symbols-alist (append prettify-symbols-alist +pretty-code-iosevka-font-ligatures))) From 0e50db55a006803cd91484990f2993ffc0e46686 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Apr 2020 18:43:15 -0400 Subject: [PATCH 126/229] Fix #2972: infinite recursion in org + python src blocks --- modules/lang/org/config.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 4a2b58faa..a4c94cd0a 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -168,12 +168,6 @@ This forces it to read the background before rendering." ("HOLD" . +org-todo-onhold) ("PROJ" . +org-todo-project))) - (after! org-eldoc - ;; HACK Fix #2972: infinite recursion when eldoc kicks in in an 'org' src - ;; block. - ;; TODO Should be reported upstream! - (puthash "org" "ignore" org-eldoc-local-functions-cache)) - (defadvice! +org-display-link-in-eldoc-a (&rest args) "Display full link in minibuffer when cursor/mouse is over it." :before-until #'org-eldoc-documentation-function @@ -501,6 +495,13 @@ eldoc string." nil 'face `(:foreground ,(face-foreground face nil t) :weight bold))) width prefix separator)) + (after! org-eldoc + ;; HACK Fix #2972: infinite recursion when eldoc kicks in in 'org' or + ;; 'python' src blocks. + ;; TODO Should be reported upstream! + (puthash "org" #'ignore org-eldoc-local-functions-cache) + (puthash "python" #'python-eldoc-function org-eldoc-local-functions-cache)) + (defun +org--restart-mode-h () "Restart `org-mode', but only once." (quiet! (org-mode-restart)) From 6d8811d70cd01ab0098402e427ce1176a3098aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Schwanck?= Date: Tue, 28 Apr 2020 19:58:11 -0300 Subject: [PATCH 127/229] Add Rails Server and console to buffer list --- modules/lang/ruby/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index 0abd0522a..0011b23e7 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -172,7 +172,8 @@ (use-package! projectile-rails :when (featurep! +rails) - :hook ((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode) + :hook (((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode) + ((inf-ruby-mode projectile-rails-server-mode) . doom-mark-buffer-as-real-h)) :init (setq inf-ruby-console-environment "development") (when (featurep! :lang web) From 8cc8033a06594e65b16b4ea72543d4887572c47a Mon Sep 17 00:00:00 2001 From: fabio-oesch Date: Wed, 29 Apr 2020 06:05:13 +0200 Subject: [PATCH 128/229] First draft for java documentation (#2713) * Added template and description for module flags Because +lsp and +meghanada are mutually exclusive I thought I would create a separate section for each feature and add descriptions what they each offer. So far only +lsp is done. * First draft for java documentation The second plugin +meghanada is explained as well as some instructions how to install JDK 11 and OpenJDK 11. * Do requested edits to README * Regenerate TOC in readme * Reformat README Co-authored-by: Henrik Lissner --- modules/lang/java/README.org | 114 +++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 modules/lang/java/README.org diff --git a/modules/lang/java/README.org b/modules/lang/java/README.org new file mode 100644 index 000000000..eb4b69098 --- /dev/null +++ b/modules/lang/java/README.org @@ -0,0 +1,114 @@ +#+TITLE: lang/java +#+DATE: January 16, 2017 +#+SINCE: v1.3 +#+STARTUP: inlineimages + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#module-flags][Module Flags]] +- [[#prerequisites][Prerequisites]] + - [[#openjdk-11][OpenJDK 11]] + - [[#ubuntu][Ubuntu]] + - [[#fedora][Fedora]] + - [[#oracle-jdk-11][Oracle JDK 11]] + - [[#ubuntu-1][Ubuntu]] + - [[#fedora-1][Fedora]] +- [[#features][Features]] + - [[#lsp-features][=+lsp= features]] + - [[#meghanada-features][=+meghanada= features]] +- [[#configuration][Configuration]] + +* Description +This module adds [[https://www.java.com][java]] support to Doom Emacs, including =android-mode= and +=groovy-mode=. + +** Module Flags ++ =+lsp= Enables integration for the eclipse.jdt.ls LSP server. ++ =+meghanada= Enables the [[https://github.com/mopemope/meghanada-emacs/tree/master][meghanada-mode]] + +The =+lsp= and =+meghanada= packages are mutually exclusive and do not work +together. At the time of writing the =+meghanada= is already configured whereas +=+lsp= needs to manual configuring. + +* Prerequisites +This module requires the Java SDK. + +** OpenJDK 11 +*** Ubuntu +#+BEGIN_SRC sh +sudo apt-get install openjdk-11-jdk-headless +#+END_SRC +*** Fedora +#+BEGIN_SRC sh +sudo dnf install java-11-openjdk +#+END_SRC + +** Oracle JDK 11 +*** Ubuntu +#+BEGIN_SRC sh +sudo add-apt-repository ppa:linuxuprising/java +sudo apt update +sudo apt install oracle-java11-installer +sudo apt install oracle-java11-set-default +#+END_SRC +*** Fedora +#+BEGIN_SRC sh +curl -O https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz +tar zxvf openjdk-11.0.2_linux-x64_bin.tar.gz +sudo mv jdk-11.0.2/ /usr/local/ +#+END_SRC + +Open =/etc/profile.d/jdk11.sh= as root and add + +#+BEGIN_SRC sh +export JAVA_HOME=/usr/local/jdk-11.0.2 +export PATH=$PATH:$JAVA_HOME/bin +#+END_SRC + +Save the file and source the file + +#+BEGIN_SRC sh +source /etc/profile.d/jdk11.sh +java -version +#+END_SRC + +* Features +** =+lsp= features +According to [[https://github.com/emacs-lsp/lsp-java]] it adds + ++ As you type reporting of parsing and compilation errors (via flycheck/[[https://github.com/emacs-lsp/lsp-ui][lsp-ui]]) ++ Code completion - using [[https://github.com/tigersoldier/company-lsp][company-lsp]] or builtin complete-at-point ++ Javadoc hovers - using [[https://github.com/emacs-lsp/lsp-ui][lsp-ui]] ++ Code actions - using [[https://github.com/emacs-lsp/lsp-ui][lsp-ui]] ++ Code outline - using builtin [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Imenu.html][imenu]] ++ Code navigation - using builtin [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Xref.html][xref]] ++ Code lens (references/implementations) - using builtin [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Xref.html][xref]] ++ Highlights ++ Code formatting ++ Maven pom.xml project support ++ Limited Gradle support ++ Visual debugger - [[https://github.com/yyoncho/dap-mode/][dap-mode]] ++ Test runner - [[https://github.com/yyoncho/dap-mode/][dap-mode]] ++ Project explorer integration - [[https://github.com/Alexander-Miller/treemacs][treemacs]] ++ Integration with [[https://start.spring.io/][Spring Initializr]] + +** =+meghanada= features +According to [[https://github.com/mopemope/meghanada-emacs/]] it adds + ++ Auto-update server module ++ [[https://gradle.org/][Gradle]] and [[http://maven.apache.org/][Maven]] and Eclipse project support ++ No need build tool's plugin ++ Run build tool task ++ Compile your project ++ Syntax check and analyze java source (=flycheck-meghanada=) ++ Support =Generic Types= ++ Code completion with [[http://company-mode.github.io/][company-mode]] (=company-meghanada=) ++ Optimize import and sort ++ Jump declaration ++ Run [[http://www.junit.org/][JUnit]] test (include test runner) ++ Diagnostic reporting with [[http://flycheck.org/][flycheck]] (=flycheck-meghanada=) ++ Show symbol's type info with =el-doc= ++ Search references ++ Full-featured text search + +* TODO Configuration From 7a73bb7ce7caa0408b64bb0f6181117d0aeb043f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 00:09:12 -0400 Subject: [PATCH 129/229] Refactor ruby hooks --- modules/lang/ruby/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index 0011b23e7..125891497 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -22,6 +22,7 @@ (add-hook 'ruby-mode-local-vars-hook #'lsp!)) (after! inf-ruby + (add-hook 'inf-ruby-mode-hook #'doom-mark-buffer-as-real-h) ;; switch to inf-ruby from compile if we detect a breakpoint has been hit (add-hook 'compilation-filter-hook #'inf-ruby-auto-enter)) @@ -172,8 +173,8 @@ (use-package! projectile-rails :when (featurep! +rails) - :hook (((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode) - ((inf-ruby-mode projectile-rails-server-mode) . doom-mark-buffer-as-real-h)) + :hook ((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode) + :hook (projectile-rails-server-mode . doom-mark-buffer-as-real-h) :init (setq inf-ruby-console-environment "development") (when (featurep! :lang web) From 2deaafd03a2db42f02721ee173a89c7867b05664 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 00:20:01 -0400 Subject: [PATCH 130/229] Fix #2990: C-j/C-k in minibuffer w/ evil-collection --- modules/config/default/+evil-bindings.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 52df2ec1b..dd8b05c76 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -26,6 +26,9 @@ "C-k" #'previous-line "C-S-j" #'scroll-up-command "C-S-k" #'scroll-down-command) + (define-key! :states 'insert :keymaps +default-minibuffer-maps + "C-j" #'next-line + "C-k" #'previous-line) (define-key! read-expression-map "C-j" #'next-line-or-history-element "C-k" #'previous-line-or-history-element))) From aca1599a814c97bf3e9af9df3a17d6a5d482d458 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 00:29:17 -0400 Subject: [PATCH 131/229] Only resolve package :local-repo if relative path exists This allows you to specify a :local-repo relative to the directory your packages.el is in. If it doesn't exist, it'll assume you meant a directory in ~/.emacs.d/.local/straight/repos --- core/core-packages.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 416e0f2d0..1ad951a37 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -269,9 +269,13 @@ elsewhere." recipe ;; Expand :local-repo from current directory (when local-repo - (plist-put! plist :recipe - (plist-put recipe :local-repo - (expand-file-name local-repo ,(dir!))))))) + (plist-put! + plist :recipe + (plist-put recipe :local-repo + (let ((local-path (expand-file-name local-repo ,(dir!)))) + (if (file-directory-p local-path) + local-path + local-repo))))))) (error (signal 'doom-package-error (cons ,(symbol-name name) From c96bbf909cf717249d4d845a0d46d7571b4720be Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 00:33:54 -0400 Subject: [PATCH 132/229] Fix #2992: remove buffer-or-name check in switch-buffer executor --- core/core-ui.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index b742d97e2..5fca2c031 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -105,10 +105,9 @@ size.") (defun doom-run-switch-buffer-hooks-a (orig-fn buffer-or-name &rest args) (let ((gc-cons-threshold most-positive-fixnum)) (if (or doom-inhibit-switch-buffer-hooks - (eq (current-buffer) - (get-buffer (or buffer-or-name - (if (eq orig-fn #'switch-to-buffer) - (other-buffer))))) + (and buffer-or-name + (eq (current-buffer) + (get-buffer buffer-or-name))) (and (eq orig-fn #'switch-to-buffer) (car args))) (apply orig-fn buffer-or-name args) (let ((doom-inhibit-switch-buffer-hooks t) From 9788b1235ce4a74d303074ac88036715ac71de28 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 02:17:42 -0400 Subject: [PATCH 133/229] Disable jit-lock Deferred & stealth font-locking has produced a fair number of obscure bugs. It's just not worth the trouble. --- core/core.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/core.el b/core/core.el index 7d0596ba7..288013d96 100644 --- a/core/core.el +++ b/core/core.el @@ -274,11 +274,6 @@ users).") ;; quickly self-correct. (setq fast-but-imprecise-scrolling t) -;; Font locking is the source of much slowness in Emacs. jit-lock-mode tries to -;; defer fontification until the user is idle. This should help... in theory. -(setq jit-lock-defer-time 0 ; only defer while processing input - jit-lock-stealth-time 2) ; fontify the rest of the buffer after a delay - ;; Resizing the Emacs frame can be a terribly expensive part of changing the ;; font. By inhibiting this, we halve startup times, particularly when we use ;; fonts that are larger than the system default (which would resize the frame). From f28a972861bc0f471bd50d07b36582ba2622e892 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 02:42:45 -0400 Subject: [PATCH 134/229] Disable org-highlight-latex-and-related It is far too slow to enable by default. Fixes #2998 --- modules/lang/org/config.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index a4c94cd0a..ee71fb57d 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -120,9 +120,6 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default org-refile-use-outline-path 'file org-outline-path-complete-in-steps nil) - ;; Fontify latex blocks and entities, but not natively -- that's too slow - (setq org-highlight-latex-and-related '(latex script entities)) - (plist-put org-format-latex-options :scale 1.5) ; larger previews (add-hook! 'doom-load-theme-hook (defun +org-refresh-latex-background-h () From ae152a5924e8f795d6ac178e54ef72792dc63c29 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 03:41:09 -0400 Subject: [PATCH 135/229] Cache project root earlier So users can still change it with setq-hook! or their own hooks. --- core/core-projects.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-projects.el b/core/core-projects.el index ebb8d803e..1d0213667 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -43,7 +43,7 @@ Emacs.") ;; REVIEW Resolve the project root once, when the file/buffer is opened. This ;; speeds up projectile's project root resolution by leaps, but does ;; put you at risk of having a stale project root. - (setq-hook! '(after-change-major-mode-hook + (setq-hook! '(change-major-mode-after-body-hook ;; In case the user saves the file to a new location after-save-hook ;; ...or makes external changes then returns to Emacs From 5bc86de760ae184622610951dc7e565da6dc9d8f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 03:47:20 -0400 Subject: [PATCH 136/229] Remove goto-addr It's not essential and is redundant with `gf` and find-file-at-point, which already understand URLs at point. --- core/core-ui.el | 7 ------- 1 file changed, 7 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 5fca2c031..4ca55d8ec 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -412,13 +412,6 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (set-window-configuration doom--ediff-saved-wconf))))) -(use-package! goto-addr - :hook (text-mode . goto-address-mode) - :hook (prog-mode . goto-address-prog-mode) - :config - (define-key goto-address-highlight-keymap (kbd "RET") #'goto-address-at-point)) - - (use-package! hl-line ;; Highlights the current line :hook ((prog-mode text-mode conf-mode special-mode) . hl-line-mode) From 84a179592da85ef63d0ba50b010938b70b3fcec2 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Wed, 29 Apr 2020 23:16:15 +0900 Subject: [PATCH 137/229] Remove `lsp-groovy-server-install-dir` --- modules/tools/lsp/config.el | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 3c4aabfaf..8464cb76a 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -40,7 +40,6 @@ working on that project after closing the last buffer.") (setq lsp-flycheck-live-reporting nil) ;; For `lsp-clients' (setq lsp-server-install-dir (concat doom-etc-dir "lsp/") - lsp-groovy-server-install-dir (concat lsp-server-install-dir "lsp-groovy/") lsp-intelephense-storage-path (concat doom-cache-dir "lsp-intelephense/")) ;; Disable LSP's superfluous, expensive and/or debatably unnecessary features. From db16b126333505093931ece480dd5c2dae42cdd9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 14:44:51 -0400 Subject: [PATCH 138/229] persp-reset-windows-on-nil-window-conf = nil Do nothing when opening a perspective with no window conf; this is particularly useful for emacsclient frames that are opened without a dedicated workspace. --- modules/ui/workspaces/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index f0fdad205..56c235547 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -50,6 +50,7 @@ stored in `persp-save-dir'.") (persp-mode +1))))) :config (setq persp-autokill-buffer-on-remove 'kill-weak + persp-reset-windows-on-nil-window-conf nil persp-nil-hidden t persp-auto-save-fname "autosave" persp-save-dir (concat doom-etc-dir "workspaces/") From f5858a1a6cdc21a4ada7088c59b64b335d215331 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 15:49:30 -0400 Subject: [PATCH 139/229] Add org-journal-mode to +zen-mixed-pitch-modes --- modules/ui/zen/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el index 8d9fc576d..30a73b16a 100644 --- a/modules/ui/zen/config.el +++ b/modules/ui/zen/config.el @@ -1,6 +1,6 @@ ;;; ui/zen/config.el -*- lexical-binding: t; -*- -(defvar +zen-mixed-pitch-modes '(markdown-mode org-mode) +(defvar +zen-mixed-pitch-modes '(markdown-mode org-mode org-journal-mode) "What major-modes to enable `mixed-pitch-mode' in with `writeroom-mode'.") (defvar +zen-text-scale 2 From 91c00d4756394a9a5ae6c61eb71e02a6ade21a59 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 15:54:21 -0400 Subject: [PATCH 140/229] Use +word-wrap-mode instead of visual-line-mode default If the word-wrap module is enabled. --- modules/editor/word-wrap/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/editor/word-wrap/config.el b/modules/editor/word-wrap/config.el index 2a6af06c7..968e71954 100644 --- a/modules/editor/word-wrap/config.el +++ b/modules/editor/word-wrap/config.el @@ -24,3 +24,7 @@ Otherwise no extra indentation will be used.") '(text-mode markdown-mode markdown-view-mode gfm-mode gfm-view-mode rst-mode latex-mode LaTeX-mode) "Major-modes where `+word-wrap-mode' should not provide extra indentation.") + +(when (memq 'visual-line-mode text-mode-hook) + (remove-hook 'text-mode-hook #'visual-line-mode) + (add-hook 'text-mode-hook #'+word-wrap-mode)) From 079b7482170a45488de26b5006fda7cddfd51e69 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 18:32:25 -0400 Subject: [PATCH 141/229] Fix conflict between private & default autodefs e.g. If you had a ~/.doom.d/modules/tools/lsp/autoload.el that defined an lsp! autodef, it would be indexed and included in ~/.emacs.d/.local/autoloads.el *before* the lsp! autodef from the original ~/.emacs.d/modules/tools/lsp/autoload.el. --- core/core-modules.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index f3c22fb71..c866e1289 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -211,13 +211,15 @@ those directories. The first returned path is always `doom-private-dir'." (declare (pure t) (side-effect-free t)) (append (list doom-private-dir) (if module-dirs - (doom-files-in (if (listp module-dirs) - module-dirs - doom-modules-dirs) - :type 'dirs - :mindepth 1 - :depth 1) - (cl-loop for plist being the hash-values of (doom-modules) + (mapcar (lambda (m) (doom-module-locate-path (car m) (cdr m))) + (doom-files-in (if (listp module-dirs) + module-dirs + doom-modules-dirs) + :map #'doom-module-from-path + :type 'dirs + :mindepth 1 + :depth 1)) + (cl-loop for plist being the hash-values of doom-modules collect (plist-get plist :path))) nil)) From ee4b5c61de53dde40987efbe4942f61f7d486da0 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 29 Apr 2020 16:22:01 -0700 Subject: [PATCH 142/229] Improve ivy-rich with counsel-bookmark This adds a column that displays the path where the bookmark exists. Signed-off-by: Rudi Grinberg --- modules/completion/ivy/config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 73276413f..fb3382183 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -129,7 +129,11 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (ivy-rich-counsel-function-docstring (:face font-lock-doc-face)))) ;; Apply switch buffer transformers to `counsel-projectile-switch-to-buffer' as well 'counsel-projectile-switch-to-buffer - (plist-get ivy-rich-display-transformers-list 'ivy-switch-buffer)) + (plist-get ivy-rich-display-transformers-list 'ivy-switch-buffer) + 'counsel-bookmark + '(:columns + ((ivy-rich-candidate (:width 0.5)) + (ivy-rich-bookmark-filename (:width 60))))) ;; Remove built-in coloring of buffer list; we do our own (setq ivy-switch-buffer-faces-alist nil) From f61fa503365e305c566d0dc366f78e3a640680fd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 19:39:35 -0400 Subject: [PATCH 143/229] Null-byte delimit envvar file lines This prevents issues with multi-line envvar values. --- core/cli/env.el | 7 ++++--- core/core.el | 46 ++++++++++++++++++---------------------------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/core/cli/env.el b/core/cli/env.el index bb546ede1..f13a838d3 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -113,10 +113,11 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in "# run 'doom sync'. To create a safe-to-edit envvar file use:\n#\n" "# doom env -o ~/.doom.d/myenv\n#\n" "# And load it with (doom-load-envvars-file \"~/.doom.d/myenv\").\n") - (concat "# This file is safe to edit by hand, but needs to be loaded manually with:\n#\n" + (concat "# This file is safe to edit by hand, but remember to preserve the null bytes at\n" + "# the end of each line! needs to be loaded manually with:\n#\n" "# (doom-load-envvars-file \"path/to/this/file\")\n#\n" "# Use 'doom env -o path/to/this/file' to regenerate it.")) - "# ---------------------------------------------------------------------------\n\n")) + "# ---------------------------------------------------------------------------\n\0\n")) ;; We assume that this noninteractive session was spawned from the ;; user's interactive shell, therefore we just dump ;; `process-environment' to a file. @@ -124,7 +125,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in (if (cl-find-if (doom-rpartial #'string-match-p (car (split-string env "="))) doom-env-ignored-vars) (print! (info "Ignoring %s") env) - (insert env "\n"))) + (insert env "\0\n"))) (print! (success "Successfully generated %S") (path env-file)) t)))))) diff --git a/core/core.el b/core/core.el index 288013d96..437779996 100644 --- a/core/core.el +++ b/core/core.el @@ -465,34 +465,24 @@ If NOERROR is non-nil, don't throw an error if the file doesn't exist or is unreadable. Returns the names of envvars that were changed." (if (not (file-readable-p file)) (unless noerror - (signal 'file-error (list "Couldn't read envvar file" file))) - (let (envvars environment) - (with-temp-buffer - (save-excursion - (insert "\n") - (insert-file-contents file)) - (while (re-search-forward "\n *\\([^#= \n]*\\)=" nil t) - (push (match-string 1) envvars) - (push (buffer-substring - (match-beginning 1) - (1- (or (save-excursion - (when (re-search-forward "^\\([^= ]+\\)=" nil t) - (line-beginning-position))) - (point-max)))) - environment))) - (when environment - (setq process-environment - (append (nreverse environment) process-environment) - exec-path - (if (member "PATH" envvars) - (append (split-string (getenv "PATH") path-separator t) - (list exec-directory)) - exec-path) - shell-file-name - (if (member "SHELL" envvars) - (or (getenv "SHELL") shell-file-name) - shell-file-name)) - envvars)))) + (signal 'file-error (list "No envvar file exists" file))) + (when-let + (env + (with-temp-buffer + (save-excursion + (insert "\0\n") ; to prevent off-by-one + (insert-file-contents file)) + (save-match-data + (when (re-search-forward "\0\n *\\([^#= \n]*\\)=" nil t) + (setq + env (split-string (buffer-substring (match-beginning 1) (point-max)) + "\0\n" + 'omit-nulls)))))) + (setq process-environment (append (nreverse env) process-environment) + exec-path (append (split-string (getenv "PATH") path-separator t) + (list exec-directory)) + shell-file-name (or (getenv "SHELL") shell-file-name)) + env))) (defun doom-initialize (&optional force-p noerror) "Bootstrap Doom, if it hasn't already (or if FORCE-P is non-nil). From 1442e694fbb36173b9c4408a4ad0dd7d59bd5f49 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 20:19:34 -0400 Subject: [PATCH 144/229] Move core helpers to core-lib Since they can be generally useful. --- core/core-lib.el | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ core/core.el | 47 +------------------------------------------ 2 files changed, 53 insertions(+), 46 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 1bf435167..b981da875 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -85,6 +85,58 @@ Accepts the same arguments as `message'." format-string) ,@args)))) +(defun doom-try-run-hook (hook) + "Run HOOK (a hook function) with better error handling. +Meant to be used with `run-hook-wrapped'." + (doom-log "Running doom hook: %s" hook) + (condition-case e + (funcall hook) + ((debug error) + (signal 'doom-hook-error (list hook e)))) + ;; return nil so `run-hook-wrapped' won't short circuit + nil) + +(defun doom-load-autoloads-file (file &optional noerror) + "Tries to load FILE (an autoloads file). +Return t on success, nil otherwise (but logs a warning)." + (condition-case e + ;; Avoid `file-name-sans-extension' for premature optimization reasons. + ;; `string-remove-suffix' is much cheaper (because it does no file sanity + ;; checks during or after; just plain ol' string manipulation). + (load (string-remove-suffix ".el" file) noerror 'nomessage) + ((debug error) + (message "Autoload file error: %s -> %s" (file-name-nondirectory file) e) + nil))) + +(defun doom-load-envvars-file (file &optional noerror) + "Read and set envvars from FILE. +If NOERROR is non-nil, don't throw an error if the file doesn't exist or is +unreadable. Returns the names of envvars that were changed." + (if (null (file-exists-p file)) + (unless noerror + (signal 'file-error (list "No envvar file exists" file))) + (when-let + (env + (with-temp-buffer + (save-excursion + (insert "\0\n") ; to prevent off-by-one + (insert-file-contents file)) + (save-match-data + (when (re-search-forward "\0\n *\\([^#= \n]*\\)=" nil t) + (setq + env (split-string (buffer-substring (match-beginning 1) (point-max)) + "\0\n" + 'omit-nulls)))))) + (setq process-environment (append (nreverse env) process-environment) + exec-path (append (split-string (getenv "PATH") path-separator t) + (list exec-directory)) + shell-file-name (or (getenv "SHELL") shell-file-name)) + env))) + + +;; +;;; Functional library + (defalias 'doom-partial #'apply-partially) (defun doom-rpartial (fn &rest args) diff --git a/core/core.el b/core/core.el index 437779996..814a1682a 100644 --- a/core/core.el +++ b/core/core.el @@ -427,17 +427,6 @@ If this is a daemon session, load them all immediately instead." ;; ;;; Bootstrap helpers -(defun doom-try-run-hook (hook) - "Run HOOK (a hook function) with better error handling. -Meant to be used with `run-hook-wrapped'." - (doom-log "Running doom hook: %s" hook) - (condition-case e - (funcall hook) - ((debug error) - (signal 'doom-hook-error (list hook e)))) - ;; return nil so `run-hook-wrapped' won't short circuit - nil) - (defun doom-display-benchmark-h (&optional return-p) "Display a benchmark including number of packages and modules loaded. @@ -450,40 +439,6 @@ If RETURN-P, return the message as a string instead of displaying it." (setq doom-init-time (float-time (time-subtract (current-time) before-init-time)))))) -(defun doom-load-autoloads-file (file &optional noerror) - "Tries to load FILE (an autoloads file). -Return t on success, nil otherwise (but logs a warning)." - (condition-case e - (load (substring file 0 -3) noerror 'nomessage) - ((debug error) - (message "Autoload file error: %s -> %s" (file-name-nondirectory file) e) - nil))) - -(defun doom-load-envvars-file (file &optional noerror) - "Read and set envvars from FILE. -If NOERROR is non-nil, don't throw an error if the file doesn't exist or is -unreadable. Returns the names of envvars that were changed." - (if (not (file-readable-p file)) - (unless noerror - (signal 'file-error (list "No envvar file exists" file))) - (when-let - (env - (with-temp-buffer - (save-excursion - (insert "\0\n") ; to prevent off-by-one - (insert-file-contents file)) - (save-match-data - (when (re-search-forward "\0\n *\\([^#= \n]*\\)=" nil t) - (setq - env (split-string (buffer-substring (match-beginning 1) (point-max)) - "\0\n" - 'omit-nulls)))))) - (setq process-environment (append (nreverse env) process-environment) - exec-path (append (split-string (getenv "PATH") path-separator t) - (list exec-directory)) - shell-file-name (or (getenv "SHELL") shell-file-name)) - env))) - (defun doom-initialize (&optional force-p noerror) "Bootstrap Doom, if it hasn't already (or if FORCE-P is non-nil). @@ -502,7 +457,7 @@ The overall load order of Doom is as follows: Module config.el files ~/.doom.d/config.el `doom-init-modules-hook' - `doom-after-init-hook' (`after-init-hook') + `doom-after-init-modules-hook' (`after-init-hook') `emacs-startup-hook' `doom-init-ui-hook' `window-setup-hook' From 64b799c68e7838265708e8d6d31011c3c27dd2d4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 20:20:24 -0400 Subject: [PATCH 145/229] Load subr-x & cl-lib a little earlier --- core/core-lib.el | 3 --- core/core.el | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index b981da875..7210ffc93 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -1,8 +1,5 @@ ;;; core-lib.el -*- lexical-binding: t; -*- -(require 'cl-lib) -(require 'subr-x) - ;; ;;; Helpers diff --git a/core/core.el b/core/core.el index 814a1682a..493a71a4b 100644 --- a/core/core.el +++ b/core/core.el @@ -40,6 +40,8 @@ (add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h)) ;; Just the bare necessities +(require 'subr-x) +(require 'cl-lib) (require 'core-lib) From c3a84f0fbf899e978b23da2e7a790bfefcb6fd9c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 20:45:29 -0400 Subject: [PATCH 146/229] Reorganize core-lib Group like macros together. --- core/core-lib.el | 300 ++++++++++++++++++++++++----------------------- 1 file changed, 153 insertions(+), 147 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 7210ffc93..3c6b5cc87 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -168,6 +168,11 @@ aliases." (call-interactively command)))) (defalias 'lambda!! 'λ!!) +(defun dir! () + "Returns the directory of the emacs lisp file this macro is called from." + (when-let (path (file!)) + (directory-file-name (file-name-directory path)))) + (defun file! () "Return the emacs lisp file this macro is called from." (cond ((bound-and-true-p byte-compile-current-file)) @@ -177,10 +182,83 @@ aliases." (buffer-file-name) ((error "Cannot get this file-path")))) -(defun dir! () - "Returns the directory of the emacs lisp file this macro is called from." - (when-let (path (file!)) - (directory-file-name (file-name-directory path)))) +(defmacro letenv! (envvars &rest body) + "Lexically bind ENVVARS in BODY, like `let' but for `process-environment'." + (declare (indent 1)) + `(let ((process-environment (copy-sequence process-environment))) + (dolist (var (list ,@(cl-loop for (var val) in envvars + collect `(cons ,var ,val)))) + (setenv (car var) (cdr var))) + ,@body)) + +(defmacro quiet! (&rest forms) + "Run FORMS without generating any output. + +This silences calls to `message', `load-file', `write-region' and anything that +writes to `standard-output'." + `(cond (doom-debug-mode ,@forms) + ((not doom-interactive-mode) + (let ((old-fn (symbol-function 'write-region))) + (cl-letf ((standard-output (lambda (&rest _))) + ((symbol-function 'load-file) (lambda (file) (load file nil t))) + ((symbol-function 'message) (lambda (&rest _))) + ((symbol-function 'write-region) + (lambda (start end filename &optional append visit lockname mustbenew) + (unless visit (setq visit 'no-message)) + (funcall old-fn start end filename append visit lockname mustbenew)))) + ,@forms))) + ((let ((inhibit-message t) + (save-silently t)) + (prog1 ,@forms (message "")))))) + + +;;; Mutation +(defmacro appendq! (sym &rest lists) + "Append LISTS to SYM in place." + `(setq ,sym (append ,sym ,@lists))) + +(defmacro setq! (&rest settings) + "A stripped-down `customize-set-variable' with the syntax of `setq'. + +Use this instead of `setq' when you know a variable has a custom setter (a :set +property in its `defcustom' declaration). This trigger setters. `setq' does +not." + (macroexp-progn + (cl-loop for (var val) on settings by 'cddr + collect (list (or (get var 'custom-set) #'set) + (list 'quote var) + val)))) + +(defmacro delq! (elt list &optional fetcher) + "`delq' ELT from LIST in-place. + +If FETCHER is a function, ELT is used as the key in LIST (an alist)." + `(setq ,list + (delq ,(if fetcher + `(funcall ,fetcher ,elt ,list) + elt) + ,list))) + +(defmacro pushnew! (place &rest values) + "Push VALUES sequentially into PLACE, if they aren't already present. +This is a variadic `cl-pushnew'." + (let ((var (make-symbol "result"))) + `(dolist (,var (list ,@values) (with-no-warnings ,place)) + (cl-pushnew ,var ,place :test #'equal)))) + +(defmacro prependq! (sym &rest lists) + "Prepend LISTS to SYM in place." + `(setq ,sym (append ,@lists ,sym))) + + +;;; Loading +(defmacro add-load-path! (&rest dirs) + "Add DIRS to `load-path', relative to the current file. +The current file is the file from which `add-to-load-path!' is used." + `(let ((default-directory ,(dir!)) + file-name-handler-alist) + (dolist (dir (list ,@dirs)) + (cl-pushnew (expand-file-name dir) load-path)))) (defmacro after! (package &rest body) "Evaluate BODY after PACKAGE have loaded. @@ -232,58 +310,84 @@ This is a wrapper around `eval-after-load' that: (setq body `((after! ,next ,@body)))) (car body)))))) -(defmacro setq! (&rest settings) - "A stripped-down `customize-set-variable' with the syntax of `setq'. +(defun doom--handle-load-error (e target path) + (let* ((source (file-name-sans-extension target)) + (err (cond ((not (featurep 'core)) + (cons 'error (file-name-directory path))) + ((file-in-directory-p source doom-core-dir) + (cons 'doom-error doom-core-dir)) + ((file-in-directory-p source doom-private-dir) + (cons 'doom-private-error doom-private-dir)) + ((cons 'doom-module-error doom-emacs-dir))))) + (signal (car err) + (list (file-relative-name + (concat source ".el") + (cdr err)) + e)))) -Use this instead of `setq' when you know a variable has a custom setter (a :set -property in its `defcustom' declaration). This trigger setters. `setq' does -not." - (macroexp-progn - (cl-loop for (var val) on settings by 'cddr - collect `(funcall (or (get ',var 'custom-set) #'set) - ',var ,val)))) +(defmacro load! (filename &optional path noerror) + "Load a file relative to the current executing file (`load-file-name'). -(defmacro pushnew! (place &rest values) - "Push VALUES sequentially into PLACE, if they aren't already present. -This is a variadic `cl-pushnew'." - (let ((var (make-symbol "result"))) - `(dolist (,var (list ,@values) (with-no-warnings ,place)) - (cl-pushnew ,var ,place :test #'equal)))) +FILENAME is either a file path string or a form that should evaluate to such a +string at run time. PATH is where to look for the file (a string representing a +directory path). If omitted, the lookup is relative to either `load-file-name', +`byte-compile-current-file' or `buffer-file-name' (checked in that order). -(defmacro prependq! (sym &rest lists) - "Prepend LISTS to SYM in place." - `(setq ,sym (append ,@lists ,sym))) +If NOERROR is non-nil, don't throw an error if the file doesn't exist." + (let* ((path (or path + (dir!) + (error "Could not detect path to look for '%s' in" + filename))) + (file (if path + `(expand-file-name ,filename ,path) + filename))) + `(condition-case-unless-debug e + (let (file-name-handler-alist) + (load ,file ,noerror 'nomessage)) + (doom-error (signal (car e) (cdr e))) + (error (doom--handle-load-error e ,file ,path))))) -(defmacro appendq! (sym &rest lists) - "Append LISTS to SYM in place." - `(setq ,sym (append ,sym ,@lists))) +(defmacro defer-until! (condition &rest body) + "Run BODY when CONDITION is true (checks on `after-load-functions'). Meant to +serve as a predicated alternative to `after!'." + (declare (indent defun) (debug t)) + `(if ,condition + (progn ,@body) + ,(let ((fn (intern (format "doom--delay-form-%s-h" (sxhash (cons condition body)))))) + `(progn + (fset ',fn (lambda (&rest args) + (when ,(or condition t) + (remove-hook 'after-load-functions #',fn) + (unintern ',fn nil) + (ignore args) + ,@body))) + (put ',fn 'permanent-local-hook t) + (add-hook 'after-load-functions #',fn))))) -(defmacro delq! (elt list &optional fetcher) - "`delq' ELT from LIST in-place. +(defmacro defer-feature! (feature &optional fn) + "Pretend FEATURE hasn't been loaded yet, until FEATURE-hook or FN runs. -If FETCHER is a function, ELT is used as the key in LIST (an alist)." - `(setq ,list - (delq ,(if fetcher - `(funcall ,fetcher ,elt ,list) - elt) - ,list))) +Some packages (like `elisp-mode' and `lisp-mode') are loaded immediately at +startup, which will prematurely trigger `after!' (and `with-eval-after-load') +blocks. To get around this we make Emacs believe FEATURE hasn't been loaded yet, +then wait until FEATURE-hook (or MODE-hook, if FN is provided) is triggered to +reverse this and trigger `after!' blocks at a more reasonable time." + (let ((advice-fn (intern (format "doom--defer-feature-%s-a" feature))) + (fn (or fn feature))) + `(progn + (setq features (delq ',feature features)) + (advice-add #',fn :before #',advice-fn) + (defun ,advice-fn (&rest _) + ;; Some plugins (like yasnippet) will invoke a fn early to parse + ;; code, which would prematurely trigger this. In those cases, well + ;; behaved plugins will use `delay-mode-hooks', which we can check for: + (when (and ,(intern (format "%s-hook" fn)) + (not delay-mode-hooks)) + ;; ...Otherwise, announce to the world this package has been loaded, + ;; so `after!' handlers can react. + (provide ',feature) + (advice-remove #',fn #',advice-fn)))))) -(defmacro letenv! (envvars &rest body) - "Lexically bind ENVVARS in BODY, like `let' but for `process-environment'." - (declare (indent 1)) - `(let ((process-environment (copy-sequence process-environment))) - (dolist (var (list ,@(cl-loop for (var val) in envvars - collect `(cons ,var ,val)))) - (setenv (car var) (cdr var))) - ,@body)) - -(defmacro add-load-path! (&rest dirs) - "Add DIRS to `load-path', relative to the current file. -The current file is the file from which `add-to-load-path!' is used." - `(let ((default-directory ,(dir!)) - file-name-handler-alist) - (dolist (dir (list ,@dirs)) - (cl-pushnew (expand-file-name dir) load-path)))) ;;; Hooks (defvar doom--transient-counter 0) @@ -409,106 +513,8 @@ If N and M = 1, there's no benefit to using this macro over `remove-hook'. in (doom--setq-hook-fns hooks vars 'singles) collect `(remove-hook ',hook #',fn)))) -(defmacro load! (filename &optional path noerror) - "Load a file relative to the current executing file (`load-file-name'). -FILENAME is either a file path string or a form that should evaluate to such a -string at run time. PATH is where to look for the file (a string representing a -directory path). If omitted, the lookup is relative to either `load-file-name', -`byte-compile-current-file' or `buffer-file-name' (checked in that order). - -If NOERROR is non-nil, don't throw an error if the file doesn't exist." - (let* ((path (or path - (dir!) - (error "Could not detect path to look for '%s' in" - filename))) - (file (if path - `(expand-file-name ,filename ,path) - filename))) - `(condition-case-unless-debug e - (let (file-name-handler-alist) - (load ,file ,noerror 'nomessage)) - (doom-error (signal (car e) (cdr e))) - (error - (let* ((source (file-name-sans-extension ,file)) - (err (cond ((not (featurep 'core)) - (cons 'error (file-name-directory path))) - ((file-in-directory-p source doom-core-dir) - (cons 'doom-error doom-core-dir)) - ((file-in-directory-p source doom-private-dir) - (cons 'doom-private-error doom-private-dir)) - ((cons 'doom-module-error doom-emacs-dir))))) - (signal (car err) - (list (file-relative-name - (concat source ".el") - (cdr err)) - e))))))) - -(defmacro defer-until! (condition &rest body) - "Run BODY when CONDITION is true (checks on `after-load-functions'). Meant to -serve as a predicated alternative to `after!'." - (declare (indent defun) (debug t)) - `(if ,condition - (progn ,@body) - ,(let ((fn (intern (format "doom--delay-form-%s-h" (sxhash (cons condition body)))))) - `(progn - (fset ',fn (lambda (&rest args) - (when ,(or condition t) - (remove-hook 'after-load-functions #',fn) - (unintern ',fn nil) - (ignore args) - ,@body))) - (put ',fn 'permanent-local-hook t) - (add-hook 'after-load-functions #',fn))))) - -(defmacro defer-feature! (feature &optional fn) - "Pretend FEATURE hasn't been loaded yet, until FEATURE-hook or FN runs. - -Some packages (like `elisp-mode' and `lisp-mode') are loaded immediately at -startup, which will prematurely trigger `after!' (and `with-eval-after-load') -blocks. To get around this we make Emacs believe FEATURE hasn't been loaded yet, -then wait until FEATURE-hook (or MODE-hook, if FN is provided) is triggered to -reverse this and trigger `after!' blocks at a more reasonable time." - (let ((advice-fn (intern (format "doom--defer-feature-%s-a" feature))) - (fn (or fn feature))) - `(progn - (setq features (delq ',feature features)) - (advice-add #',fn :before #',advice-fn) - (defun ,advice-fn (&rest _) - ;; Some plugins (like yasnippet) will invoke a fn early to parse - ;; code, which would prematurely trigger this. In those cases, well - ;; behaved plugins will use `delay-mode-hooks', which we can check for: - (when (and ,(intern (format "%s-hook" fn)) - (not delay-mode-hooks)) - ;; ...Otherwise, announce to the world this package has been loaded, - ;; so `after!' handlers can react. - (provide ',feature) - (advice-remove #',fn #',advice-fn)))))) - -(defmacro quiet! (&rest forms) - "Run FORMS without generating any output. - -This silences calls to `message', `load-file', `write-region' and anything that -writes to `standard-output'." - `(cond (doom-debug-mode ,@forms) - ((not doom-interactive-mode) - (let ((old-fn (symbol-function 'write-region))) - (cl-letf ((standard-output (lambda (&rest _))) - ((symbol-function 'load-file) (lambda (file) (load file nil t))) - ((symbol-function 'message) (lambda (&rest _))) - ((symbol-function 'write-region) - (lambda (start end filename &optional append visit lockname mustbenew) - (unless visit (setq visit 'no-message)) - (funcall old-fn start end filename append visit lockname mustbenew)))) - ,@forms))) - ((let ((inhibit-message t) - (save-silently t)) - (prog1 ,@forms (message "")))))) - - -;; ;;; Definers - (defmacro defadvice! (symbol arglist &optional docstring &rest body) "Define an advice called SYMBOL and add it to PLACES. From d12752324ad7cadebd9d8e4c211282225ff681a4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 21:08:17 -0400 Subject: [PATCH 147/229] Introduce letf! convenience macro A more succinct cl-letf, which allows for local functions and macros. --- core/autoload/debug.el | 5 +- core/core-editor.el | 29 ++++------ core/core-lib.el | 47 ++++++++++++--- core/core-ui.el | 6 +- modules/app/rss/autoload.el | 7 +-- modules/editor/evil/autoload/advice.el | 6 +- modules/editor/snippets/config.el | 4 +- modules/lang/org/autoload/org-capture.el | 2 +- modules/lang/org/config.el | 8 +-- modules/lang/org/contrib/present.el | 31 +++++----- modules/tools/pdf/config.el | 10 ++-- modules/ui/popup/+hacks.el | 73 ++++++++++-------------- 12 files changed, 113 insertions(+), 115 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 7b3f5ddcd..c6d58e8f9 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -46,10 +46,7 @@ ready to be pasted in a bug report on github." (require 'core-packages) (let ((default-directory doom-emacs-dir) (doom-modules (doom-modules))) - (cl-letf - (((symbol-function 'sh) - (lambda (&rest args) - (cdr (apply #'doom-call-process args))))) + (letf! (defun sh (&rest args) (cdr (apply #'doom-call-process args))) `((emacs (version . ,emacs-version) (features ,@system-configuration-features) diff --git a/core/core-editor.el b/core/core-editor.el index 1702c4d8e..750133700 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -293,10 +293,7 @@ possible." `pp' can be expensive for longer lists, and there's no reason to prettify cache files, so we replace calls to `pp' with the much faster `prin1'." :around #'save-place-alist-to-file - (cl-letf (((symbol-function #'pp) #'prin1)) - (funcall orig-fn))) - - (save-place-mode +1)) + (letf! ((#'pp #'prin1)) (funcall orig-fn)))) (use-package! server @@ -394,18 +391,14 @@ files, so we replace calls to `pp' with the much faster `prin1'." `nim-mode'. This prevents them from leaving Emacs in a broken state." :around #'dtrt-indent-mode (let ((dtrt-indent-run-after-smie dtrt-indent-run-after-smie)) - (cl-letf* ((old-smie-config-guess (symbol-function 'smie-config-guess)) - (old-smie-config--guess (symbol-function 'symbol-config--guess)) - ((symbol-function 'symbol-config--guess) - (lambda (beg end) - (funcall old-smie-config--guess beg (min end 10000)))) - ((symbol-function 'smie-config-guess) - (lambda () - (condition-case e (funcall old-smie-config-guess) - (error (setq dtrt-indent-run-after-smie t) - (message "[WARNING] Indent detection: %s" - (error-message-string e)) - (message "")))))) ; warn silently + (letf! ((defun symbol-config--guess (beg end) + (funcall symbol-config--guess beg (min end 10000))) + (defun smie-config-guess () + (condition-case e (funcall smie-config-guess) + (error (setq dtrt-indent-run-after-smie t) + (message "[WARNING] Indent detection: %s" + (error-message-string e)) + (message ""))))) ; warn silently (funcall orig-fn arg))))) @@ -421,8 +414,8 @@ files, so we replace calls to `pp' with the much faster `prin1'." (defun doom-use-helpful-a (orig-fn &rest args) "Force ORIG-FN to use helpful instead of the old describe-* commands." - (cl-letf (((symbol-function #'describe-function) #'helpful-function) - ((symbol-function #'describe-variable) #'helpful-variable)) + (letf! ((#'describe-function #'helpful-function) + (#'describe-variable #'helpful-variable)) (apply orig-fn args))) (after! apropos diff --git a/core/core-lib.el b/core/core-lib.el index 3c6b5cc87..3411ca60b 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -191,6 +191,37 @@ aliases." (setenv (car var) (cdr var))) ,@body)) +(defmacro letf! (bindings &rest body) + "Temporarily rebind function and macros in BODY. + +BINDINGS is either a) a list of, or a single, `defun' or `defmacro'-ish form, or +b) a list of (PLACE VALUE) bindings as `cl-letf*' would accept. + +TYPE is either `defun' or `defmacro'. NAME is the name of the function. If an +original definition for NAME exists, it can be accessed as a lexical variable by +the same name, for use with `funcall' or `apply'. ARGLIST and BODY are as in +`defun'. + +\(fn ((TYPE NAME ARGLIST &rest BODY) ...) BODY...)" + (declare (indent defun)) + (setq body (macroexp-progn body)) + (when (memq (car bindings) '(defun defmacro)) + (setq bindings (list bindings))) + (dolist (binding (nreverse bindings) body) + (let ((type (car binding)) + (rest (cdr binding))) + (setq + body (pcase type + (`defmacro `(cl-macrolet ((,(car rest) ,(cadr rest) ,@(cddr rest))) ,body)) + (`defun `(cl-letf* ((,(car rest) (symbol-function #',(car rest))) + ((symbol-function #',(car rest)) + (lambda ,(cadr rest) ,@(cddr rest)))) + ,body)) + (_ + (when (eq (car-safe type) 'function) + (setq type `(symbol-function ,type))) + `(cl-letf ((,type ,@rest)) ,body))))))) + (defmacro quiet! (&rest forms) "Run FORMS without generating any output. @@ -198,15 +229,13 @@ This silences calls to `message', `load-file', `write-region' and anything that writes to `standard-output'." `(cond (doom-debug-mode ,@forms) ((not doom-interactive-mode) - (let ((old-fn (symbol-function 'write-region))) - (cl-letf ((standard-output (lambda (&rest _))) - ((symbol-function 'load-file) (lambda (file) (load file nil t))) - ((symbol-function 'message) (lambda (&rest _))) - ((symbol-function 'write-region) - (lambda (start end filename &optional append visit lockname mustbenew) - (unless visit (setq visit 'no-message)) - (funcall old-fn start end filename append visit lockname mustbenew)))) - ,@forms))) + (letf! ((standard-output (lambda (&rest _))) + (defun load-file (file) (load-file nil t)) + (defun message (&rest _)) + (defun write-region (start end filename &optional append visit lockname mustbenew) + (unless visit (setq visit 'no-message)) + (funcall write-region start end filename append visit lockname mustbenew))) + ,@forms)) ((let ((inhibit-message t) (save-silently t)) (prog1 ,@forms (message "")))))) diff --git a/core/core-ui.el b/core/core-ui.el index 4ca55d8ec..45c58c826 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -619,10 +619,8 @@ This offers a moderate boost in startup (or theme switch) time, so long as :around #'load-theme (if (or (null after-init-time) doom--prefer-theme-elc) - (cl-letf* ((old-locate-file (symbol-function 'locate-file)) - ((symbol-function 'locate-file) - (lambda (filename path &optional _suffixes predicate) - (funcall old-locate-file filename path '("c" "") predicate)))) + (letf! (defun locate-file (filename path &optional _suffixes predicate) + (funcall locate-file filename path '("c" "") predicate)) (apply orig-fn args)) (apply orig-fn args)))) diff --git a/modules/app/rss/autoload.el b/modules/app/rss/autoload.el index 1cf548212..98f121c83 100644 --- a/modules/app/rss/autoload.el +++ b/modules/app/rss/autoload.el @@ -101,10 +101,9 @@ ;;;###autoload (defun +rss-put-sliced-image-fn (spec alt &optional flags) "TODO" - (cl-letf (((symbol-function #'insert-image) - (lambda (image &optional alt _area _slice) - (let ((height (cdr (image-size image t)))) - (insert-sliced-image image alt nil (max 1 (/ height 20.0)) 1))))) + (letf! (defun insert-image (image &optional alt _area _slice) + (let ((height (cdr (image-size image t)))) + (insert-sliced-image image alt nil (max 1 (/ height 20.0)) 1))) (shr-put-image spec alt flags))) ;;;###autoload diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index e54a1ab90..bdf2ce8f9 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -123,8 +123,7 @@ more information on modifiers." (not (eq this-command 'evil-open-below)) (evil-insert-state-p)) (funcall orig-fn count) - (cl-letf (((symbol-function 'evil-insert-newline-below) - (lambda () (+evil--insert-newline)))) + (letf! (defun evil-insert-newline-below () (+evil--insert-newline)) (let ((evil-auto-indent evil-auto-indent)) (funcall orig-fn count))))) @@ -134,8 +133,7 @@ more information on modifiers." (not (eq this-command 'evil-open-above)) (evil-insert-state-p)) (funcall orig-fn count) - (cl-letf (((symbol-function 'evil-insert-newline-above) - (lambda () (+evil--insert-newline 'above)))) + (letf! (defun evil-insert-newline-above () (+evil--insert-newline 'above)) (let ((evil-auto-indent evil-auto-indent)) (funcall orig-fn count))))) diff --git a/modules/editor/snippets/config.el b/modules/editor/snippets/config.el index 71218a728..6a9e6cc94 100644 --- a/modules/editor/snippets/config.el +++ b/modules/editor/snippets/config.el @@ -102,6 +102,6 @@ us who use yas-minor-mode and enable yasnippet more selectively. This advice swaps `yas-global-mode' with `yas-minor-mode'." :around '(aya-expand aya-open-line) - (cl-letf (((symbol-function #'yas-global-mode) #'yas-minor-mode) - (yas-global-mode yas-minor-mode)) + (letf! ((#'yas-global-mode #'yas-minor-mode) + (yas-global-mode yas-minor-mode)) (apply orig-fn args)))) diff --git a/modules/lang/org/autoload/org-capture.el b/modules/lang/org/autoload/org-capture.el index d64372139..d4be3f097 100644 --- a/modules/lang/org/autoload/org-capture.el +++ b/modules/lang/org/autoload/org-capture.el @@ -50,7 +50,7 @@ you're done. This can be called from an external shell script." (with-selected-frame frame (require 'org-capture) (condition-case ex - (cl-letf (((symbol-function #'pop-to-buffer) #'switch-to-buffer)) + (letf! ((#'pop-to-buffer #'switch-to-buffer)) (switch-to-buffer (doom-fallback-buffer)) (let ((org-capture-initial initial-input) org-capture-entry) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index ee71fb57d..d620e939f 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -539,11 +539,9 @@ current workspace (and clean them up)." ;; upstream (if ever). (defadvice! +org--fix-inline-images-for-imagemagick-users-a (orig-fn &rest args) :around #'org-display-inline-images - (cl-letf* ((old-create-image (symbol-function #'create-image)) - ((symbol-function #'create-image) - (lambda (file-or-data &optional type data-p &rest props) - (let ((type (if (plist-get props :width) type))) - (apply old-create-image file-or-data type data-p props))))) + (letf! (defun create-image (file-or-data &optional type data-p &rest props) + (let ((type (if (plist-get props :width) type))) + (apply create-image file-or-data type data-p props))) (apply orig-fn args))) (defadvice! +org--fix-inconsistent-uuidgen-case-a (uuid) diff --git a/modules/lang/org/contrib/present.el b/modules/lang/org/contrib/present.el index a92ff6572..d05cf8985 100644 --- a/modules/lang/org/contrib/present.el +++ b/modules/lang/org/contrib/present.el @@ -41,20 +41,19 @@ (defadvice! +org-present--narrow-to-subtree-a (orig-fn &rest args) "Narrow to the target subtree when you start the presentation." :around #'org-tree-slide--display-tree-with-narrow - (cl-letf (((symbol-function #'org-narrow-to-subtree) - (lambda () - (save-excursion - (save-match-data - (org-with-limited-levels - (narrow-to-region - (progn - (when (org-before-first-heading-p) - (org-next-visible-heading 1)) - (ignore-errors (org-up-heading-all 99)) - (forward-line 1) - (point)) - (progn (org-end-of-subtree t t) - (when (and (org-at-heading-p) (not (eobp))) - (backward-char 1)) - (point))))))))) + (letf! ((defun org-narrow-to-subtree () + (save-excursion + (save-match-data + (org-with-limited-levels + (narrow-to-region + (progn + (when (org-before-first-heading-p) + (org-next-visible-heading 1)) + (ignore-errors (org-up-heading-all 99)) + (forward-line 1) + (point)) + (progn (org-end-of-subtree t t) + (when (and (org-at-heading-p) (not (eobp))) + (backward-char 1)) + (point)))))))) (apply orig-fn args)))) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index 99956fdea..b1c74e782 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -33,12 +33,10 @@ :around '(pdf-annot-show-annotation pdf-isearch-hl-matches pdf-view-display-region) - (cl-letf* ((old-create-image (symbol-function #'create-image)) - ((symbol-function #'create-image) - (lambda (file-or-data &optional type data-p &rest props) - (apply old-create-image file-or-data type data-p - :width (car (pdf-view-image-size)) - props)))) + (letf! (defun create-image (file-or-data &optional type data-p &rest props) + (apply create-image file-or-data type data-p + :width (car (pdf-view-image-size)) + props)) (apply orig-fn args)))) ;; Handle PDF-tools related popups better diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index d6cd059c3..7cc0573c7 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -195,20 +195,18 @@ the command buffer." ;; Fix #897: "cannot open side window" error when TAB-completing file links (defadvice! +popup--helm-hide-org-links-popup-a (orig-fn &rest args) :around #'org-insert-link - (cl-letf* ((old-org-completing-read (symbol-function 'org-completing-read)) - ((symbol-function 'org-completing-read) - (lambda (&rest args) - (when-let (win (get-buffer-window "*Org Links*")) - ;; While helm is opened as a popup, it will mistaken the - ;; *Org Links* popup for the "originated window", and will - ;; target it for actions invoked by the user. However, since - ;; *Org Links* is a popup too (they're dedicated side - ;; windows), Emacs complains about being unable to split a - ;; side window. The simple fix: get rid of *Org Links*! - (delete-window win) - ;; But it must exist for org to clean up later. - (get-buffer-create "*Org Links*")) - (apply old-org-completing-read args)))) + (letf! ((defun org-completing-read (&rest args) + (when-let (win (get-buffer-window "*Org Links*")) + ;; While helm is opened as a popup, it will mistaken the *Org + ;; Links* popup for the "originated window", and will target it + ;; for actions invoked by the user. However, since *Org Links* + ;; is a popup too (they're dedicated side windows), Emacs + ;; complains about being unable to split a side window. The + ;; simple fix: get rid of *Org Links*! + (delete-window win) + ;; ...but it must exist for org to clean up later. + (get-buffer-create "*Org Links*")) + (apply org-completing-read args))) (apply #'funcall-interactively orig-fn args))) ;; Fix left-over popup window when closing persistent help for `helm-M-x' @@ -228,7 +226,6 @@ the command buffer." (when (+popup-window-p win) (select-window win)))) - ;;;###package org (after! org ;; Org has a scorched-earth window management policy I'm not fond of. i.e. it @@ -242,10 +239,8 @@ the command buffer." org-fast-tag-selection org-fast-todo-selection) (if +popup-mode - (cl-letf (((symbol-function #'delete-other-windows) - (symbol-function #'ignore)) - ((symbol-function #'delete-window) - (symbol-function #'ignore))) + (letf! ((#'delete-other-windows #'ignore) + (#'delete-window #'ignore)) (apply orig-fn args)) (apply orig-fn args))) @@ -256,16 +251,14 @@ Ugh, such an ugly hack." :around '(org-fast-tag-selection org-fast-todo-selection) (if +popup-mode - (cl-letf* ((old-fit-buffer-fn (symbol-function #'org-fit-window-to-buffer)) - ((symbol-function #'org-fit-window-to-buffer) - (lambda (&optional window max-height min-height shrink-only) - (when-let (buf (window-buffer window)) - (delete-window window) - (select-window - (setq window (display-buffer-at-bottom buf nil))) - (with-current-buffer buf - (setq mode-line-format nil))) - (funcall old-fit-buffer-fn window max-height min-height shrink-only)))) + (letf! ((defun org-fit-window-to-buffer (&optional window max-height min-height shrink-only) + (when-let (buf (window-buffer window)) + (delete-window window) + (select-window + (setq window (display-buffer-at-bottom buf nil))) + (with-current-buffer buf + (setq mode-line-format nil))) + (funcall org-fit-window-to-buffer window max-height min-height shrink-only))) (apply orig-fn args)) (apply orig-fn args))) @@ -284,8 +277,7 @@ Ugh, such an ugly hack." ;; _then_ hand off the buffer to the pop up manager. (defadvice! +popup--org-src-switch-to-buffer-a (orig-fn &rest args) :around #'org-src-switch-to-buffer - (cl-letf (((symbol-function #'pop-to-buffer-same-window) - (symbol-function #'switch-to-buffer))) + (letf! ((#'pop-to-buffer-same-window #'switch-to-buffer)) (apply orig-fn args)))) @@ -316,8 +308,7 @@ Ugh, such an ugly hack." ;;;###package profiler (defadvice! +popup--profiler-report-find-entry-in-other-window-a (orig-fn function) :around #'profiler-report-find-entry - (cl-letf (((symbol-function 'find-function) - (symbol-function 'find-function-other-window))) + (letf! ((#'find-function #'find-function-other-window)) (funcall orig-fn function))) @@ -337,10 +328,9 @@ Ugh, such an ugly hack." which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window which-key-custom-show-popup-function (lambda (act-popup-dim) - (cl-letf (((symbol-function 'display-buffer-in-side-window) - (lambda (buffer alist) - (+popup-display-buffer-stacked-side-window-fn - buffer (append '((vslot . -9999)) alist))))) + (letf! ((defun display-buffer-in-side-window (buffer alist) + (+popup-display-buffer-stacked-side-window-fn + buffer (append '((vslot . -9999)) alist)))) ;; HACK Fix #2219 where the which-key popup would get cut off. (setcar act-popup-dim (1+ (car act-popup-dim))) (which-key--show-buffer-side-window act-popup-dim)))))) @@ -351,9 +341,8 @@ Ugh, such an ugly hack." (defadvice! +popup--ignore-window-parameters-a (orig-fn &rest args) "Allow *interactive* window moving commands to traverse popups." :around '(windmove-up windmove-down windmove-left windmove-right) - (cl-letf (((symbol-function #'windmove-find-other-window) - (lambda (dir &optional arg window) - (window-in-direction - (pcase dir (`up 'above) (`down 'below) (_ dir)) - window (bound-and-true-p +popup-mode) arg windmove-wrap-around t)))) + (letf! ((defun windmove-find-other-window (dir &optional arg window) + (window-in-direction + (pcase dir (`up 'above) (`down 'below) (_ dir)) + window (bound-and-true-p +popup-mode) arg windmove-wrap-around t))) (apply orig-fn args))) From 936124e5460159c0886def6a4cb7dc66a69c7e47 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 21:09:10 -0400 Subject: [PATCH 148/229] Introduce if! & when! macros The condition argument is evaluated at compile/expansion time, and its body expanded directly. --- core/core-lib.el | 17 +++++++++++++++++ core/core-ui.el | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 3411ca60b..8abf49780 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -240,6 +240,23 @@ writes to `standard-output'." (save-silently t)) (prog1 ,@forms (message "")))))) +(defmacro if! (cond then &rest body) + "Expands to THEN if COND is non-nil, to BODY otherwise. +COND is checked at compile/expansion time, allowing BODY to be omitted +entirely when the elisp is byte-compiled. Use this for forms that contain +expensive macros that could safely be removed at compile time." + (declare (indent 2)) + (if (eval cond) + then + (macroexp-progn body))) + +(defmacro when! (cond &rest body) + "Expands to BODY if CONDITION is non-nil at compile/expansion time. +See `if!' for details on this macro's purpose." + (declare (indent 1)) + (when (eval cond) + (macroexp-progn body))) + ;;; Mutation (defmacro appendq! (sym &rest lists) diff --git a/core/core-ui.el b/core/core-ui.el index 45c58c826..ff4d6ad8b 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -302,7 +302,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (add-to-list 'default-frame-alist '(tool-bar-lines . 0)) (add-to-list 'default-frame-alist '(vertical-scroll-bars))) -(when IS-MAC +(when! IS-MAC ;; Curse Lion and its sudden but inevitable fullscreen mode! ;; NOTE Meaningless to railwaycat's emacs-mac build (setq ns-use-native-fullscreen nil) @@ -610,7 +610,7 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") (run-hooks 'doom-load-theme-hook)) result))) -(unless EMACS27+ +(when! (not EMACS27+) ;; DEPRECATED Not needed in Emacs 27 (defadvice! doom--prefer-compiled-theme-a (orig-fn &rest args) "Have `load-theme' prioritize the byte-compiled theme. From cb6dd300b4914944f2a6919901c886cd5f8a9678 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 21:22:58 -0400 Subject: [PATCH 149/229] Add comment wrt load-theme not disabling previous themes --- core/core-ui.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/core-ui.el b/core/core-ui.el index ff4d6ad8b..80c172265 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -606,6 +606,9 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") (unless no-enable (setq doom-theme theme doom-init-theme-p t) + ;; `load-theme' doesn't disable previously enabled themes, which seems + ;; like what you'd want. You could always use `enable-theme' to activate + ;; multiple themes instead. (mapc #'disable-theme (remq theme custom-enabled-themes)) (run-hooks 'doom-load-theme-hook)) result))) From eb995adada353cb09910b5ae943d52afa4e127ff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 21:54:02 -0400 Subject: [PATCH 150/229] Minor refactors & comment revision --- core/core-ui.el | 67 +++++++++++++++++++++++++------------------------ core/core.el | 14 +++++------ 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 80c172265..fe9adad88 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -85,50 +85,51 @@ size.") (defvar doom--last-frame nil) (defun doom-run-switch-window-hooks-h () - (let ((gc-cons-threshold most-positive-fixnum)) - (unless (or doom-inhibit-switch-window-hooks - (eq doom--last-window (selected-window)) - (minibufferp)) - (let ((doom-inhibit-switch-window-hooks t) - (inhibit-redisplay t)) - (run-hooks 'doom-switch-window-hook) - (setq doom--last-window (selected-window)))))) + (unless (or doom-inhibit-switch-window-hooks + (eq doom--last-window (selected-window)) + (minibufferp)) + (let ((gc-cons-threshold most-positive-fixnum) + (doom-inhibit-switch-window-hooks t) + (inhibit-redisplay t)) + (run-hooks 'doom-switch-window-hook) + (setq doom--last-window (selected-window))))) (defun doom-run-switch-frame-hooks-h (&rest _) (unless (or doom-inhibit-switch-frame-hooks (eq doom--last-frame (selected-frame)) (frame-parameter nil 'parent-frame)) - (let ((doom-inhibit-switch-frame-hooks t)) + (let ((gc-cons-threshold most-positive-fixnum) + (doom-inhibit-switch-frame-hooks t)) (run-hooks 'doom-switch-frame-hook) (setq doom--last-frame (selected-frame))))) (defun doom-run-switch-buffer-hooks-a (orig-fn buffer-or-name &rest args) - (let ((gc-cons-threshold most-positive-fixnum)) - (if (or doom-inhibit-switch-buffer-hooks - (and buffer-or-name - (eq (current-buffer) - (get-buffer buffer-or-name))) - (and (eq orig-fn #'switch-to-buffer) (car args))) - (apply orig-fn buffer-or-name args) - (let ((doom-inhibit-switch-buffer-hooks t) - (inhibit-redisplay t)) - (when-let (buffer (apply orig-fn buffer-or-name args)) - (with-current-buffer (if (windowp buffer) - (window-buffer buffer) - buffer) - (run-hooks 'doom-switch-buffer-hook)) - buffer))))) + (if (or doom-inhibit-switch-buffer-hooks + (and buffer-or-name + (eq (current-buffer) + (get-buffer buffer-or-name))) + (and (eq orig-fn #'switch-to-buffer) (car args))) + (apply orig-fn buffer-or-name args) + (let ((gc-cons-threshold most-positive-fixnum) + (doom-inhibit-switch-buffer-hooks t) + (inhibit-redisplay t)) + (when-let (buffer (apply orig-fn buffer-or-name args)) + (with-current-buffer (if (windowp buffer) + (window-buffer buffer) + buffer) + (run-hooks 'doom-switch-buffer-hook)) + buffer)))) (defun doom-run-switch-to-next-prev-buffer-hooks-a (orig-fn &rest args) - (let ((gc-cons-threshold most-positive-fixnum)) - (if doom-inhibit-switch-buffer-hooks - (apply orig-fn args) - (let ((doom-inhibit-switch-buffer-hooks t) - (inhibit-redisplay t)) - (when-let (buffer (apply orig-fn args)) - (with-current-buffer buffer - (run-hooks 'doom-switch-buffer-hook)) - buffer))))) + (if doom-inhibit-switch-buffer-hooks + (apply orig-fn args) + (let ((gc-cons-threshold most-positive-fixnum) + (doom-inhibit-switch-buffer-hooks t) + (inhibit-redisplay t)) + (when-let (buffer (apply orig-fn args)) + (with-current-buffer buffer + (run-hooks 'doom-switch-buffer-hook)) + buffer)))) (defun doom-protect-fallback-buffer-h () "Don't kill the scratch buffer. Meant for `kill-buffer-query-functions'." diff --git a/core/core.el b/core/core.el index 493a71a4b..7d36dcbf7 100644 --- a/core/core.el +++ b/core/core.el @@ -209,20 +209,20 @@ users).") ;; https://www.keylength.com/en/4/ gnutls-min-prime-bits 3072 tls-checktrust gnutls-verify-error - ;; Emacs is built with `gnutls' by default, so `tls-program' would not - ;; be used in that case. Otherwiese, people have reasons to not go with - ;; `gnutls', we use `openssl' instead. - ;; For more details, see https://redd.it/8sykl1 + ;; Emacs is built with `gnutls' by default, so `tls-program' would not be + ;; used in that case. Otherwise, people have reasons to not go with + ;; `gnutls', we use `openssl' instead. For more details, see + ;; https://redd.it/8sykl1 tls-program '("openssl s_client -connect %h:%p -CAfile %t -nbio -no_ssl3 -no_tls1 -no_tls1_1 -ign_eof" "gnutls-cli -p %p --dh-bits=3072 --ocsp --x509cafile=%t \ --strict-tofu --priority='SECURE192:+SECURE128:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3' %h" ;; compatibility fallbacks "gnutls-cli -p %p %h")) -;; Emacs stores authinfo in $HOME and in plaintext. Let's not do that, mkay? +;; Emacs stores `authinfo' in $HOME and in plain-text. Let's not do that, mkay? ;; This file stores usernames, passwords, and other such treasures for the ;; aspiring malicious third party. -(setq auth-sources (list (expand-file-name "authinfo.gpg" doom-etc-dir) +(setq auth-sources (list (concat doom-etc-dir "authinfo.gpg") "~/.authinfo.gpg")) ;; Emacs on Windows frequently confuses HOME (C:\Users\) and %APPDATA%, @@ -285,7 +285,7 @@ users).") (setq ffap-machine-p-known 'reject) ;; Font compacting can be terribly expensive, especially for rendering icon -;; fonts on Windows. Whether it has a noteable affect on Linux and Mac hasn't +;; fonts on Windows. Whether it has a notable affect on Linux and Mac hasn't ;; been determined, but we inhibit it there anyway. (setq inhibit-compacting-font-caches t) From 45cdfb1258422d80c3cb6918bd95d9d9f9a0d4a1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 23:09:46 -0400 Subject: [PATCH 151/229] Bump :core spudlyo/clipetty@7ee3f9c -> spudlyo/clipetty@01b3904 bbatsov/projectile@eec569d -> bbatsov/projectile@5cd261d noctuid/general.el@14ad4c8 -> noctuid/general.el@42e3803 We're also transitioning from abbreviated SHA1 hashes to full ones, because underlying git machinery in future updates of straight will require it (e.g. to obtain shallow clones of pinned packages). --- core/packages.el | 38 ++++++++++++++--------------- modules/lang/emacs-lisp/autoload.el | 13 ++++++++++ modules/lang/emacs-lisp/config.el | 4 ++- modules/lang/rust/packages.el | 2 +- 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/core/packages.el b/core/packages.el index 6e22d9c1e..f74bc0f1b 100644 --- a/core/packages.el +++ b/core/packages.el @@ -2,47 +2,47 @@ ;;; core/packages.el ;; core.el -(package! auto-minor-mode :pin "17cfa1b548") -(package! gcmh :pin "b1bde50891") +(package! auto-minor-mode :pin "17cfa1b54800fdef2975c0c0531dad34846a5065") +(package! gcmh :pin "b1bde5089169a74f62033d027e06e98cbeedd43f") ;; core-ui.el -(package! all-the-icons :pin "0b74fc3618") -(package! hide-mode-line :pin "88888825b5") -(package! highlight-numbers :pin "8b4744c7f4") +(package! all-the-icons :pin "0b74fc361817e885580c3f3408079f949f5830e1") +(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") +(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") (package! rainbow-delimiters :pin "5125f4e476") -(package! restart-emacs :pin "9aa90d3df9") +(package! restart-emacs :pin "9aa90d3df9e08bc420e1c9845ee3ff568e911bd9") ;; core-editor.el -(package! better-jumper :pin "6d240032ca") -(package! dtrt-indent :pin "9163cd990f") -(package! helpful :pin "c54e9ddbd6") +(package! better-jumper :pin "6d240032ca213ccb3347e25f26c29b6822bf03a7") +(package! dtrt-indent :pin "9163cd990fb1f43dafed3948c6e406c13a45a6be") +(package! helpful :pin "c54e9ddbd6a77858048c1a4c4b549de98af8f88e") (when IS-MAC - (package! ns-auto-titlebar :pin "1efc30d385")) -(package! pcre2el :pin "0b5b2a2c17") -(package! smartparens :pin "555626a43f") + (package! ns-auto-titlebar :pin "1efc30d38509647b417f05587fd7003457719256")) +(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") +(package! smartparens :pin "555626a43f9bb1985aa9a0eb675f2b88b29702c8") (package! so-long :built-in 'prefer ; included in Emacs 27+ ;; REVIEW so-long is slated to be published to ELPA eventually, but until then ;; I've created my own mirror for it because git.savannah.gnu.org runs ;; on a potato. :recipe (:host github :repo "hlissner/emacs-so-long") - :pin "ed666b0716") + :pin "ed666b0716f60e8988c455804de24b55919e71ca") (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). :recipe (:host github :repo "hlissner/ws-butler") - :pin "2bb49d3ee7") + :pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0") (unless IS-WINDOWS (package! clipetty :recipe (:host github :repo "spudlyo/clipetty") - :pin "7ee3f9c52f")) + :pin "01b39044b9b65fa4ea7d3166f8b1ffab6f740362")) ;; core-projects.el -(package! projectile :pin "eec569dc32") +(package! projectile :pin "5cd261dd75f4d711c0016617621349e2a98b43aa") ;; core-keybinds.el -(package! general :pin "14ad4c888b") -(package! which-key :pin "8b49ae978c") +(package! general :pin "42e38034cd2305fa7432866323c923979d8f9b06") +(package! which-key :pin "8b49ae978cceca65967f3544c236f32964ddbed0") ;; autoload/cache.el -(package! persistent-soft :pin "a1e0ddf2a1") +(package! persistent-soft :pin "a1e0ddf2a12a6f18cab565dee250f070384cbe02") diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 228a3a8ef..1aaaf8058 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -221,6 +221,19 @@ verbosity when editing a file in `doom-private-dir' or `doom-emacs-dir'." (default-value 'flycheck-emacs-lisp-check-form) ")")))) +;;;###autoload +(defun +emacs-lisp-truncate-pin () + "Truncates long SHA1 hashes in `package!' :pin's." + (save-excursion + (goto-char (match-beginning 0)) + (and (stringp (plist-get (sexp-at-point) :pin)) + (search-forward ":pin" nil t) + (put-text-property (re-search-forward "\"[^\"]\\{10\\}" nil t) + (progn (re-search-forward "\"" nil t) + (match-beginning 0)) + 'display "..."))) + nil) + ;;;###autoload (defun +emacs-lisp/edebug-instrument-defun-on () "Toggle on instrumentalisation for the function under `defun'." diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 7d4bf782d..521f4192c 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -75,7 +75,9 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") ("^;;;###\\(autodef\\|if\\|package\\)[ \n]" (1 font-lock-warning-face t))) ;; highlight defined, special variables & functions (when +emacs-lisp-enable-extra-fontification - `((+emacs-lisp-highlight-vars-and-faces . +emacs-lisp--face))))) + `((+emacs-lisp-highlight-vars-and-faces . +emacs-lisp--face))) + + `(("(package!\\_>" (0 (+emacs-lisp-truncate-pin)))))) ;; Recenter window after following definition (advice-add #'elisp-def :after #'doom-recenter-a) diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index 1c2945cc6..22d5d3f0f 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic :pin "61032eacf0") +(package! rustic :pin "32a962ab2d") (unless (featurep! +lsp) (package! racer :pin "a0bdf778f0")) From 49cdda3e3d8e8130acb3e3702060e9197d60eeb4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 23:25:44 -0400 Subject: [PATCH 152/229] Bump :ui Alexander-Miller/treemacs@ee1b523 -> Alexander-Miller/treemacs@10c96c9 abo-abo/ace-window@7e0777b -> abo-abo/ace-window@7003c88 hlissner/emacs-doom-themes@8d5ddbb -> hlissner/emacs-doom-themes@254d476 jaypei/emacs-neotree@98fe213 -> jaypei/emacs-neotree@5e12716 joostkremers/writeroom-mode@9b6e55f -> joostkremers/writeroom-mode@7f7acde We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/ui/deft/packages.el | 2 +- modules/ui/doom/packages.el | 4 ++-- modules/ui/fill-column/packages.el | 2 +- modules/ui/hl-todo/packages.el | 2 +- modules/ui/hydra/packages.el | 2 +- modules/ui/indent-guides/packages.el | 2 +- modules/ui/modeline/packages.el | 6 +++--- modules/ui/nav-flash/packages.el | 2 +- modules/ui/neotree/packages.el | 2 +- modules/ui/ophints/packages.el | 4 ++-- modules/ui/tabs/packages.el | 2 +- modules/ui/treemacs/packages.el | 2 +- modules/ui/unicode/packages.el | 2 +- modules/ui/vc-gutter/packages.el | 2 +- modules/ui/vi-tilde-fringe/packages.el | 2 +- modules/ui/window-select/packages.el | 6 +++--- modules/ui/workspaces/packages.el | 2 +- modules/ui/zen/packages.el | 4 ++-- 18 files changed, 25 insertions(+), 25 deletions(-) diff --git a/modules/ui/deft/packages.el b/modules/ui/deft/packages.el index 18bf7ee99..aa7be392e 100644 --- a/modules/ui/deft/packages.el +++ b/modules/ui/deft/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/deft/packages.el -(package! deft :pin "f54e8a65a7") +(package! deft :pin "f54e8a65a7e75a029657364055420374df45656d") diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 46e44fbbc..b6e2ac273 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "8d5ddbbb72") -(package! solaire-mode :pin "adc8c0c60d") +(package! doom-themes :pin "254d476dd6790eaa6b563c5a4da286321ff75d38") +(package! solaire-mode :pin "adc8c0c60d914f6395eba0bee78feedda128b30b") diff --git a/modules/ui/fill-column/packages.el b/modules/ui/fill-column/packages.el index 24adf3078..75c23a2ef 100644 --- a/modules/ui/fill-column/packages.el +++ b/modules/ui/fill-column/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/fill-column/packages.el -(package! hl-fill-column :pin "43cb3c35a9") +(package! hl-fill-column :pin "43cb3c35a92c912b7205b8a36f1ad0ec0a5b4a22") diff --git a/modules/ui/hl-todo/packages.el b/modules/ui/hl-todo/packages.el index 05ef85835..d83551c7d 100644 --- a/modules/ui/hl-todo/packages.el +++ b/modules/ui/hl-todo/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/hl-todo/packages.el -(package! hl-todo :pin "3bba4591c5") +(package! hl-todo :pin "3bba4591c54951d2abab113ec5e58a6319808ca9") diff --git a/modules/ui/hydra/packages.el b/modules/ui/hydra/packages.el index 539cf3928..782bde9a5 100644 --- a/modules/ui/hydra/packages.el +++ b/modules/ui/hydra/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/hydra/packages.el -(package! hydra :pin "16fa8d109e") +(package! hydra :pin "16fa8d109ec5799931a793b2e866ea9d593bee84") diff --git a/modules/ui/indent-guides/packages.el b/modules/ui/indent-guides/packages.el index 3a6856a27..dab8cc821 100644 --- a/modules/ui/indent-guides/packages.el +++ b/modules/ui/indent-guides/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/indent-guides/packages.el -(package! highlight-indent-guides :pin "1b12c7b440") +(package! highlight-indent-guides :pin "1b12c7b440ff988c7237936187c1375ac4ddc7f4") diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index f9427d43e..8e843630b 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "c177959bbf")) -(package! anzu :pin "3e34fb3df5") + (package! doom-modeline :pin "c177959bbfa7fa6f199b1145c6986e55f462f1c1")) +(package! anzu :pin "3e34fb3df53c0c68e842fa179c327a7395d1901d") (when (featurep! :editor evil) - (package! evil-anzu :pin "9bca6ca14d")) + (package! evil-anzu :pin "9bca6ca14d865e7e005bc02a28a09b4ae74facc9")) diff --git a/modules/ui/nav-flash/packages.el b/modules/ui/nav-flash/packages.el index 12e2a5a1f..3cc02ee6e 100644 --- a/modules/ui/nav-flash/packages.el +++ b/modules/ui/nav-flash/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/nav-flash/packages.el -(package! nav-flash :pin "dbb9121663") +(package! nav-flash :pin "dbb91216637e0a1e8bfd59aa883c75d45db70daf") diff --git a/modules/ui/neotree/packages.el b/modules/ui/neotree/packages.el index 7cf6041ab..77fc8ff45 100644 --- a/modules/ui/neotree/packages.el +++ b/modules/ui/neotree/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/neotree/packages.el -(package! neotree :pin "98fe21334a") +(package! neotree :pin "5e1271655170f4cdc6849258e383c548a4e6e3d0") diff --git a/modules/ui/ophints/packages.el b/modules/ui/ophints/packages.el index 000154257..3070cc9fb 100644 --- a/modules/ui/ophints/packages.el +++ b/modules/ui/ophints/packages.el @@ -2,5 +2,5 @@ ;;; ui/ophints/packages.el (if (featurep! :editor evil) - (package! evil-goggles :pin "08a22058fd") - (package! volatile-highlights :pin "9a20091f0c")) + (package! evil-goggles :pin "08a22058fd6a167f9f1b684c649008caef571459") + (package! volatile-highlights :pin "9a20091f0ce7fc0a6b3e641a6a46d5f3ac4d8392")) diff --git a/modules/ui/tabs/packages.el b/modules/ui/tabs/packages.el index e9e125e99..75f6debda 100644 --- a/modules/ui/tabs/packages.el +++ b/modules/ui/tabs/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/tabs/packages.el -(package! centaur-tabs :pin "e6bf9f5257") +(package! centaur-tabs :pin "e6bf9f5257fa5401695e0e33d0376a0821ac2f2f") diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index a1e1ead7e..4c5b3e7ef 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs :pin "ee1b523b28") +(package! treemacs :pin "10c96c9cd9e06f1bff7a708987861a8e73480647") ;; These packages have no :pin because they're in the same repo (when (featurep! :editor evil +everywhere) (package! treemacs-evil)) diff --git a/modules/ui/unicode/packages.el b/modules/ui/unicode/packages.el index a7c7dfcd7..cafa4ae2e 100644 --- a/modules/ui/unicode/packages.el +++ b/modules/ui/unicode/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/unicode/packages.el -(package! unicode-fonts :pin "7b88ae84e5") +(package! unicode-fonts :pin "7b88ae84e589f6c8b9386b2fb5a02ff4ccb91169") diff --git a/modules/ui/vc-gutter/packages.el b/modules/ui/vc-gutter/packages.el index 9196a2abb..67d3886ed 100644 --- a/modules/ui/vc-gutter/packages.el +++ b/modules/ui/vc-gutter/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/vc-gutter/packages.el -(package! git-gutter-fringe :pin "da19a47413") +(package! git-gutter-fringe :pin "da19a474137876b29b5658ee7e9ae366f2b65c1d") diff --git a/modules/ui/vi-tilde-fringe/packages.el b/modules/ui/vi-tilde-fringe/packages.el index 2aad44c2f..36b4004e8 100644 --- a/modules/ui/vi-tilde-fringe/packages.el +++ b/modules/ui/vi-tilde-fringe/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/vi-tilde-fringe/packages.el -(package! vi-tilde-fringe :pin "f1597a8d54") +(package! vi-tilde-fringe :pin "f1597a8d54535bb1d84b442577b2024e6f910308") diff --git a/modules/ui/window-select/packages.el b/modules/ui/window-select/packages.el index 455caf83a..4139119f7 100644 --- a/modules/ui/window-select/packages.el +++ b/modules/ui/window-select/packages.el @@ -2,8 +2,8 @@ ;;; ui/window-select/packages.el (if (featurep! +switch-window) - (package! switch-window :pin "204f9fc1a3") - (package! ace-window :pin "7e0777b39a")) + (package! switch-window :pin "204f9fc1a39868a2d16ab9370a142c8c9c7a0943") + (package! ace-window :pin "7003c88cd9cad58dc35c7cd13ebc61c355fb5be7")) (when (featurep! +numbers) - (package! winum :pin "c5455e866e")) + (package! winum :pin "c5455e866e8a5f7eab6a7263e2057aff5f1118b9")) diff --git a/modules/ui/workspaces/packages.el b/modules/ui/workspaces/packages.el index f68166146..72ce81a31 100644 --- a/modules/ui/workspaces/packages.el +++ b/modules/ui/workspaces/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/workspaces/packages.el -(package! persp-mode :pin "391a7dc248") +(package! persp-mode :pin "391a7dc248c9c04b7ad424c696bdff578e14dd2c") diff --git a/modules/ui/zen/packages.el b/modules/ui/zen/packages.el index a3c3613a4..3f1b2341c 100644 --- a/modules/ui/zen/packages.el +++ b/modules/ui/zen/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/zen/packages.el -(package! writeroom-mode :pin "20c761b800") -(package! mixed-pitch :pin "734fbdf2d2") +(package! writeroom-mode :pin "7f7acde5e8fc4ba74e511ca295e21f9ba7874730") +(package! mixed-pitch :pin "734fbdf2d2c17beee151faf39bd10174a87eea5d") From 40c185bd70f85d3df7fa2a9523df6680abbae314 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Apr 2020 23:36:05 -0400 Subject: [PATCH 153/229] Bump :tools Silex/docker.el@a2092b3 -> Silex/docker.el@0874520 emacs-lsp/dap-mode@0b9c8f2 -> emacs-lsp/dap-mode@804e364 emacs-lsp/helm-lsp@db24399 -> emacs-lsp/helm-lsp@6b5ce18 emacs-lsp/lsp-mode@4898d35 -> emacs-lsp/lsp-mode@87ea1df emacs-straight/rainbow-mode@3ef813d -> emacs-straight/rainbow-mode@f780ddb emacsorphanage/quickrun@50e07e7 -> emacsorphanage/quickrun@2e37ce9 magit/magit@8de6ecf -> magit/magit@d27d6e4 maxchaos/emacs-powerthesaurus@81a262e -> maxchaos/emacs-powerthesaurus@4a83478 millejoh/emacs-ipython-notebook@1322d8c -> millejoh/emacs-ipython-notebook@42134ad politza/pdf-tools@0159cb1 -> politza/pdf-tools@d971298 realgud/realgud@b854e04 -> realgud/realgud@e03446f tumashu/posframe@e62e584 -> tumashu/posframe@093b29a zx2c4/password-store@88936b1 -> zx2c4/password-store@07b169e We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/tools/ansible/packages.el | 10 +++++----- modules/tools/debugger/packages.el | 8 ++++---- modules/tools/direnv/packages.el | 2 +- modules/tools/docker/packages.el | 6 +++--- modules/tools/editorconfig/packages.el | 2 +- modules/tools/ein/packages.el | 2 +- modules/tools/eval/packages.el | 4 ++-- modules/tools/gist/packages.el | 2 +- modules/tools/lookup/packages.el | 24 ++++++++++++------------ modules/tools/lsp/packages.el | 10 +++++----- modules/tools/magit/packages.el | 12 ++++++------ modules/tools/make/packages.el | 2 +- modules/tools/pass/packages.el | 12 ++++++------ modules/tools/pdf/packages.el | 2 +- modules/tools/prodigy/packages.el | 2 +- modules/tools/rgb/packages.el | 4 ++-- modules/tools/terraform/packages.el | 4 ++-- modules/tools/upload/packages.el | 2 +- 18 files changed, 55 insertions(+), 55 deletions(-) diff --git a/modules/tools/ansible/packages.el b/modules/tools/ansible/packages.el index 6ec7c4341..3378a9076 100644 --- a/modules/tools/ansible/packages.el +++ b/modules/tools/ansible/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/ansible/packages.el -(package! ansible :recipe (:nonrecursive t) :pin "c6532e5216") -(package! ansible-doc :pin "86083a7bb2") -(package! jinja2-mode :pin "cfaa7bbe7b") -(package! yaml-mode :pin "cecf4b106b") +(package! ansible :recipe (:nonrecursive t) :pin "c6532e52161a381ed3dddfeaa7c92ae636d3f052") +(package! ansible-doc :pin "86083a7bb2ed0468ca64e52076b06441a2f8e9e0") +(package! jinja2-mode :pin "cfaa7bbe7bb290cc500440124ce89686f3e26f86") +(package! yaml-mode :pin "cecf4b106b0c4236931b14919fdf87ff3546e2c9") (when (featurep! :completion company) - (package! company-ansible :pin "79dd421b16")) + (package! company-ansible :pin "79dd421b161efa49fbdffad57fa40edb41f484a3")) diff --git a/modules/tools/debugger/packages.el b/modules/tools/debugger/packages.el index 9321e25fb..346677dce 100644 --- a/modules/tools/debugger/packages.el +++ b/modules/tools/debugger/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/debugger/packages.el -(when (package! realgud :pin "b854e040e0") +(when (package! realgud :pin "e03446f54c7ee0b4ed3ec7300597046cf1de2bb8") (when (featurep! :lang javascript) - (package! realgud-trepan-ni :pin "6e9cac5e80"))) + (package! realgud-trepan-ni :pin "6e9cac5e8097018aadf41c88de541168036cc227"))) (when (featurep! +lsp) - (package! dap-mode :pin "0b9c8f28ad") - (package! posframe :pin "e62e584268")) + (package! dap-mode :pin "804e364162a76b545a3f866827a2dc4e4dcbe836") + (package! posframe :pin "093b29a53cbeda6d637ccc9ef4dfc47123e79b9e")) diff --git a/modules/tools/direnv/packages.el b/modules/tools/direnv/packages.el index ff4716f38..1424dc52c 100644 --- a/modules/tools/direnv/packages.el +++ b/modules/tools/direnv/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/direnv/packages.el -(package! direnv :pin "1daf479b9b") +(package! direnv :pin "1daf479b9b7600ce9681f2a980deae7fcb2f3d59") diff --git a/modules/tools/docker/packages.el b/modules/tools/docker/packages.el index a40c377f1..f7bab25dd 100644 --- a/modules/tools/docker/packages.el +++ b/modules/tools/docker/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/docker/packages.el -(package! docker :pin "a2092b3b17") -(package! docker-tramp :pin "8e2b671eff") -(package! dockerfile-mode :pin "d31f7685eb") +(package! docker :pin "08745207332d940130a2357eb5c5e00fd88bd6af") +(package! docker-tramp :pin "8e2b671eff7a81af43b76d9dfcf94ddaa8333a23") +(package! dockerfile-mode :pin "d31f7685ebc5832d957e25070a930aa42984327d") diff --git a/modules/tools/editorconfig/packages.el b/modules/tools/editorconfig/packages.el index a1d8ad9ff..0d35f6195 100644 --- a/modules/tools/editorconfig/packages.el +++ b/modules/tools/editorconfig/packages.el @@ -3,4 +3,4 @@ (package! editorconfig :recipe (:nonrecursive t) - :pin "19de0ec1ba") + :pin "19de0ec1bac67c5a76a4dd3d8ffe6c5411ace1af") diff --git a/modules/tools/ein/packages.el b/modules/tools/ein/packages.el index 0e53a4f1d..a9a9325b4 100644 --- a/modules/tools/ein/packages.el +++ b/modules/tools/ein/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/ein/packages.el -(package! ein :pin "1322d8c7f8") +(package! ein :pin "42134adf3c95b7768e2d725bab39ddb98feafa09") diff --git a/modules/tools/eval/packages.el b/modules/tools/eval/packages.el index aed6e4482..dfdbc665b 100644 --- a/modules/tools/eval/packages.el +++ b/modules/tools/eval/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/eval/packages.el -(package! quickrun :pin "50e07e7698") +(package! quickrun :pin "2e37ce9e4b13359344dbd67fbfd7e39d46b2c6b6") (when (featurep! +overlay) - (package! eros :pin "dd89102792")) + (package! eros :pin "dd8910279226259e100dab798b073a52f9b4233a")) diff --git a/modules/tools/gist/packages.el b/modules/tools/gist/packages.el index 44680cb30..f8a971d9f 100644 --- a/modules/tools/gist/packages.el +++ b/modules/tools/gist/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/gist/packages.el -(package! gist :pin "314fe6ab80") +(package! gist :pin "314fe6ab80fae35b95f0734eceb82f72813b6f41") diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 0206f4c1f..e42c7449d 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -8,32 +8,32 @@ (package! helm)) ;; -(package! dumb-jump :pin "d760aa880f") +(package! dumb-jump :pin "d760aa880fc1052570ab0fd7e586eeffb7636af6") (when (featurep! :completion ivy) - (package! ivy-xref :pin "3d4c35fe2b")) + (package! ivy-xref :pin "3d4c35fe2b243d948d8fe02a1f0d76a249d63de9")) (when (featurep! :completion helm) - (package! helm-xref :pin "6b4a8bd91f")) + (package! helm-xref :pin "6b4a8bd91f5eaf82f51bd31b03f6587387fe6983")) ;; For dictionary and online lookup -(package! request :pin "216d570a58") +(package! request :pin "216d570a58d05ef1307edb63d2539bafa5f688c6") (when (featurep! +docsets) - (package! dash-docs :pin "111fd9b970") + (package! dash-docs :pin "111fd9b97001f1ad887b45e5308a14ddd68ce70a") (when (featurep! :completion helm) - (package! helm-dash :pin "7f853bd34d")) + (package! helm-dash :pin "7f853bd34da666f0e9a883011c80f451b06f6c59")) (when (featurep! :completion ivy) - (package! counsel-dash :pin "370d5f6f14"))) + (package! counsel-dash :pin "370d5f6f14b5294d0eb717f7b2a6a8e93df1ed24"))) (when (featurep! +dictionary) (if IS-MAC - (package! osx-dictionary :pin "1b79ff64c7") - (package! define-word :pin "08c71b1ff4") + (package! osx-dictionary :pin "1b79ff64c72485cb078db9ab7ee3256b11a99f4b") + (package! define-word :pin "08c71b1ff4fd07bf0c78d1fcf77efeaafc8f7443") ;; HACK Fix #2945: the main package is broken (see ;; SavchenkoValeriy/emacs-powerthesaurus). We use this fork until it is ;; merged. (package! powerthesaurus :recipe (:host github :repo "maxchaos/emacs-powerthesaurus" :branch "pt-api-change") - :pin "81a262ec0c") + :pin "4a834782a394f2dc70fc02d68b6962b44d87f0cf") (when (featurep! +offline) - (package! wordnut :pin "feac531404") - (package! synosaurus :pin "14d34fc92a")))) + (package! wordnut :pin "feac531404041855312c1a046bde7ea18c674915") + (package! synosaurus :pin "14d34fc92a77c3a916b4d58400424c44ae99cd81")))) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index 29c0649a0..160bac8c0 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode :pin "4898d35ace") -(package! lsp-ui :pin "242dfe859c") +(package! lsp-mode :pin "87ea1df50f1659c521684f01bc518eac4bf7b2a0") +(package! lsp-ui :pin "242dfe859c3497c456eaacfd84942e12419529fe") (when (featurep! :completion company) - (package! company-lsp :pin "f921ffa0cd")) + (package! company-lsp :pin "f921ffa0cdc542c21dc3dd85f2c93df4288e83bd")) (when (featurep! :completion ivy) - (package! lsp-ivy :pin "81e81ced99")) + (package! lsp-ivy :pin "81e81ced99829358674c5a6bbe2c3e15cecd4ed8")) (when (featurep! :completion helm) - (package! helm-lsp :pin "db243993ea")) + (package! helm-lsp :pin "6b5ce182d7c94c62b55b8f7d0c7e643b2c30e560")) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index 97ac695ce..f1bd7253d 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit :pin "8de6ecf5c5") +(when (package! magit :pin "d27d6e467857ed4a78c7cf7d609561df789e2a6c") (when (featurep! +forge) - (package! forge :pin "e2da80660a")) - (package! magit-gitflow :pin "cc41b561ec") - (package! magit-todos :pin "a0e5d1f3c7") - (package! github-review :pin "50c6bcc7cf") + (package! forge :pin "e2da80660a0550f613400ce3b238025589800417")) + (package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b") + (package! magit-todos :pin "a0e5d1f3c7dfcb4f18c1b0d57f1746a4872df5c6") + (package! github-review :pin "50c6bcc7cf4d7193577b3f74eea4dd72f2b7795b") (when (featurep! :editor evil +everywhere) - (package! evil-magit :pin "253c644807"))) + (package! evil-magit :pin "253c644807013fe92429acdef418748794b8f254"))) diff --git a/modules/tools/make/packages.el b/modules/tools/make/packages.el index d389186b5..815c945d3 100644 --- a/modules/tools/make/packages.el +++ b/modules/tools/make/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/make/packages.el -(package! makefile-executor :pin "9a7d78f814") +(package! makefile-executor :pin "9a7d78f814a4b372d8f8179819cb1b37b83b1973") diff --git a/modules/tools/pass/packages.el b/modules/tools/pass/packages.el index f998eb0e1..6f9dea011 100644 --- a/modules/tools/pass/packages.el +++ b/modules/tools/pass/packages.el @@ -1,17 +1,17 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pass/packages.el -(package! pass :pin "919d8e3826") -(package! password-store :pin "88936b11af") -(package! password-store-otp :pin "04998c8578") +(package! pass :pin "919d8e3826d556433ab67d4ee21a509d209d1baa") +(package! password-store :pin "07b169ec32ad6961ed8625a0b932a663abcb01d2") +(package! password-store-otp :pin "04998c8578a060ab4a4e8f46f2ee0aafad4ab4d5") ;; an older version of `auto-source-pass' is built into Emacs 26+, so we must ;; install the new version directly from the source and with a psuedonym. (package! auth-source-pass :recipe (:host github :repo "DamienCassou/auth-password-store") - :pin "ff4940c647") + :pin "ff4940c647786914b3cbef69103d96a4ea334111") (when (featurep! :completion ivy) - (package! ivy-pass :pin "5b523de115")) + (package! ivy-pass :pin "5b523de1151f2109fdd6a8114d0af12eef83d3c5")) (when (featurep! :completion helm) - (package! helm-pass :pin "ed5798f2d8")) + (package! helm-pass :pin "ed5798f2d83937575e8f23fde33323bca9e85131")) diff --git a/modules/tools/pdf/packages.el b/modules/tools/pdf/packages.el index 06ef963d3..046c2ea84 100644 --- a/modules/tools/pdf/packages.el +++ b/modules/tools/pdf/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pdf/packages.el -(package! pdf-tools :pin "0159cb1ab3") +(package! pdf-tools :pin "d9712989fc4715443f674459199bdffa987054ac") diff --git a/modules/tools/prodigy/packages.el b/modules/tools/prodigy/packages.el index edb10f54c..57dc56a4f 100644 --- a/modules/tools/prodigy/packages.el +++ b/modules/tools/prodigy/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/prodigy/packages.el -(package! prodigy :pin "6ae71f27b0") +(package! prodigy :pin "6ae71f27b09b172f03fb55b9eeef001206baacd3") diff --git a/modules/tools/rgb/packages.el b/modules/tools/rgb/packages.el index 22b018737..d916da671 100644 --- a/modules/tools/rgb/packages.el +++ b/modules/tools/rgb/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/rgb/packages.el -(package! rainbow-mode :pin "3ef813d637") -(package! kurecolor :pin "3fc84840cb") +(package! rainbow-mode :pin "f780ddb18c2a73a666d093f606df92058e5601ea") +(package! kurecolor :pin "3fc84840cbbd75e646cafa2fd3a00004b55e37ec") diff --git a/modules/tools/terraform/packages.el b/modules/tools/terraform/packages.el index 25156c92e..a7452abef 100644 --- a/modules/tools/terraform/packages.el +++ b/modules/tools/terraform/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/terraform/packages.el -(package! terraform-mode :pin "2967e7bdc0") +(package! terraform-mode :pin "2967e7bdc05d15617e121052f6e43c61439b9070") (when (featurep! :completion company) - (package! company-terraform :pin "2d11a21fee")) + (package! company-terraform :pin "2d11a21fee2f298e48968e479ddcaeda4d736e12")) diff --git a/modules/tools/upload/packages.el b/modules/tools/upload/packages.el index 4925d1306..d26bd9346 100644 --- a/modules/tools/upload/packages.el +++ b/modules/tools/upload/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/upload/packages.el -(package! ssh-deploy :pin "1bb2f821d4") +(package! ssh-deploy :pin "1bb2f821d4a78d483c147759348a29531486cdc4") From 08f139391d6dede2aff7a8430c4b77c80f06530f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 00:09:07 -0400 Subject: [PATCH 154/229] Bump :editor PythonNut/evil-easymotion@79c13ed -> PythonNut/evil-easymotion@f96c2ed abo-abo/lispy@c7e282a -> abo-abo/lispy@cdaa9c7 clemera/objed@8dc1770 -> clemera/objed@e89d8da emacs-evil/evil-collection@493d523 -> emacs-evil/evil-collection@ba36304 emacs-evil/evil@8aa6337 -> emacs-evil/evil@d243eae hlissner/doom-snippets@feaedeb -> hlissner/doom-snippets@422f683 hlissner/evil-snipe@3ec8adf -> hlissner/evil-snipe@2ba6353 joaotavora/yasnippet@ac03c2f -> joaotavora/yasnippet@5b1217a mrkkrp/vimish-fold@d3248a4 -> mrkkrp/vimish-fold@6368523 redguardtoo/evil-nerd-commenter@747e346 -> redguardtoo/evil-nerd-commenter@1bd2de5 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/editor/evil/packages.el | 36 ++++++++++----------- modules/editor/file-templates/packages.el | 2 +- modules/editor/fold/packages.el | 4 +-- modules/editor/god/packages.el | 2 +- modules/editor/lispy/packages.el | 4 +-- modules/editor/multiple-cursors/packages.el | 6 ++-- modules/editor/objed/packages.el | 2 +- modules/editor/parinfer/packages.el | 2 +- modules/editor/rotate-text/packages.el | 2 +- modules/editor/snippets/packages.el | 6 ++-- modules/editor/word-wrap/packages.el | 2 +- 11 files changed, 34 insertions(+), 34 deletions(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 2a427f444..75b9d8f23 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -1,27 +1,27 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/packages.el -(package! evil :pin "8aa6337fa8") -(package! evil-args :pin "758ad5ae54") -(package! evil-easymotion :pin "79c13ed3bc") -(package! evil-embrace :pin "4379adea03") -(package! evil-escape :pin "f4e9116bfb") -(package! evil-exchange :pin "3030e21ee1") -(package! evil-indent-plus :pin "0c7501e6ef") -(package! evil-lion :pin "6b03593f5d") -(package! evil-nerd-commenter :pin "747e346f11") +(package! evil :pin "d243eae8649272799ec3864fde14c1164f036940") +(package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387") +(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9") +(package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7") +(package! evil-escape :pin "f4e9116bfbaac8c9d210c17ad488e0982291245f") +(package! evil-exchange :pin "3030e21ee16a42dfce7f7cf86147b778b3f5d8c1") +(package! evil-indent-plus :pin "0c7501e6efed661242c3a20e0a6c79a6455c2c40") +(package! evil-lion :pin "6b03593f5dd6e7c9ca02207f9a73615cf94c93ab") +(package! evil-nerd-commenter :pin "1bd2de52011c39777a3e8779b14cee2790dc873b") (package! evil-numbers :recipe (:host github :repo "janpath/evil-numbers") - :pin "c2cfdd1eb1") -(package! evil-snipe :pin "3ec8adfd49") -(package! evil-surround :pin "9b0b17f06c") -(package! evil-textobj-anyblock :pin "ff00980f06") -(package! evil-traces :pin "bc25cae9fa") -(package! evil-visualstar :pin "06c053d8f7") -(package! exato :pin "d5daea3017") + :pin "c2cfdd1eb1f193bea28ee79b191b78309677058a") +(package! evil-snipe :pin "2ba6353bb9253dbbc4193f1d35403e7dcc1317b1") +(package! evil-surround :pin "9b0b17f06cef9bac81ee4800d121265e54718a17") +(package! evil-textobj-anyblock :pin "ff00980f0634f95bf2ad9956b615a155ea8743be") +(package! evil-traces :pin "bc25cae9fa5ab0ba1507827f0944f52ce0ca7462") +(package! evil-visualstar :pin "06c053d8f7381f91c53311b1234872ca96ced752") +(package! exato :pin "d5daea30176d48e74c9d063ac9bfc240ebeb97d0") (package! evil-quick-diff :recipe (:host github :repo "rgrinberg/evil-quick-diff") - :pin "69c883720b") + :pin "69c883720b30a892c63bc89f49d4f0e8b8028908") ;; (when (featurep! +everywhere) @@ -31,4 +31,4 @@ (package! neotree) (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection :pin "493d523c9b")) + (package! evil-collection :pin "ba3630476b3927d9d2e3ec75308a28e3a5bd54a8")) diff --git a/modules/editor/file-templates/packages.el b/modules/editor/file-templates/packages.el index 42c98b815..2a16ccb75 100644 --- a/modules/editor/file-templates/packages.el +++ b/modules/editor/file-templates/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/file-templates/packages.el -(package! yasnippet :pin "ac03c2f192") +(package! yasnippet :pin "5b1217ab085fab4abeb1118dccb260691b446703") diff --git a/modules/editor/fold/packages.el b/modules/editor/fold/packages.el index 9420d41a5..de5af2df9 100644 --- a/modules/editor/fold/packages.el +++ b/modules/editor/fold/packages.el @@ -3,6 +3,6 @@ (package! hideshow :built-in t) -(package! vimish-fold :pin "d3248a41a7") +(package! vimish-fold :pin "63685239655a151181b9152e45478dad587f86f2") (when (featurep! :editor evil) - (package! evil-vimish-fold :pin "b6e0e6b91b")) + (package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a")) diff --git a/modules/editor/god/packages.el b/modules/editor/god/packages.el index 1dc6a2016..edfcc1033 100644 --- a/modules/editor/god/packages.el +++ b/modules/editor/god/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/god/packages.el -(package! god-mode :pin "1eb6ef3a4f") +(package! god-mode :pin "1eb6ef3a4f67a805c5d6deb1e3895b6c853707d7") diff --git a/modules/editor/lispy/packages.el b/modules/editor/lispy/packages.el index 747c914ec..7f343c5a3 100644 --- a/modules/editor/lispy/packages.el +++ b/modules/editor/lispy/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/lispyville/packages.el -(package! lispy :pin "c7e282ae06") +(package! lispy :pin "cdaa9c70ca39a880163cbbce924bb46cc56b9fa4") (when (featurep! :editor evil) - (package! lispyville :pin "25a70126ea")) + (package! lispyville :pin "25a70126ea807653e0a8c512d4128c90ed673d7a")) diff --git a/modules/editor/multiple-cursors/packages.el b/modules/editor/multiple-cursors/packages.el index 72dfe9061..5e317fe2d 100644 --- a/modules/editor/multiple-cursors/packages.el +++ b/modules/editor/multiple-cursors/packages.el @@ -3,7 +3,7 @@ (cond ((featurep! :editor evil) - (package! evil-multiedit :pin "9f271e0e60") - (package! evil-mc :pin "4d4c0172e4")) + (package! evil-multiedit :pin "9f271e0e6048297692f80ed6c5ae8994ac523abc") + (package! evil-mc :pin "4d4c0172e4c7f80acc1d0e73d5fb3e536929b262")) - ((package! multiple-cursors :pin "b880554d04"))) + ((package! multiple-cursors :pin "b880554d04b8f61165afba7d4de19ac9e39bb7ab"))) diff --git a/modules/editor/objed/packages.el b/modules/editor/objed/packages.el index 49c15be40..5b49d2fbf 100644 --- a/modules/editor/objed/packages.el +++ b/modules/editor/objed/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/objed/packages.el -(package! objed :pin "8dc17701d1") +(package! objed :pin "e89d8dae3b2d4331a4455d2a7b203500537d184d") diff --git a/modules/editor/parinfer/packages.el b/modules/editor/parinfer/packages.el index df109114b..a3badc94c 100644 --- a/modules/editor/parinfer/packages.el +++ b/modules/editor/parinfer/packages.el @@ -11,4 +11,4 @@ ;; separate session: (autoload 'evil-define-key "evil-core" nil nil 'macro)) -(package! parinfer :pin "eaad857ae4") +(package! parinfer :pin "eaad857ae4351f72a561ee3dec8943713510003f") diff --git a/modules/editor/rotate-text/packages.el b/modules/editor/rotate-text/packages.el index 15c7216dd..846641da6 100644 --- a/modules/editor/rotate-text/packages.el +++ b/modules/editor/rotate-text/packages.el @@ -3,4 +3,4 @@ (package! rotate-text :recipe (:host github :repo "debug-ito/rotate-text.el") - :pin "48f193697d") + :pin "48f193697db996855aee1ad2bc99b38c6646fe76") diff --git a/modules/editor/snippets/packages.el b/modules/editor/snippets/packages.el index fec5e4d36..12b720197 100644 --- a/modules/editor/snippets/packages.el +++ b/modules/editor/snippets/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/snippets/packages.el -(package! yasnippet :pin "5b1217ab08") -(package! auto-yasnippet :pin "db9e0dd433") +(package! yasnippet :pin "5b1217ab085fab4abeb1118dccb260691b446703") +(package! auto-yasnippet :pin "db9e0dd4335b2202cd5dac95bbbc87a1032d9bbe") (package! doom-snippets :recipe (:host github :repo "hlissner/doom-snippets" :files ("*.el" "*")) - :pin "feaedeb550") + :pin "422f683adfbec1b01fe00524690b64dc9e702ae0") diff --git a/modules/editor/word-wrap/packages.el b/modules/editor/word-wrap/packages.el index 8a82b406d..1e31f226e 100644 --- a/modules/editor/word-wrap/packages.el +++ b/modules/editor/word-wrap/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/word-wrap/packages.el -(package! adaptive-wrap :pin "1810c0ee8d") +(package! adaptive-wrap :pin "1810c0ee8d827dd502ddeaae5bd759d4811fcbce") From 0ca9b4b12fb1886b10f09d9632be00e624f037a6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 00:18:31 -0400 Subject: [PATCH 155/229] Bump :emacs dgutov/diff-hl@2cf8b48 -> dgutov/diff-hl@a625033 ideasman42/emacs-undo-fu@0c34b67 -> ideasman42/emacs-undo-fu@0ce9ac3 jtbm37/all-the-icons-dired@816987d -> jtbm37/all-the-icons-dired@fc2dfa1 ralesi/ranger.el@af6f781 -> ralesi/ranger.el@ae9b381 yqrashawn/fd-dired@fd4c3f4 -> yqrashawn/fd-dired@001cc95 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/emacs/dired/packages.el | 14 +++++++------- modules/emacs/ibuffer/packages.el | 4 ++-- modules/emacs/undo/packages.el | 6 +++--- modules/emacs/vc/packages.el | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/emacs/dired/packages.el b/modules/emacs/dired/packages.el index fe6498417..9a483f259 100644 --- a/modules/emacs/dired/packages.el +++ b/modules/emacs/dired/packages.el @@ -1,12 +1,12 @@ ;; -*- no-byte-compile: t; -*- ;;; emacs/dired/packages.el -(package! diredfl :pin "83567d00af") -(package! dired-git-info :pin "b47f2b0c3a") -(package! diff-hl :pin "2cf8b489f3") -(package! dired-rsync :pin "bfd5c155be") +(package! diredfl :pin "83567d00affce66a4e501563eddd0bd436ac48d0") +(package! dired-git-info :pin "b47f2b0c3a6cb9b7a62a4ee2605a492e512d40a9") +(package! diff-hl :pin "a625033fb1dde83f6e4c2fc21f632b22ec34b609") +(package! dired-rsync :pin "bfd5c155be1cb6b71c83e5f41116c81b6532b6d5") (when (featurep! +ranger) - (package! ranger :pin "af6f781a60")) + (package! ranger :pin "ae9b3816a6da927cca5beb62c45400103797a2da")) (when (featurep! +icons) - (package! all-the-icons-dired :pin "816987d339")) -(package! fd-dired :pin "fd4c3f490b") + (package! all-the-icons-dired :pin "fc2dfa1e9eb8bf1c402a675e7089638d702a27a5")) +(package! fd-dired :pin "001cc95effdd5c4d9974b3f2c40b2ddf1f0e3de2") diff --git a/modules/emacs/ibuffer/packages.el b/modules/emacs/ibuffer/packages.el index 037024cc6..a43d06d4b 100644 --- a/modules/emacs/ibuffer/packages.el +++ b/modules/emacs/ibuffer/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; emacs/ibuffer/packages.el -(package! ibuffer-projectile :pin "504b0edaa0") -(package! ibuffer-vc :pin "1249c1e30c") +(package! ibuffer-projectile :pin "504b0edaa0d937ce60ccc8fdf09f2dae0a90fbaf") +(package! ibuffer-vc :pin "1249c1e30cf11badfe032ac3b1058f24ba510ace") diff --git a/modules/emacs/undo/packages.el b/modules/emacs/undo/packages.el index d960bda32..8c21f4904 100644 --- a/modules/emacs/undo/packages.el +++ b/modules/emacs/undo/packages.el @@ -2,6 +2,6 @@ ;;; emacs/undo/packages.el (if (featurep! +tree) - (package! undo-tree :pin "5b6df03781") - (package! undo-fu :pin "0c34b6747e") - (package! undo-fu-session :pin "b808ef0cdc")) + (package! undo-tree :pin "5b6df03781495d8a25695d846b0cce496d3d3058") + (package! undo-fu :pin "0ce9ac36144e80316fff50bfe1bc5dd7e5e7ded6") + (package! undo-fu-session :pin "b808ef0cdcdd2eef221c67eda567eed7fcb3d4af")) diff --git a/modules/emacs/vc/packages.el b/modules/emacs/vc/packages.el index 693554e96..b022a543c 100644 --- a/modules/emacs/vc/packages.el +++ b/modules/emacs/vc/packages.el @@ -5,7 +5,7 @@ (package! vc-annotate :built-in t) (package! smerge-mode :built-in t) -(package! browse-at-remote :pin "6aecae4b5d") -(package! git-timemachine :pin "391eb61050") -(package! gitconfig-mode :pin "55468314a5") -(package! gitignore-mode :pin "55468314a5") +(package! browse-at-remote :pin "6aecae4b5d202e582425fc8aa2c9c2b6a4779f25") +(package! git-timemachine :pin "391eb61050de321101e631fcf373fc70ec6e7700") +(package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") +(package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") From 8b5525049d6a0c24a4b6209ed761e554f579c0fd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 00:21:21 -0400 Subject: [PATCH 156/229] Bump :checkers d12frosted/flyspell-correct@e765d1a -> d12frosted/flyspell-correct@fd8ac7a flycheck/flycheck@f19a51c -> flycheck/flycheck@246e1d4 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/checkers/grammar/packages.el | 4 ++-- modules/checkers/spell/packages.el | 10 +++++----- modules/checkers/syntax/packages.el | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/checkers/grammar/packages.el b/modules/checkers/grammar/packages.el index 052e9207c..3207a672d 100644 --- a/modules/checkers/grammar/packages.el +++ b/modules/checkers/grammar/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/grammar/packages.el -(package! langtool :pin "a71ed02ce0") -(package! writegood-mode :pin "b71757ec33") +(package! langtool :pin "a71ed02ce06920ae3cafd6708de1c21811ce14c3") +(package! writegood-mode :pin "b71757ec337e226909fb0422f0224e31acc71733") diff --git a/modules/checkers/spell/packages.el b/modules/checkers/spell/packages.el index 083a1cf12..254de3230 100644 --- a/modules/checkers/spell/packages.el +++ b/modules/checkers/spell/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/spell/packages.el -(package! flyspell-correct :pin "e765d1a3d9") +(package! flyspell-correct :pin "fd8ac7a4f922ce5ea1cc5d4583a7d584847cb6b5") (cond ((featurep! :completion ivy) - (package! flyspell-correct-ivy :pin "e765d1a3d9")) + (package! flyspell-correct-ivy)) ((featurep! :completion helm) - (package! flyspell-correct-helm :pin "e765d1a3d9")) - ((package! flyspell-correct-popup :pin "e765d1a3d9"))) + (package! flyspell-correct-helm)) + ((package! flyspell-correct-popup))) -(package! flyspell-lazy :pin "3ebf68cc9e") +(package! flyspell-lazy :pin "3ebf68cc9eb10c972a2de8d7861cbabbbce69570") diff --git a/modules/checkers/syntax/packages.el b/modules/checkers/syntax/packages.el index d4cf34bbc..a1db8dc40 100644 --- a/modules/checkers/syntax/packages.el +++ b/modules/checkers/syntax/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/syntax/packages.el -(package! flycheck :pin "f19a51c0f1") -(package! flycheck-popup-tip :pin "ef86aad907") +(package! flycheck :pin "246e1d4380721ca03962464f11d02dd1372860ce") +(package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6") (when (featurep! +childframe) - (package! flycheck-posframe :pin "2b3e94c2e4")) + (package! flycheck-posframe :pin "2b3e94c2e427ec9831c513007460c5ea9e2225a3")) ;; TODO flymake? From fb831a3bcf69f2af8c8a4f09620d9cee33073a57 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 00:24:26 -0400 Subject: [PATCH 157/229] Bump :app abo-abo/avy@3bf8314 -> abo-abo/avy@509471b kidd/org-gcal.el@6821e34 -> kidd/org-gcal.el@1667aba skeeto/elfeed@d0405e6 -> remyhonig/elfeed-org@77b6bbf We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/app/calendar/packages.el | 6 +++--- modules/app/irc/packages.el | 4 ++-- modules/app/rss/packages.el | 4 ++-- modules/app/twitter/packages.el | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/app/calendar/packages.el b/modules/app/calendar/packages.el index 9f10dc730..960db04dd 100644 --- a/modules/app/calendar/packages.el +++ b/modules/app/calendar/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; app/calendar/packages.el -(package! calfw :pin "03abce9762") -(package! calfw-org :pin "03abce9762") -(package! org-gcal :pin "6821e34967") +(package! calfw :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") +(package! calfw-org :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") +(package! org-gcal :pin "1667aba7c0a33e3c23c3a47fc04e89670684eddc") diff --git a/modules/app/irc/packages.el b/modules/app/irc/packages.el index d4609d107..5c83b8060 100644 --- a/modules/app/irc/packages.el +++ b/modules/app/irc/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/irc/packages.el -(package! circe :pin "e5bf5f8974") -(package! circe-notifications :pin "291149ac12") +(package! circe :pin "e5bf5f89741a9c43aa406491e94dd8d58c302fb4") +(package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0") diff --git a/modules/app/rss/packages.el b/modules/app/rss/packages.el index 076686e55..544a39f89 100644 --- a/modules/app/rss/packages.el +++ b/modules/app/rss/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/rss/packages.el -(package! elfeed :pin "d0405e6386") -(package! elfeed-org :pin "77b6bbf222") +(package! elfeed :pin "d0405e63863e54a01200740a6717ac875eceabc1") +(package! elfeed-org :pin "77b6bbf222487809813de260447d31c4c59902c9") diff --git a/modules/app/twitter/packages.el b/modules/app/twitter/packages.el index 927619ae8..8ad7dd82e 100644 --- a/modules/app/twitter/packages.el +++ b/modules/app/twitter/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/twitter/packages.el -(package! twittering-mode :pin "114891e8fd") -(package! avy :pin "3bf83140fa") +(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29") +(package! avy :pin "509471bad0e8094b8639729ec39ca141fae7d4bd") From af4e347df0f9b0a7da3b487304d6e202c29acfd3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 01:23:54 -0400 Subject: [PATCH 158/229] Bump :completion DarwinAwardWinner/amx@e512e74 -> DarwinAwardWinner/amx@7fb7b87 Yevgnen/ivy-rich@596874d -> Yevgnen/ivy-rich@3f818b2 abo-abo/swiper@64f05f4 -> abo-abo/swiper@9e0803c company-mode/company-mode@61ddd9a -> company-mode/company-mode@6333fc4 emacs-helm/helm@d978f20 -> emacs-helm/helm@b6db9fb raxod502/prescient.el@5330773 -> raxod502/prescient.el@0f4a89b raxod502/prescient.el@5330773 -> raxod502/prescient.el@0f4a89b sebastiencs/company-box@8fc6168 -> sebastiencs/company-box@3814fcb tumashu/posframe@e62e584 -> tumashu/posframe@093b29a We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/completion/company/packages.el | 8 ++++---- modules/completion/helm/packages.el | 22 +++++++++++----------- modules/completion/ido/packages.el | 10 +++++----- modules/completion/ivy/packages.el | 18 +++++++++--------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/completion/company/packages.el b/modules/completion/company/packages.el index 2006fe791..0fefa4d71 100644 --- a/modules/completion/company/packages.el +++ b/modules/completion/company/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/company/packages.el -(package! company :pin "61ddd9afb5") -(package! company-dict :pin "cd7b8394f6") -(package! company-prescient :pin "53307731f3") +(package! company :pin "6333fc4ebbbf4d28e834de8715561e984f149ecb") +(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4") +(package! company-prescient :pin "0f4a89bdec61395138d968a38d375e63ccfbed63") (when (featurep! +childframe) - (package! company-box :pin "8fc6168f2d")) + (package! company-box :pin "3814fcb14e92f4b85b19e664e216a7c8d5c7144d")) diff --git a/modules/completion/helm/packages.el b/modules/completion/helm/packages.el index e16931e25..9b1bf3090 100644 --- a/modules/completion/helm/packages.el +++ b/modules/completion/helm/packages.el @@ -1,19 +1,19 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/helm/packages.el -(package! helm :pin "d978f20f4c") -(package! helm-rg :pin "785a80fe5c") -(package! helm-c-yasnippet :pin "65ca732b51") -(package! helm-company :pin "6eb5c2d730") +(package! helm :pin "b6db9fb47a8900704394e63b795f4a54cb4701a8") +(package! helm-rg :pin "785a80fe5cc87e27c5ea3d00a70049028d9e2847") +(package! helm-c-yasnippet :pin "65ca732b510bfc31636708aebcfe4d2d845b59b0") +(package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde") (package! helm-describe-modes :recipe (:host github :repo "emacs-helm/helm-describe-modes") - :pin "11fb36af11") -(package! helm-projectile :pin "5328b74ddd") -(package! swiper-helm :pin "93fb6db87b") + :pin "11fb36af119b784539d31c6160002de1957408aa") +(package! helm-projectile :pin "5328b74dddcee8d1913803ca8167868831a07463") +(package! swiper-helm :pin "93fb6db87bc6a5967898b5fd3286954cc72a0008") (when (featurep! +fuzzy) - (package! helm-flx :pin "6640fac5cb")) + (package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e")) (when (featurep! +childframe) - (package! posframe :pin "e62e584268")) + (package! posframe :pin "093b29a53cbeda6d637ccc9ef4dfc47123e79b9e")) (when (featurep! :lang org) - (package! helm-org :pin "b7a18dfc17")) -(package! helm-descbinds :pin "b725159823") + (package! helm-org :pin "b7a18dfc17e8b933956d61d68c435eee03a96c24")) +(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192") diff --git a/modules/completion/ido/packages.el b/modules/completion/ido/packages.el index fc694fbfc..a7bed5bed 100644 --- a/modules/completion/ido/packages.el +++ b/modules/completion/ido/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ido/packages.el -(package! flx-ido :pin "17f5c9cb2a") -(package! ido-completing-read+ :pin "98d3a6e56b") -(package! ido-sort-mtime :pin "f638ff0c92") -(package! ido-vertical-mode :pin "16c4c1a112") -(package! crm-custom :pin "f1aaccf643") +(package! flx-ido :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5") +(package! ido-completing-read+ :pin "98d3a6e56b1d3652da7b47f49f76d77f82ea80ba") +(package! ido-sort-mtime :pin "f638ff0c922af862f5211779f2311a27fde428eb") +(package! ido-vertical-mode :pin "16c4c1a112796ee0bcf401ea39d3e2643a89feaf") +(package! crm-custom :pin "f1aaccf64306a5f99d9bf7ba815d7ea41c15518d") diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index 3f1b3ad4a..f7f6d57ab 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -1,23 +1,23 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ivy/packages.el -(package! swiper :pin "64f05f4735") +(package! swiper :pin "9e0803cdb5b47e4e1844e8281516b46589ef26c7") (package! ivy) (package! ivy-hydra) (package! counsel) -(package! amx :pin "e512e74e83") -(package! counsel-projectile :pin "b556ed8995") -(package! ivy-rich :pin "596874d146") -(package! wgrep :pin "5977b8e000") +(package! amx :pin "7fb7b874291e0cdeb1f0acb18564a686ec86788d") +(package! counsel-projectile :pin "b556ed8995f375e57496f3482aef4b0def565de8") +(package! ivy-rich :pin "3f818b201769bc13cc75aa73645217e374136aca") +(package! wgrep :pin "5977b8e00051c9003ca96e9d35133e0dea68db2c") (if (featurep! +prescient) - (package! ivy-prescient :pin "53307731f3") + (package! ivy-prescient :pin "0f4a89bdec61395138d968a38d375e63ccfbed63") (when (featurep! +fuzzy) - (package! flx :pin "17f5c9cb2a"))) + (package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5"))) (when (featurep! +childframe) - (package! ivy-posframe :pin "ae9bafe94f")) + (package! ivy-posframe :pin "ae9bafe94fe6b77b6fe45766ae6172646f6a5d50")) (when (featurep! +icons) - (package! all-the-icons-ivy :pin "a70cbfa1ef")) + (package! all-the-icons-ivy :pin "a70cbfa1effe36efc946a823a580cec686d5e88d")) From 9b1b8e2774b13d354ad35dd91503cd9c4e3d83f6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 01:27:21 -0400 Subject: [PATCH 159/229] Bump :term akermu/emacs-libvterm@aa512b8 -> akermu/emacs-libvterm@e63bd65 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/term/eshell/packages.el | 12 ++++++------ modules/term/term/packages.el | 2 +- modules/term/vterm/packages.el | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/term/eshell/packages.el b/modules/term/eshell/packages.el index 82a18ed14..3744666cb 100644 --- a/modules/term/eshell/packages.el +++ b/modules/term/eshell/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; term/eshell/packages.el -(package! eshell-up :pin "9c100bae5c") -(package! eshell-z :pin "337cb241e1") -(package! shrink-path :pin "c14882c859") -(package! esh-help :pin "417673ed18") +(package! eshell-up :pin "9c100bae5c3020e8d9307e4332d3b64e7dc28519") +(package! eshell-z :pin "337cb241e17bd472bd3677ff166a0800f684213c") +(package! shrink-path :pin "c14882c8599aec79a6e8ef2d06454254bb3e1e41") +(package! esh-help :pin "417673ed18a983930a66a6692dbfb288a995cb80") (when (featurep! :completion company) - (package! fish-completion :pin "1038488181") - (package! bash-completion :pin "96ce14af96")) + (package! fish-completion :pin "10384881817b5ae38cf6197a077a663420090d2c") + (package! bash-completion :pin "96ce14af9674f3e605bacca87abc0c23b8f13cd5")) diff --git a/modules/term/term/packages.el b/modules/term/term/packages.el index f98aec986..b55cfc41c 100644 --- a/modules/term/term/packages.el +++ b/modules/term/term/packages.el @@ -2,4 +2,4 @@ ;;; term/term/packages.el (package! term :built-in t) -(package! multi-term :pin "7307ddd456") +(package! multi-term :pin "7307ddd456db44045206253e5a905d3d8c143d5c") diff --git a/modules/term/vterm/packages.el b/modules/term/vterm/packages.el index de92a1673..e048a3b01 100644 --- a/modules/term/vterm/packages.el +++ b/modules/term/vterm/packages.el @@ -3,4 +3,4 @@ (package! vterm :built-in 'prefer - :pin "aa512b8351") + :pin "e63bd65eece7c5de3a534b7e2fdbe58256ec2da0") From 8ab8f40c89a8bfb565db7df6d49c6d2803d9120c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 01:28:59 -0400 Subject: [PATCH 160/229] Bump :input skk-dev/ddskk@f9a2333 -> skk-dev/ddskk@11d91b4 tumashu/pyim@7717072 -> tumashu/pyim@b934273 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/input/chinese/packages.el | 8 ++++---- modules/input/japanese/packages.el | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/input/chinese/packages.el b/modules/input/chinese/packages.el index 138c376c4..68bda1d2a 100644 --- a/modules/input/chinese/packages.el +++ b/modules/input/chinese/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; input/chinese/packages.el -(package! pyim :pin "77170724fa") -(package! fcitx :pin "12dc2638dd") -(package! ace-pinyin :pin "8b2e9335b0") -(package! pangu-spacing :pin "f92898949b") +(package! pyim :pin "b934273bb33d6be6aea6e20e68930bc5aaf4a48a") +(package! fcitx :pin "12dc2638ddd15c8f6cfaecb20e1f428ab2bb5624") +(package! ace-pinyin :pin "8b2e9335b02486730ea4ceee790130cc5328f9ea") +(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223") diff --git a/modules/input/japanese/packages.el b/modules/input/japanese/packages.el index 5e86fd79a..126633dcf 100644 --- a/modules/input/japanese/packages.el +++ b/modules/input/japanese/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; input/japanese/packages.el -(package! migemo :pin "f42832c8ac") -(package! avy-migemo :pin "922a6dd82c") -(package! ddskk :pin "f9a2333ec3") -(package! pangu-spacing :pin "f92898949b") +(package! migemo :pin "f42832c8ac462ecbec9a16eb781194f876fba64a") +(package! avy-migemo :pin "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7") +(package! ddskk :pin "11d91b4cce988e15d7c5fc4345535c9d7a92d53b") +(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223") From 1f52ae85669a6b83e6878107576ec05fe8eab231 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 01:30:19 -0400 Subject: [PATCH 161/229] Bump :config abo-abo/avy@3bf8314 -> abo-abo/avy@509471b noctuid/link-hint.el@0d9cabc -> noctuid/link-hint.el@7440704 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/config/default/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/config/default/packages.el b/modules/config/default/packages.el index 8178f8758..a4eb26ffe 100644 --- a/modules/config/default/packages.el +++ b/modules/config/default/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; config/default/packages.el -(package! avy :pin "3bf83140fa") -(package! drag-stuff :pin "6d06d846cd") -(package! link-hint :pin "0d9cabcdb7") +(package! avy :pin "509471bad0e8094b8639729ec39ca141fae7d4bd") +(package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8") +(package! link-hint :pin "7440704cacb5c0fab35fff8ec59d30fbea17f44a") (unless (featurep! :editor evil) - (package! expand-region :pin "ea6b4cbb99")) + (package! expand-region :pin "ea6b4cbb9985ddae532bd2faf9bb00570c9f2781")) From 94a2ff97d73acb3e505606760bb3a3b803331530 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 01:31:44 -0400 Subject: [PATCH 162/229] Bump :email https://git.notmuchmail.org/git/notmuch@aba7fb3 -> https://git.notmuchmail.org/git/notmuch@ad9c2e9 org-mime/org-mime@b189976 -> org-mime/org-mime@9f84446 wanderlust/flim@e4bd54f -> wanderlust/flim@f303f2f wanderlust/semi@16228dc -> wanderlust/semi@57a948c wanderlust/wanderlust@7a919e4 -> wanderlust/wanderlust@7af0d58 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/email/notmuch/packages.el | 8 ++++---- modules/email/wanderlust/packages.el | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/email/notmuch/packages.el b/modules/email/notmuch/packages.el index d1f108bf7..63a955ce5 100644 --- a/modules/email/notmuch/packages.el +++ b/modules/email/notmuch/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; email/notmuch/packages.el -(package! notmuch :pin "aba7fb375b") -(package! org-mime :pin "b189976217") +(package! notmuch :pin "ad9c2e91a012920bebfe70bc472d44678abc3259") +(package! org-mime :pin "9f8444603806e6baa94b2b67a23aab0ea52fef97") (when (featurep! :completion ivy) - (package! counsel-notmuch :pin "a4a1562935")) + (package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688")) (when (featurep! :completion helm) - (package! helm-notmuch :pin "97a01497e0")) + (package! helm-notmuch :pin "97a01497e079a7b6505987e9feba6b603bbec288")) diff --git a/modules/email/wanderlust/packages.el b/modules/email/wanderlust/packages.el index 04963b55b..1188d3005 100644 --- a/modules/email/wanderlust/packages.el +++ b/modules/email/wanderlust/packages.el @@ -4,8 +4,8 @@ ;; HACK These are wanderlust's dependencies (wanderlust depends on semi, semi ;; depends on flim, flim on apel), but they all have non-standard default ;; branches which straight cannot detect without our help. -(package! apel :recipe (:branch "apel-wl") :pin "d146ddbf88") -(package! flim :recipe (:branch "flim-1_14-wl") :pin "e4bd54fd7d") -(package! semi :recipe (:branch "semi-1_14-wl") :pin "16228dc2d1") +(package! apel :recipe (:branch "apel-wl") :pin "d146ddbf8818e81d3577d5eee7825d377bec0c73") +(package! flim :recipe (:branch "flim-1_14-wl") :pin "f303f2f6c124bc8635add96d3326a2209749437b") +(package! semi :recipe (:branch "semi-1_14-wl") :pin "57a948c5f07e57e78ab3c0e6fd76ffcd591bb4ac") -(package! wanderlust :pin "7a919e422a") +(package! wanderlust :pin "7af0d582cd48a37469e0606ea35887740d78c8b5") From 8b52e8ca0f0873ba8b4e569d7fd7d2e80a4a45ab Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 01:35:20 -0400 Subject: [PATCH 163/229] Refactor company defaults In the interest of performance and reducing things we have to maintain. --- modules/completion/company/config.el | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index 62a1a4f52..06b2459a6 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -11,9 +11,26 @@ company-require-match 'never company-global-modes '(not erc-mode message-mode help-mode gud-mode eshell-mode) - company-backends '(company-capf) company-frontends '(company-pseudo-tooltip-frontend - company-echo-metadata-frontend)) + company-echo-metadata-frontend) + + ;; Buffer-local backends will be computed when loading a major mode, so + ;; only specify a global default here. + company-backends '(company-capf) + + ;; Company overrides `company-active-map' based on + ;; `company-auto-complete-chars'; no magic please! + company-auto-complete-chars nil + + ;; Only search the current buffer for `company-dabbrev' (a backend that + ;; suggests text your open buffers). This prevents Company from causing + ;; lag once you have a lot of buffers open. + company-dabbrev-other-buffers nil + ;; Make `company-dabbrev' fully case-sensitive, to improve UX with + ;; domain-specific words with particular casing. + company-dabbrev-ignore-case nil + company-dabbrev-downcase nil) + :config (when (featurep! :editor evil) (add-hook 'company-mode-hook #'evil-normalize-keymaps) @@ -106,6 +123,8 @@ (ElispFeature . ,(all-the-icons-material "stars" :face 'all-the-icons-orange)) (ElispFace . ,(all-the-icons-material "format_paint" :face 'all-the-icons-pink))))) + (delq! 'company-echo-metadata-frontend company-frontends) + (defun +company-box-icons--elisp-fn (candidate) (when (derived-mode-p 'emacs-lisp-mode) (let ((sym (intern candidate))) From 4ac16743b92095b43737834a8969d9e5d9d89b94 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 01:38:52 -0400 Subject: [PATCH 164/229] Use long SHA1 for rainbow-delimiters --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index f74bc0f1b..acbab0d28 100644 --- a/core/packages.el +++ b/core/packages.el @@ -9,7 +9,7 @@ (package! all-the-icons :pin "0b74fc361817e885580c3f3408079f949f5830e1") (package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") (package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") -(package! rainbow-delimiters :pin "5125f4e476") +(package! rainbow-delimiters :pin "5125f4e47604ad36c3eb4706310fcafac729ca8c") (package! restart-emacs :pin "9aa90d3df9e08bc420e1c9845ee3ff568e911bd9") ;; core-editor.el From 64c2efa2fcf9be9cba940328373091013a36252e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 02:02:21 -0400 Subject: [PATCH 165/229] Bump :lang org Kungsgeten/org-brain@7ffbf68 -> Kungsgeten/org-brain@ae7fe0f abo-abo/org-download@46417e2 -> abo-abo/org-download@d542a30 anler/centered-window-mode@24f7c5b -> anler/centered-window-mode@f508599 jethrokuan/org-roam@963692f -> jethrokuan/org-roam@65d99e9 We're also transitioning from abbreviated SHA1 hashes to full ones. See 45cdfb125 for why. --- modules/lang/org/packages.el | 72 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 4d3996a18..040d86dee 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -27,84 +27,84 @@ :recipe (:host github :repo "emacs-straight/org-mode" :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) - :pin "e68ae40bdb") + :pin "90cf5009cbb7379d6650f44494376b11c21a31f5") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) (package! avy) -(package! htmlize :pin "86f22f211e") -(package! org-superstar :pin "09ddc28383") +(package! htmlize :pin "86f22f211e9230857197c42a9823d3f05381deed") +(package! org-superstar :pin "09ddc28383d363a4b353348a433e24535b4af0e3") (package! org-yt :recipe (:host github :repo "TobiasZawada/org-yt") - :pin "40cc1ac76d") -(package! ox-clip :pin "bd36f9fb4e") -(package! toc-org :pin "5deaec41ed") -(package! org-cliplink :pin "82402cae7e") + :pin "40cc1ac76d741055cbefa13860d9f070a7ade001") +(package! ox-clip :pin "bd36f9fb4e3b1b9e8686b993b02ccd780ff75a96") +(package! toc-org :pin "5deaec41ed0e5c51715737d7f74c5ae1b3c00387") +(package! org-cliplink :pin "82402cae7e118d67de7328417fd018a18f95fac2") (when (featurep! :editor evil +everywhere) (package! evil-org :recipe (:host github :repo "hlissner/evil-org-mode") - :pin "9cf661af8f")) + :pin "9cf661af8ff8ea768ef1e55045be14d0468a90f5")) (when (featurep! :tools pdf) - (package! org-pdftools :pin "8cc15bb801")) + (package! org-pdftools :pin "8cc15bb8014ed1f047eecc0abd8bf447f86c0505")) (when (featurep! :tools magit) - (package! orgit :pin "e147f05577")) + (package! orgit :pin "e147f055772cc934fe1f1d8619059badeb647c93")) (when (featurep! +brain) - (package! org-brain :pin "7ffbf6816a")) + (package! org-brain :pin "ae7fe0f628bd093526786ece6917f7a4310e5e4d")) (when (featurep! +dragndrop) - (package! org-download :pin "46417e2bd3")) + (package! org-download :pin "d542a3072f75581f2223d7419df0f66991f19e6f")) (when (featurep! +gnuplot) - (package! gnuplot :pin "f0001c3001") - (package! gnuplot-mode :pin "601f639298")) + (package! gnuplot :pin "f0001c30010b2899e36d7d89046322467e923088") + (package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7")) (when (featurep! +ipython) ; DEPRECATED - (package! ob-ipython :pin "7147455230")) + (package! ob-ipython :pin "7147455230841744fb5b95dcbe03320313a77124")) (when (featurep! +jupyter) - (package! jupyter :pin "785edbbff6")) + (package! jupyter :pin "785edbbff65abb0c929dc2fbd8b8305c77fd529e")) (when (featurep! +journal) - (package! org-journal :pin "8bf06b28d6")) + (package! org-journal :pin "8bf06b28d6f14f52d4968123e2b4b91930c8f947")) (when (featurep! +noter) - (package! org-noter :pin "9ead81d42d")) + (package! org-noter :pin "9ead81d42dd4dd5074782d239b2efddf9b8b7b3d")) (when (featurep! +pomodoro) - (package! org-pomodoro :pin "aa07c11318")) + (package! org-pomodoro :pin "aa07c11318f91219336197e62c47bc7a3d090479")) (when (featurep! +present) (package! centered-window :recipe (:host github :repo "anler/centered-window-mode") - :pin "24f7c5be9d") - (package! org-tree-slide :pin "7bf09a02bd") - (package! org-re-reveal :pin "61549f4c00")) + :pin "f50859941ab5c7cbeaee410f2d38716252b552ac") + (package! org-tree-slide :pin "7bf09a02bd2d8f1ccfcb5209bfb18fbe02d1f44e") + (package! org-re-reveal :pin "61549f4c00284a30e34caa3d76001b233ea5d2ad")) (when (featurep! +roam) - (package! org-roam :pin "963692f353") + (package! org-roam :pin "65d99e998cad4beef77b1b5d9b6235d90395f374") (when (featurep! :completion company) - (package! company-org-roam :pin "0913d86f16"))) + (package! company-org-roam :pin "0913d86f167164e18831206e611f44bb8e7297e3"))) ;;; Babel -(package! ob-async :pin "80a30b96a0") +(package! ob-async :pin "80a30b96a007d419ece12c976a81804ede340311") (when (featurep! :lang crystal) - (package! ob-crystal :pin "d84c1adee4")) + (package! ob-crystal :pin "d84c1adee4b269cdba06a97caedb8071561a09af")) (when (featurep! :lang go) - (package! ob-go :pin "2067ed55f4")) + (package! ob-go :pin "2067ed55f4c1d33a43cb3f6948609d240a8915f5")) (when (featurep! :lang hy) - (package! ob-hy :pin "a42ecaf440")) + (package! ob-hy :pin "a42ecaf440adc03e279afe43ee5ef6093ddd542a")) (when (featurep! :lang nim) - (package! ob-nim :pin "bf1642cb93")) + (package! ob-nim :pin "bf1642cb93f0a898804dc13fd9408d2964403bd2")) (when (featurep! :lang racket) (package! ob-racket :recipe (:host github :repo "DEADB17/ob-racket") - :pin "d8fd51bddb")) + :pin "d8fd51bddb019b0eb68755255f88fc800cfe03cb")) (when (featurep! :lang rest) - (package! ob-restclient :pin "f7449b2068")) + (package! ob-restclient :pin "f7449b2068498fe9d8ab9589e0a638148861533f")) (when (featurep! :lang rust) - (package! ob-rust :pin "6a82587598")) + (package! ob-rust :pin "6a82587598cd097e9642be916243c31f1231b24a")) (when (featurep! :lang scala) - (package! ob-ammonite :pin "39937dff39")) + (package! ob-ammonite :pin "39937dff395e70aff76a4224fa49cf2ec6c57cca")) ;;; Export (when (featurep! +pandoc) - (package! ox-pandoc :pin "aa37dc7e94")) + (package! ox-pandoc :pin "aa37dc7e94213d4ebedb85c384c1ba35007da18e")) (when (featurep! +hugo) (package! ox-hugo :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) - :pin "5106b430a1")) + :pin "5106b430a139bb9e37beda177a082dfe36b407f5")) (when (featurep! :lang rst) - (package! ox-rst :pin "9158bfd180")) + (package! ox-rst :pin "9158bfd18096c559e0a225ae62ab683f1c98a547")) From 106f3324e8df697d1029d5192113b52441792060 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 02:31:51 -0400 Subject: [PATCH 166/229] Fix over-aggressive pin truncation Would truncate the rest of the buffer in some cases. --- modules/lang/emacs-lisp/autoload.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 1aaaf8058..9192bf650 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -228,10 +228,11 @@ verbosity when editing a file in `doom-private-dir' or `doom-emacs-dir'." (goto-char (match-beginning 0)) (and (stringp (plist-get (sexp-at-point) :pin)) (search-forward ":pin" nil t) - (put-text-property (re-search-forward "\"[^\"]\\{10\\}" nil t) - (progn (re-search-forward "\"" nil t) - (match-beginning 0)) - 'display "..."))) + (let ((start (re-search-forward "\"[^\"]\\{10\\}" nil t)) + (finish (and (re-search-forward "\"" (line-end-position) t) + (match-beginning 0)))) + (when (and start finish) + (put-text-property start finish 'display "..."))))) nil) ;;;###autoload From d4acd9721ef94ed180a07c7ca2b5a5a99330f942 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Apr 2020 04:17:10 -0400 Subject: [PATCH 167/229] Bump :lang perl perl6/perl6-mode@88de065 -> Raku/raku-mode@44529c0 hinrik/flycheck-perl6@b804702 -> widefox/flycheck-raku@046f35a Replaces perl6 plugins with raku variants. Includes temporary fix for Raku/raku-mode#33 --- modules/lang/perl/config.el | 13 ++++++++++--- modules/lang/perl/packages.el | 6 ++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/lang/perl/config.el b/modules/lang/perl/config.el index 9301646b7..c2ecef283 100644 --- a/modules/lang/perl/config.el +++ b/modules/lang/perl/config.el @@ -2,9 +2,16 @@ ;; There's also `perl-mode' for perl < 6, which is already set up. -(use-package! perl6-detect) +;; REVIEW Until Raku/raku-mode#33 is merged. +(use-package! raku-mode + :interpreter "raku" + :mode "\\.nqp\\'" + :mode "\\.raku\\(mod\\|test\\)?" + :init (defalias 'perl6-mode #'raku-mode) + :config + (set-repl-handler! 'raku-mode #'run-raku)) -(use-package! flycheck-perl6 +(use-package! flycheck-raku :when (featurep! :checkers syntax) - :after perl6-mode) + :after raku-mode) diff --git a/modules/lang/perl/packages.el b/modules/lang/perl/packages.el index 7c7adfd1d..39c69311c 100644 --- a/modules/lang/perl/packages.el +++ b/modules/lang/perl/packages.el @@ -1,7 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/perl/packages.el -(package! perl6-mode :pin "88de065795") +(package! raku-mode :pin "44529c097f98723067f852c6496d91257978c1e2") (when (featurep! :checkers syntax) - (package! flycheck-perl6 :pin "b804702305")) + (package! flycheck-raku + :recipe (:host github :repo "widefox/flycheck-raku") + :pin "046f35abe0c61967157e151126e4dd7ec5d1c004")) From 810baea2eae5340f4eab56a1a46e13e1d8eeebe7 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Thu, 9 Jan 2020 10:24:41 +0100 Subject: [PATCH 168/229] Use composite to call harfbuzz for ligatures This is based on code from microsoft -> cascadia-code repository (issue #153), which sets a proper composition-function-table according to specific ligature regexp. Using variables also allows to disable the ligatures for org-mode, where org-bullets might be incompatible It has a fallback to old pretty-code behaviour. --- modules/ui/pretty-code/config.el | 85 ++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index 6622c8fef..9c9d46300 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -98,10 +98,95 @@ Otherwise it builds `prettify-code-symbols-alist' according to (add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h) +(defvar +prog-ligatures-alist + '((?! . ".\\(?:\\(==\\|[!=]\\)[!=]?\\)") + (?# . ".\\(?:\\(###?\\|_(\\|[(:=?[_{]\\)[#(:=?[_{]?\\)") + (?$ . ".\\(?:\\(>\\)>?\\)") + (?% . ".\\(?:\\(%\\)%?\\)") + (?& . ".\\(?:\\(&\\)&?\\)") + (?* . ".\\(?:\\(\\*\\*\\|[*>]\\)[*>]?\\)") + ;; (?* . ".\\(?:\\(\\*\\*\\|[*/>]\\).?\\)") + (?+ . ".\\(?:\\([>]\\)>?\\)") + ;; (?+ . ".\\(?:\\(\\+\\+\\|[+>]\\).?\\)") + (?- . ".\\(?:\\(-[->]\\|<<\\|>>\\|[-<>|~]\\)[-<>|~]?\\)") + ;; (?. . ".\\(?:\\(\\.[.<]\\|[-.=]\\)[-.<=]?\\)") + (?. . ".\\(?:\\(\\.<\\|[-=]\\)[-<=]?\\)") + (?/ . ".\\(?:\\(//\\|==\\|[=>]\\)[/=>]?\\)") + ;; (?/ . ".\\(?:\\(//\\|==\\|[*/=>]\\).?\\)") + (?0 . ".\\(?:\\(x[a-fA-F0-9]\\).?\\)") + (?: . ".\\(?:\\(::\\|[:<=>]\\)[:<=>]?\\)") + (59 . ".\\(?:\\(;\\);?\\)") ;; 59 is ; + (?< . ".\\(?:\\(!--\\|\\$>\\|\\*>\\|\\+>\\|-[-<>|]\\|/>\\|<[-<=]\\|=[<>|]\\|==>?\\||>\\||||?\\|~[>~]\\|[$*+/:<=>|~-]\\)[$*+/:<=>|~-]?\\)") + (?= . ".\\(?:\\(!=\\|/=\\|:=\\|<<\\|=[=>]\\|>>\\|[=>]\\)[=<>]?\\)") + (?> . ".\\(?:\\(->\\|=>\\|>[-=>]\\|[-:=>]\\)[-:=>]?\\)") + (?? . ".\\(?:\\([.:=?]\\)[.:=?]?\\)") + (91 . ".\\(?:\\(|\\)[]|]?\\)") ;; 91 is [ + ;; (?\ . ".\\(?:\\([\\n]\\)[\\]?\\)") + (?^ . ".\\(?:\\(=\\)=?\\)") + (?_ . ".\\(?:\\(|_\\|[_]\\)_?\\)") + (?w . ".\\(?:\\(ww\\)w?\\)") + (?{ . ".\\(?:\\(|\\)[|}]?\\)") + (?| . ".\\(?:\\(->\\|=>\\||[-=>]\\||||*>\\|[]=>|}-]\\).?\\)") + (?~ . ".\\(?:\\(~>\\|[-=>@~]\\)[-=>@~]?\\)")) + "An alist containing all the ligatures used when in a `+prog-ligatures-modes' mode. + +The car is the character ASCII number, cdr is a regex which will call `font-shape-gstring' +when matched. + +Because of the underlying code in :ui pretty-code module, the regex should match a string +starting with the character contained in car." + ) + +;; Defaults to not org-mode because org-bullets might be incompatible +;; with the ?*-based replacements in the default value of +prg-ligatures-alist +(defvar +prog-ligatures-modes '(not org-mode) + "List of major modes in which ligatures should be enabled. + +If t, enable it everywhere. + +If the first element is 'not, enable it in any mode besides what is listed. + +If nil, fallback to the prettify-symbols based replacement (add +font features to pretty-code)." + ) + +(defun +pretty-code-init-ligatures-h () + "Enable ligatures. + +If in fundamental-mode, or a mode derived from special, comint, eshell or term +modes, this function does nothing. + +Otherwise it sets the buffer-local composition table to a composition table enhanced with +`+prog-ligatures-alist' ligatures regexes." + (unless (or (eq major-mode 'fundamental-mode) + (eq (get major-mode 'mode-class) 'special) + (derived-mode-p 'comint-mode 'eshell-mode 'term-mode)) + (when (or (eq +prog-ligatures-modes t) + (if (eq (car +prog-ligatures-modes) 'not) + (not (memq major-mode (cdr +prog-ligatures-modes))) + (memq major-mode +prog-ligatures-modes))) + (setq-local composition-function-table composition-ligature-table)))) + +(add-hook 'after-change-major-mode-hook #'+pretty-code-init-ligatures-h) + +(use-package! composite + :when (and (version<= "27.0" emacs-version) (string-match-p "HARFBUZZ" system-configuration-features)) + :init + (defvar composition-ligature-table (make-char-table nil)) + :config + (dolist (char-regexp +prog-ligatures-alist) + (set-char-table-range composition-ligature-table (car char-regexp) + `([,(cdr char-regexp) 0 font-shape-gstring]))) + (set-char-table-parent composition-ligature-table composition-function-table)) + ;; The emacs-mac build of Emacs appear to have built-in support for ligatures, ;; so use that instead if this module is enabled. (cond ((and IS-MAC (fboundp 'mac-auto-operator-composition-mode)) (mac-auto-operator-composition-mode)) + ;; Harfbuzz builds do not need font-specific ligature support + ((and (version<= "27.0" emacs-version) + (string-match-p "HARFBUZZ" system-configuration-features) + (not (null +prog-ligatures-modes))) + nil) ;; Font-specific ligature support ((featurep! +fira) (load! "+fira")) From 03748d48cd54a69dff5a57eba367d1043050abbf Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Tue, 14 Apr 2020 20:09:33 +0200 Subject: [PATCH 169/229] Add the explicit character at the beginning of the regexp --- modules/ui/pretty-code/config.el | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index 9c9d46300..8dd1463cb 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -99,35 +99,35 @@ Otherwise it builds `prettify-code-symbols-alist' according to (add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h) (defvar +prog-ligatures-alist - '((?! . ".\\(?:\\(==\\|[!=]\\)[!=]?\\)") - (?# . ".\\(?:\\(###?\\|_(\\|[(:=?[_{]\\)[#(:=?[_{]?\\)") - (?$ . ".\\(?:\\(>\\)>?\\)") - (?% . ".\\(?:\\(%\\)%?\\)") - (?& . ".\\(?:\\(&\\)&?\\)") - (?* . ".\\(?:\\(\\*\\*\\|[*>]\\)[*>]?\\)") - ;; (?* . ".\\(?:\\(\\*\\*\\|[*/>]\\).?\\)") - (?+ . ".\\(?:\\([>]\\)>?\\)") - ;; (?+ . ".\\(?:\\(\\+\\+\\|[+>]\\).?\\)") - (?- . ".\\(?:\\(-[->]\\|<<\\|>>\\|[-<>|~]\\)[-<>|~]?\\)") - ;; (?. . ".\\(?:\\(\\.[.<]\\|[-.=]\\)[-.<=]?\\)") - (?. . ".\\(?:\\(\\.<\\|[-=]\\)[-<=]?\\)") - (?/ . ".\\(?:\\(//\\|==\\|[=>]\\)[/=>]?\\)") - ;; (?/ . ".\\(?:\\(//\\|==\\|[*/=>]\\).?\\)") - (?0 . ".\\(?:\\(x[a-fA-F0-9]\\).?\\)") - (?: . ".\\(?:\\(::\\|[:<=>]\\)[:<=>]?\\)") - (59 . ".\\(?:\\(;\\);?\\)") ;; 59 is ; - (?< . ".\\(?:\\(!--\\|\\$>\\|\\*>\\|\\+>\\|-[-<>|]\\|/>\\|<[-<=]\\|=[<>|]\\|==>?\\||>\\||||?\\|~[>~]\\|[$*+/:<=>|~-]\\)[$*+/:<=>|~-]?\\)") - (?= . ".\\(?:\\(!=\\|/=\\|:=\\|<<\\|=[=>]\\|>>\\|[=>]\\)[=<>]?\\)") - (?> . ".\\(?:\\(->\\|=>\\|>[-=>]\\|[-:=>]\\)[-:=>]?\\)") - (?? . ".\\(?:\\([.:=?]\\)[.:=?]?\\)") - (91 . ".\\(?:\\(|\\)[]|]?\\)") ;; 91 is [ - ;; (?\ . ".\\(?:\\([\\n]\\)[\\]?\\)") - (?^ . ".\\(?:\\(=\\)=?\\)") - (?_ . ".\\(?:\\(|_\\|[_]\\)_?\\)") - (?w . ".\\(?:\\(ww\\)w?\\)") - (?{ . ".\\(?:\\(|\\)[|}]?\\)") - (?| . ".\\(?:\\(->\\|=>\\||[-=>]\\||||*>\\|[]=>|}-]\\).?\\)") - (?~ . ".\\(?:\\(~>\\|[-=>@~]\\)[-=>@~]?\\)")) + '((?! . "!\\(?:\\(==\\|[!=]\\)[!=]?\\)") + (?# . "#\\(?:\\(###?\\|_(\\|[(:=?[_{]\\)[#(:=?[_{]?\\)") + (?$ . "$\\(?:\\(>\\)>?\\)") + (?% . "%\\(?:\\(%\\)%?\\)") + (?& . "&\\(?:\\(&\\)&?\\)") + (?* . "*\\(?:\\(\\*\\*\\|[*>]\\)[*>]?\\)") + ;; (?* . "*\\(?:\\(\\*\\*\\|[*/>]\\).?\\)") + (?+ . "+\\(?:\\([>]\\)>?\\)") + ;; (?+ . "+\\(?:\\(\\+\\+\\|[+>]\\).?\\)") + (?- . "-\\(?:\\(-[->]\\|<<\\|>>\\|[-<>|~]\\)[-<>|~]?\\)") + ;; (?. . "\\.\\(?:\\(\\.[.<]\\|[-.=]\\)[-.<=]?\\)") + (?. . "\\.\\(?:\\(\\.<\\|[-=]\\)[-<=]?\\)") + (?/ . "/\\(?:\\(//\\|==\\|[=>]\\)[/=>]?\\)") + ;; (?/ . "/\\(?:\\(//\\|==\\|[*/=>]\\).?\\)") + (?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)") + (?: . ":\\(?:\\(::\\|[:<=>]\\)[:<=>]?\\)") + (59 . ";\\(?:\\(;\\);?\\)") ;; 59 is ; + (?< . "<\\(?:\\(!--\\|\\$>\\|\\*>\\|\\+>\\|-[-<>|]\\|/>\\|<[-<=]\\|=[<>|]\\|==>?\\||>\\||||?\\|~[>~]\\|[$*+/:<=>|~-]\\)[$*+/:<=>|~-]?\\)") + (?= . "=\\(?:\\(!=\\|/=\\|:=\\|<<\\|=[=>]\\|>>\\|[=>]\\)[=<>]?\\)") + (?> . ">\\(?:\\(->\\|=>\\|>[-=>]\\|[-:=>]\\)[-:=>]?\\)") + (?? . "?\\(?:\\([.:=?]\\)[.:=?]?\\)") + (91 . "\\[\\(?:\\(|\\)[]|]?\\)") ;; 91 is [ + ;; (?\ . "\\\\\\(?:\\([\\n]\\)[\\]?\\)") + (?^ . "^\\(?:\\(=\\)=?\\)") + (?_ . "_\\(?:\\(|_\\|[_]\\)_?\\)") + (?w . "w\\(?:\\(ww\\)w?\\)") + (?{ . "{\\(?:\\(|\\)[|}]?\\)") + (?| . "|\\(?:\\(->\\|=>\\||[-=>]\\||||*>\\|[]=>|}-]\\).?\\)") + (?~ . "~\\(?:\\(~>\\|[-=>@~]\\)[-=>@~]?\\)")) "An alist containing all the ligatures used when in a `+prog-ligatures-modes' mode. The car is the character ASCII number, cdr is a regex which will call `font-shape-gstring' From 9a79069ab5f6d4c2e5781c48ccbbd0f69bb56b0a Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Sat, 25 Apr 2020 16:58:27 +0200 Subject: [PATCH 170/229] Version-gate the feature to emacs 28 --- modules/ui/pretty-code/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index 8dd1463cb..cb879d602 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -169,7 +169,8 @@ Otherwise it sets the buffer-local composition table to a composition table enha (add-hook 'after-change-major-mode-hook #'+pretty-code-init-ligatures-h) (use-package! composite - :when (and (version<= "27.0" emacs-version) (string-match-p "HARFBUZZ" system-configuration-features)) + ;; Starting from emacs "28" because this code breaks without fe903c5 + :when (and (version<= "28.0" emacs-version) (string-match-p "HARFBUZZ" system-configuration-features)) :init (defvar composition-ligature-table (make-char-table nil)) :config @@ -183,7 +184,8 @@ Otherwise it sets the buffer-local composition table to a composition table enha (cond ((and IS-MAC (fboundp 'mac-auto-operator-composition-mode)) (mac-auto-operator-composition-mode)) ;; Harfbuzz builds do not need font-specific ligature support - ((and (version<= "27.0" emacs-version) + ;; if they brought in the fe903c5 commit + ((and (version<= "28.0" emacs-version) (string-match-p "HARFBUZZ" system-configuration-features) (not (null +prog-ligatures-modes))) nil) From 8a2f8bf2603a4deab06af2921cc583a8f6bb44a8 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Sat, 25 Apr 2020 17:54:51 +0200 Subject: [PATCH 171/229] Lint code --- modules/ui/pretty-code/config.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index cb879d602..cf02e7ed1 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -98,6 +98,7 @@ Otherwise it builds `prettify-code-symbols-alist' according to (add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h) +;;; Automatic font-specific ligatures (defvar +prog-ligatures-alist '((?! . "!\\(?:\\(==\\|[!=]\\)[!=]?\\)") (?# . "#\\(?:\\(###?\\|_(\\|[(:=?[_{]\\)[#(:=?[_{]?\\)") @@ -134,20 +135,19 @@ The car is the character ASCII number, cdr is a regex which will call `font-shap when matched. Because of the underlying code in :ui pretty-code module, the regex should match a string -starting with the character contained in car." - ) +starting with the character contained in car. + +This variable is used only if you built Emacs with Harfbuzz on a version >= 28") -;; Defaults to not org-mode because org-bullets might be incompatible -;; with the ?*-based replacements in the default value of +prg-ligatures-alist (defvar +prog-ligatures-modes '(not org-mode) "List of major modes in which ligatures should be enabled. -If t, enable it everywhere. +If t, enable it everywhere. Fundamental mode, and modes derived from special-mode, +comint-mode, eshell-mode and term-mode are *still* excluded. If the first element is 'not, enable it in any mode besides what is listed. -If nil, fallback to the prettify-symbols based replacement (add +font features to pretty-code)." - ) +If nil, fallback to the prettify-symbols based replacement (add +font features to pretty-code).") (defun +pretty-code-init-ligatures-h () "Enable ligatures. @@ -184,7 +184,7 @@ Otherwise it sets the buffer-local composition table to a composition table enha (cond ((and IS-MAC (fboundp 'mac-auto-operator-composition-mode)) (mac-auto-operator-composition-mode)) ;; Harfbuzz builds do not need font-specific ligature support - ;; if they brought in the fe903c5 commit + ;; if they are above emacs-27 ((and (version<= "28.0" emacs-version) (string-match-p "HARFBUZZ" system-configuration-features) (not (null +prog-ligatures-modes))) From a897492b99d45b75c8e1711c286ef403e59ed4f5 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Sun, 26 Apr 2020 12:17:43 +0200 Subject: [PATCH 172/229] Use regexp-opt instead of manual regexes This helps maintainability tremendously. Thanks wasamasa for the snippet --- modules/ui/pretty-code/config.el | 55 +++++++++++++++----------------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index cf02e7ed1..00a68e211 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -100,35 +100,32 @@ Otherwise it builds `prettify-code-symbols-alist' according to ;;; Automatic font-specific ligatures (defvar +prog-ligatures-alist - '((?! . "!\\(?:\\(==\\|[!=]\\)[!=]?\\)") - (?# . "#\\(?:\\(###?\\|_(\\|[(:=?[_{]\\)[#(:=?[_{]?\\)") - (?$ . "$\\(?:\\(>\\)>?\\)") - (?% . "%\\(?:\\(%\\)%?\\)") - (?& . "&\\(?:\\(&\\)&?\\)") - (?* . "*\\(?:\\(\\*\\*\\|[*>]\\)[*>]?\\)") - ;; (?* . "*\\(?:\\(\\*\\*\\|[*/>]\\).?\\)") - (?+ . "+\\(?:\\([>]\\)>?\\)") - ;; (?+ . "+\\(?:\\(\\+\\+\\|[+>]\\).?\\)") - (?- . "-\\(?:\\(-[->]\\|<<\\|>>\\|[-<>|~]\\)[-<>|~]?\\)") - ;; (?. . "\\.\\(?:\\(\\.[.<]\\|[-.=]\\)[-.<=]?\\)") - (?. . "\\.\\(?:\\(\\.<\\|[-=]\\)[-<=]?\\)") - (?/ . "/\\(?:\\(//\\|==\\|[=>]\\)[/=>]?\\)") - ;; (?/ . "/\\(?:\\(//\\|==\\|[*/=>]\\).?\\)") - (?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)") - (?: . ":\\(?:\\(::\\|[:<=>]\\)[:<=>]?\\)") - (59 . ";\\(?:\\(;\\);?\\)") ;; 59 is ; - (?< . "<\\(?:\\(!--\\|\\$>\\|\\*>\\|\\+>\\|-[-<>|]\\|/>\\|<[-<=]\\|=[<>|]\\|==>?\\||>\\||||?\\|~[>~]\\|[$*+/:<=>|~-]\\)[$*+/:<=>|~-]?\\)") - (?= . "=\\(?:\\(!=\\|/=\\|:=\\|<<\\|=[=>]\\|>>\\|[=>]\\)[=<>]?\\)") - (?> . ">\\(?:\\(->\\|=>\\|>[-=>]\\|[-:=>]\\)[-:=>]?\\)") - (?? . "?\\(?:\\([.:=?]\\)[.:=?]?\\)") - (91 . "\\[\\(?:\\(|\\)[]|]?\\)") ;; 91 is [ - ;; (?\ . "\\\\\\(?:\\([\\n]\\)[\\]?\\)") - (?^ . "^\\(?:\\(=\\)=?\\)") - (?_ . "_\\(?:\\(|_\\|[_]\\)_?\\)") - (?w . "w\\(?:\\(ww\\)w?\\)") - (?{ . "{\\(?:\\(|\\)[|}]?\\)") - (?| . "|\\(?:\\(->\\|=>\\||[-=>]\\||||*>\\|[]=>|}-]\\).?\\)") - (?~ . "~\\(?:\\(~>\\|[-=>@~]\\)[-=>@~]?\\)")) + `((?! . ,(regexp-opt '("!!" "!=" "!=="))) + (?# . ,(regexp-opt '("##" "###" "####" "#(" "#:" "#=" "#?" "#[" "#_" "#_(" "#{"))) + (?$ . ,(regexp-opt '("$>" "$>>"))) + (?% . ,(regexp-opt '("%%" "%%%"))) + (?& . ,(regexp-opt '("&&" "&&&"))) + (?* . ,(regexp-opt '("*" "**" "***" "**/" "*/" "*>"))) + (?+ . ,(regexp-opt '("+" "++" "+++" "+>"))) + (?- . ,(regexp-opt '("--" "---" "-->" "-<" "-<<" "->" "->>" "-}" "-~"))) + (?. . ,(regexp-opt '(".-" ".." "..." "..<" ".="))) + (?/ . ,(regexp-opt '("/*" "/**" "//" "///" "/=" "/==" "/>"))) + (?: . ,(regexp-opt '(":" "::" ":::" ":=" ":<" ":=" ":>"))) + (?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)") ; Tries to match the x in 0xDEADBEEF + ;; (?x . ,(regexp-opt '("x"))) ; Also tries to match the x in 0xDEADBEEF + (?\; . ,(regexp-opt '(";;"))) + (?< . ,(regexp-opt '("" "-<" "-<<" "->" "->>" "-}" "-~"))) + (?. . ,(regexp-opt '(".-" ".." "..." "..<" ".="))) + (?/ . ,(regexp-opt '("/*" "/**" "//" "///" "/=" "/==" "/>"))) + (?: . ,(regexp-opt '(":" "::" ":::" ":=" ":<" ":=" ":>"))) + (?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)") ; Tries to match the x in 0xDEADBEEF + ;; (?x . ,(regexp-opt '("x"))) ; Also tries to match the x in 0xDEADBEEF + (?\; . ,(regexp-opt '(";;"))) + (?< . ,(regexp-opt '("" "-<" "-<<" "->" "->>" "-}" "-~"))) - (?. . ,(regexp-opt '(".-" ".." "..." "..<" ".="))) - (?/ . ,(regexp-opt '("/*" "/**" "//" "///" "/=" "/==" "/>"))) - (?: . ,(regexp-opt '(":" "::" ":::" ":=" ":<" ":=" ":>"))) - (?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)") ; Tries to match the x in 0xDEADBEEF - ;; (?x . ,(regexp-opt '("x"))) ; Also tries to match the x in 0xDEADBEEF - (?\; . ,(regexp-opt '(";;"))) - (?< . ,(regexp-opt '("