summaryrefslogtreecommitdiff
path: root/modules/system-utils.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-11-05 01:00:38 -0600
committerCraig Jennings <c@cjennings.net>2025-11-05 01:00:38 -0600
commitebd439a84180b6f3258be43ac3ce3788cbe21b6d (patch)
treeaec5334785e62bd54857df3ddfc699e896848913 /modules/system-utils.el
parent76b7a15d7eaeaff81874d922d5ce2b0090eb7c98 (diff)
feat: Configure scratch buffer for org-mode with cursor at end
- Set initial-major-mode to org-mode for *scratch* buffer - Add emacs-startup-hook to position cursor at end of buffer - Update greeting message comment syntax from ;; to # for org-mode - Re-enable debug flag reset on startup in early-init.el This makes the scratch buffer immediately ready for org-mode note-taking with cursor positioned for typing, eliminating manual mode switching and cursor movement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'modules/system-utils.el')
-rw-r--r--modules/system-utils.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/system-utils.el b/modules/system-utils.el
index 2b39d862..e9686777 100644
--- a/modules/system-utils.el
+++ b/modules/system-utils.el
@@ -186,13 +186,22 @@ Logs output and exit code to buffer *external-open.log*."
;;; -------------------------- Scratch Buffer Happiness -------------------------
(defvar scratch-emacs-version-and-system
- (concat ";; Emacs " emacs-version
+ (concat "# Emacs " emacs-version
" on " system-configuration ".\n"))
(defvar scratch-greet
- (concat ";; Emacs ♥ you, " user-login-name ". Happy Hacking!\n\n"))
+ (concat "# Emacs ♥ you, " user-login-name ". Happy Hacking!\n\n"))
(setopt initial-scratch-message
(concat scratch-emacs-version-and-system scratch-greet))
+;; Set scratch buffer to org-mode
+(setopt initial-major-mode 'org-mode)
+
+;; Move cursor to end of scratch buffer on startup
+(add-hook 'emacs-startup-hook
+ (lambda ()
+ (when (string= (buffer-name) "*scratch*")
+ (goto-char (point-max)))))
+
;;; --------------------------------- Dictionary --------------------------------
(use-package quick-sdcv