From e0469e14c0eb471e3d0f2c7d34c45a9984c569a1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 20 Oct 2019 13:29:29 -0400 Subject: [PATCH] Minor refactors & reformatting across the board --- core/autoload/ui.el | 7 ++++++- modules/completion/ivy/autoload/evil.el | 1 - modules/emacs/dired/config.el | 2 +- modules/lang/org/config.el | 15 ++++++++------- modules/lang/org/contrib/pomodoro.el | 5 +---- modules/tools/magit/config.el | 2 +- modules/tools/pass/config.el | 2 +- modules/ui/treemacs/config.el | 4 +++- 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index b83dfc31b..f5a8ba544 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -33,7 +33,12 @@ are open." ;;;###autoload (defun doom-shut-up-a (orig-fn &rest args) - "Generic advisor for silencing noisy functions." + "Generic advisor for silencing noisy functions. + +In interactive Emacs, this just inhibits messages from appearing in the +minibuffer. They are still logged to *Messages*. + +In tty Emacs, messages suppressed completely." (quiet! (apply orig-fn args))) diff --git a/modules/completion/ivy/autoload/evil.el b/modules/completion/ivy/autoload/evil.el index bb7906aab..43faf2a6b 100644 --- a/modules/completion/ivy/autoload/evil.el +++ b/modules/completion/ivy/autoload/evil.el @@ -53,4 +53,3 @@ "Ex interface for `+ivy/rg-from-cwd'." (interactive "") (+ivy/rg-from-cwd (not recurse-p) query)) - diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index c4bf5a482..23ff18b95 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -32,7 +32,7 @@ (add-hook! 'dired-mode-hook (defun +dired-disable-gnu-ls-flags-in-tramp-buffers-h () - "Fix #1703: opening directories over TRAMP in dired displays a blank screen. + "Fix #1703: dired over TRAMP displays a blank screen. This is because there's no guarantee the remote system has GNU ls, which is the only variant that supports --group-directories-first." diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 76de3c19b..928d4f4d9 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -483,10 +483,11 @@ current workspace (and clean them up)." (dolist (buffer org-agenda-new-buffers) (with-current-buffer buffer ;; HACK Org agenda opens temporary agenda incomplete org-mode - ;; buffers. These are great for extracting agenda information from, - ;; but what if the user tries to visit one of these buffers? Then we - ;; remove it from the to-be-cleaned queue and restart `org-mode' so - ;; they can grow up to be full-fledged org-mode buffers. + ;; buffers. These are great for extracting agenda information + ;; from, but what if the user tries to visit one of these + ;; buffers? Then we remove it from the to-be-cleaned queue and + ;; restart `org-mode' so they can grow up to be full-fledged + ;; org-mode buffers. (add-hook 'doom-switch-buffer-hook #'+org--restart-mode-h nil 'local)))))) @@ -497,9 +498,9 @@ current workspace (and clean them up)." (funcall orig-fn file))) ;; HACK With https://code.orgmode.org/bzg/org-mode/commit/48da60f4, inline - ;; image previews broke for users with imagemagick support built in. This - ;; reverses the problem, but should be removed once it is addressed upstream - ;; (if ever). + ;; image previews broke for users with imagemagick support built in. This + ;; reverses the problem, but should be removed once it is addressed + ;; 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)) diff --git a/modules/lang/org/contrib/pomodoro.el b/modules/lang/org/contrib/pomodoro.el index faf3ff88b..6079c29e2 100644 --- a/modules/lang/org/contrib/pomodoro.el +++ b/modules/lang/org/contrib/pomodoro.el @@ -1,10 +1,7 @@ ;;; lang/org/contrib/pomodoro.el -*- lexical-binding: t; -*- ;;;###if (featurep! +pomodoro) -(use-package! org-pomodoro - :defer t - :config - +(after! org-pomodoro ;; prefer PulseAudio to ALSA in $current_year (setq org-pomodoro-audio-player (or (executable-find "paplay") org-pomodoro-audio-player)) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 460bb2f78..9a766c2ec 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -6,7 +6,7 @@ It is passed a user and repository name.") ;; -;; Packages +;;; Packages (use-package! magit :commands magit-file-delete diff --git a/modules/tools/pass/config.el b/modules/tools/pass/config.el index 4c790bc69..59094000b 100644 --- a/modules/tools/pass/config.el +++ b/modules/tools/pass/config.el @@ -10,7 +10,7 @@ ;; ;; Packages -;; `password-store' +;;;###package password-store (setq password-store-password-length 12) ;; Fix hard-coded password-store location; respect PASSWORD_STORE_DIR envvar diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index 184a8d9b0..7ca592ff6 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -17,6 +17,7 @@ ;; Don't follow the cursor (treemacs-follow-mode -1) + ;; Allow ace-window to target treemacs windows (after! ace-window (delq! 'treemacs-mode aw-ignored-buffers))) @@ -29,7 +30,8 @@ [return] #'treemacs-RET-action [tab] #'treemacs-TAB-action "TAB" #'treemacs-TAB-action - ;; To be consistent with C-w {v,s}: + ;; REVIEW Fix #1875 to be consistent with C-w {v,s}, but this should really + ;; be considered upstream. "o v" #'treemacs-visit-node-horizontal-split "o s" #'treemacs-visit-node-vertical-split))