From 74fc89857aa4ed3e1f8b12325ca2f7b066c67270 Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Mon, 6 Nov 2023 10:44:27 +0100 Subject: [PATCH 1/3] feat(defaults): show buffer size in mode line --- core/me-defaults.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/me-defaults.el b/core/me-defaults.el index 7c3915e0..de3bcf69 100644 --- a/core/me-defaults.el +++ b/core/me-defaults.el @@ -311,6 +311,9 @@ or file path may exist now." ;; Show column numbers (a.k.a. cursor position) in the mode-line (column-number-mode 1) + ;; Display buffer size on mode line + (size-indication-mode 1) + ;; Better handling for files with so long lines (global-so-long-mode 1) From 3e6a231a35228cc230c55507223dd6e62e94ca6a Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Mon, 6 Nov 2023 10:49:51 +0100 Subject: [PATCH 2/3] refactor(core): minor edits --- elisp/+minemacs.el | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/elisp/+minemacs.el b/elisp/+minemacs.el index 449baeb1..65793bf7 100644 --- a/elisp/+minemacs.el +++ b/elisp/+minemacs.el @@ -94,8 +94,7 @@ If NO-MESSAGE-LOG is non-nil, do not print any message to *Messages* buffer." delay t (lambda () (when-let (fn (pop fns)) - (+log! "Running task %d, calling function `%s'" task-num - (truncate-string-to-width (format "%s" fn) 40 nil nil "…")) + (+log! "Running task %d, calling function `%s'" task-num (truncate-string-to-width (format "%s" fn) 40 nil nil "…")) (funcall fn)) (unless fns (cancel-timer (get task-name 'timer)) @@ -105,15 +104,13 @@ If NO-MESSAGE-LOG is non-nil, do not print any message to *Messages* buffer." (defmacro +eval-when-idle! (&rest body) "Evaluate BODY when Emacs becomes idle." (declare (indent 0)) - `(+eval-when-idle ,+eval-when-idle-delay - (lambda () ,@body))) + `(+eval-when-idle ,+eval-when-idle-delay (lambda () ,@body))) ;;;###autoload (defmacro +eval-when-idle-for! (delay &rest body) "Evaluate BODY after DELAY seconds from Emacs becoming idle." (declare (indent 1)) - `(+eval-when-idle ,delay - (lambda () ,@body))) + `(+eval-when-idle ,delay (lambda () ,@body))) ;;;###autoload (defmacro +deferred! (&rest body) @@ -175,7 +172,7 @@ If NO-MESSAGE-LOG is non-nil, do not print any message to *Messages* buffer." The FUNCTION is delayed to be evaluated in SECS once HOOK is triggered. DEPTH and LOCAL are passed as is to `add-hook'." - (let* ((f-name (make-symbol (format "%s-on-%s-delayed-%ds-h" (+unquote function) (+unquote hook) secs))) + (let* ((f-name (make-symbol (format "+%s-on-%s-delayed-%.2fs-h" (+unquote function) (+unquote hook) secs))) (f-doc (format "Call `%s' in %d seconds" (symbol-name (+unquote function)) secs))) `(eval-when-compile (defun ,f-name () ,f-doc @@ -392,8 +389,8 @@ the the function. (defvar +shell-command-switch (pcase shell-file-name - ((rx "fish") "-lc") - ((rx (or "tsch" "csh")) "-dc") + ((rx bol "fish" eol) "-lc") + ((rx bol (or "tsch" "csh") eol) "-dc") (_ "-ilc"))) ;; Inspired by: emacs.stackexchange.com/a/21432/37002 From 0bbcbdf364faf057170e09f52b3a7d2936daec33 Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Mon, 6 Nov 2023 10:50:54 +0100 Subject: [PATCH 3/3] refactor(core): minor edit --- core/minemacs-lazy.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/minemacs-lazy.el b/core/minemacs-lazy.el index b9ac1171..52e6010f 100644 --- a/core/minemacs-lazy.el +++ b/core/minemacs-lazy.el @@ -25,8 +25,7 @@ (setq minemacs-lazy-hook (append (delq 'gcmh-mode (reverse minemacs-lazy-hook)) '(gcmh-mode))) (if minemacs-not-lazy (progn ; If `minemacs-no-lazy' is bound and true, force loading lazy hooks immediately - (+log! "Loading %d lazy packages immediately." - (length minemacs-lazy-hook)) + (+log! "Loading %d lazy packages immediately." (length minemacs-lazy-hook)) (run-hooks 'minemacs-lazy-hook)) (+log! "Loading %d lazy packages incrementally." (length minemacs-lazy-hook)) ;; Run hooks one by one, as a FIFO.