From 4b523321ec5a8600784d55179cc6cfa7df3070fc Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 7 Jul 2024 14:42:48 -0400 Subject: [PATCH] minor fixes --- init.el | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/init.el b/init.el index 0553e7c..5ba7c9a 100644 --- a/init.el +++ b/init.el @@ -72,13 +72,20 @@ +;; ;; disabled because after 2024 update this keeps recompiling on every +;; ;; startup and leaving open compile windows. +;; ;; todo: move functions into separate byte compiled file, per: +;; ;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html +;; ;; If your init file defines many functions, consider moving them to +;; ;; a separate (byte-compiled) file that you load in your init file. +;; ;; previously, i was doing byte-recompile-directory, but ;; now i just have one init file -(unless (equal (user-uid) 0) ; don't make root owned files - (byte-recompile-file (expand-file-name "init.el" init-dir) nil 0) - (when (file-exists-p "/p/c/mymu4e.el") - (byte-recompile-file "/p/c/mymu4e.el" nil 0)) - ) +;; (unless (equal (user-uid) 0) ; don't make root owned files +;; (byte-recompile-file (expand-file-name "init.el" init-dir) nil 0) +;; (when (file-exists-p "/p/c/mymu4e.el") +;; (byte-recompile-file "/p/c/mymu4e.el" nil 0)) +;; ) ;;; misc emacs documentation @@ -211,6 +218,8 @@ ;; find file at point (use-package ffap) +;; used in system-status finding unsaved buffers. +(use-package dash) @@ -1746,7 +1755,8 @@ or else the number of characters matched by `outline-regexp'." erc-join-hook (lambda () (when (string= (buffer-name(current-buffer)) "#fsfsys") (switch-to-buffer (current-buffer)))) ;; defaults minus fill. you can find defaults by searching for ;; defcustom erc-modules in erc.el, or customize group erc. - erc-modules (remove 'fill erc-modules) + erc-modules '(autojoin button completion imenu irccontrols list match menu + move-to-prompt netsplit networks readonly ring stamp track) ;; expanded from https://www.emacswiki.org/emacs/ErcChannelTracking, ;; ignore various messages erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE" @@ -2611,14 +2621,14 @@ modes like org-mode which have their own yank function." (global-set-key (kbd "C-(") 'run) ;; make compile work from the gtags root dir -(defadvice compile (before pre-compile-advice activate) - (basic-save-buffer) - (when (set-p ggtags-project-root) - (setq-local compile-saved-dir default-directory) - (setq default-directory ggtags-project-root))) -(defadvice compile (after post-compile-advice activate) - (when (bound-and-true-p compile-saved-dir) - (setq default-directory compile-saved-dir))) +;; (defadvice compile (before pre-compile-advice activate) +;; (basic-save-buffer) +;; (when (set-p ggtags-project-root) +;; (setq-local compile-saved-dir default-directory) +;; (setq default-directory ggtags-project-root))) +;; (defadvice compile (after post-compile-advice activate) +;; (when (bound-and-true-p compile-saved-dir) +;; (setq default-directory compile-saved-dir))) (add-hook 'c-mode-hook (lambda () (define-key c-mode-map (kbd "C-(") 'compile))) @@ -2686,7 +2696,7 @@ modes like org-mode which have their own yank function." ;; I did a grep of the emacs sources, but couldn't find anything. ;; (define-key universal-argument-map [?9 nil) -;;;;; C-M-9 - end server edit +;;;;; C-M-8 - end server edit ;; save & kill buffer if it was opened externally via emacsclient @@ -2694,7 +2704,9 @@ modes like org-mode which have their own yank function." (interactive) (save-buffer) (server-edit)) -(global-set-key (kbd "C-M-9") 'server-edit-save) +;; this was c-m-9, but I have a laptop where +;; that key does nothing. seems like an n-key limitation. +(global-set-key (kbd "C-M-8") 'server-edit-save) ;;;;; C-u - universal-argument ;;;;; C-M-u - search-keybind -- 2.30.2