From: Eshel Yaron Date: Sat, 27 May 2023 17:01:27 +0000 (+0300) Subject: Update Emacs configuration X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5b4400710c12806623260a0c0eb423a4877ba6dc;p=dotfiles.git Update Emacs configuration --- diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 9a10263..e852e77 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -66,6 +66,8 @@ enable-recursive-minibuffers t ;; save bookmarks immediately bookmark-save-flag 1 + ;; show matches count in isearch prompt + isearch-lazy-count t ;; make some space in the Packages menu package-archive-column-width 12 package-version-column-width 28 @@ -365,7 +367,7 @@ auto-revert-verbose nil query-about-changed-file t ;; show flymake diagnostics as overlays at eol - ;; flymake-show-diagnostics-at-end-of-line t ; not quite there yet + ;; flymake-show-diagnostics-at-end-of-line t kill-do-not-save-duplicates t show-trailing-whitespace t read-extended-command-predicate #'command-completion-default-include-p @@ -553,7 +555,9 @@ "*Access Log Summary*"))) (defun esy/clone (remote) - (interactive "sClone: ") + (interactive (list (let ((default (thing-at-point 'url))) + (read-string (format-prompt "Clone" default) + nil nil default)))) (let ((dir (expand-file-name (file-name-base (car (url-path-and-query (url-generic-parse-url remote)))) @@ -611,24 +615,25 @@ (keymap-global-set "C-c l" #'org-store-link) (keymap-global-set "C-c a" #'org-agenda) (keymap-global-set "C-c v" #'vterm-other-window) + (keymap-global-set "C-c p" sweeprolog-prefix-map) (keymap-global-set "C-c S" #'scratch-buffer) (keymap-global-set "C-c m" #'esy/emms-map) (keymap-global-set "C-c !" #'consult-flymake) - (keymap-global-set "C-c C" #'esy-capture) + (keymap-global-set "C-c C" #'esy-publish-create-post) (keymap-global-set "C-c O" #'openai-chat) (keymap-global-set "C-c E" #'elfeed) (keymap-global-set "C-c G" #'gnus) (keymap-global-set "C-c M" #'mastodon) - (keymap-global-set "C-c V" #'vertalen-at-point) (keymap-global-set "C-c F" #'esy/find-init-file) (keymap-global-set "C-c P" #'list-packages) (keymap-global-set "C-c SPC" #'consult-mark) + (keymap-global-set "C-c 1" #'delete-other-windows) (keymap-global-set " " #'esy/kill-dwim) (keymap-global-set " " #'consult-goto-line) (keymap-global-set " " #'zap-up-to-char) (keymap-global-set " " #'consult-imenu) (keymap-global-set " " #'duplicate-line) - (keymap-global-set "M-#" #'dict-describe-word) + (keymap-global-set "M-#" #'dictionary-search) (keymap-global-set "M-o" #'previous-buffer) (keymap-global-set "M-O" #'next-buffer) (keymap-global-set "C-," #'backward-delete-char) @@ -795,7 +800,8 @@ as the initial input for completion, and return that directory." (esy/init-step org "Configure Org mode." (with-eval-after-load 'org - (keymap-unset org-mode-map "C-," t)) + (keymap-unset org-mode-map "C-," t) + (esy-publish-setup)) (with-eval-after-load 'org-agenda (add-to-list 'org-agenda-custom-commands @@ -839,7 +845,8 @@ as the initial input for completion, and return that directory." (esy/init-step proced "Configure `proced'." (with-eval-after-load 'proced - (add-hook 'proced-mode-hook #'proced-toggle-auto-update))) + (add-hook 'proced-mode-hook (lambda () + (setq proced-auto-update-flag t))))) (esy/init-step time "Configure `world-clock'." @@ -1031,8 +1038,7 @@ as the initial input for completion, and return that directory." (add-to-list 'major-mode-remap-alist '(prolog-mode . sweeprolog-mode)) (with-eval-after-load 'sweeprolog (add-hook 'sweeprolog-mode-hook #'sweeprolog-electric-layout-mode) - (add-hook 'sweeprolog-top-level-mode-hook #'compilation-shell-minor-mode) - (keymap-global-set "C-c p" sweeprolog-prefix-map))) + (add-hook 'sweeprolog-top-level-mode-hook #'compilation-shell-minor-mode))) (esy/init-step rg "Configure recursive grepping via `rg'." @@ -1073,12 +1079,20 @@ as the initial input for completion, and return that directory." (add-hook 'kill-emacs-hook #'esy/compile-config 10)) +(esy/init-step help + "Configure Help." + (with-eval-after-load 'help-fns + (with-eval-after-load 'shortdoc + (add-hook 'help-fns-describe-function-functions + #'shortdoc-help-fns-examples-function)))) + (esy/init-step dict - "Configure dictionary servers." - (with-eval-after-load 'dict - (setq dict-server-host "dict.org" - dict-dictionary "gcide" - dict-strategy "prefix"))) + "Configure dictionary." + (with-eval-after-load 'dictionary + (setopt dictionary-search-interface 'help + dictionary-default-dictionary "gcide" + dictionary-default-strategy "prefix" + dictionary-server "dict.org"))) (esy/init-step elfeed "Configure news feeds."