X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/9cebbd53fc6188d6640bc895261b2a68ccafce45..0571b240759700a2036605691e1ac31dc59820aa:/init.org diff --git a/init.org b/init.org index b144736..7f66c99 100644 --- a/init.org +++ b/init.org @@ -648,33 +648,29 @@ Enable =winner-mode=. *** Don’t display =*compilation*= on success -From https://stackoverflow.com/a/17788551. +Based on https://stackoverflow.com/a/17788551, with changes to use +=cl-letf= instead of the now obsolete =flet=. #+begin_src emacs-lisp -(defun amin--compilation-finish-function (buffer outstr) - (unless (string-match "finished" outstr) - (switch-to-buffer-other-window buffer)) - t) - -(setq compilation-finish-functions #'amin--compilation-finish-function) +(use-package compile + :config + (defun amin--compilation-finish-function (buffer outstr) + (unless (string-match "finished" outstr) + (switch-to-buffer-other-window buffer)) + t) -(require 'cl) + (setq compilation-finish-functions #'amin--compilation-finish-function) -(defadvice compilation-start - (around inhibit-display - (command &optional mode name-function highlight-regexp)) - (if (not (string-match "^\\(find\\|grep\\)" command)) - (flet ((display-buffer) - (set-window-point) - (goto-char)) - (fset 'display-buffer 'ignore) - (fset 'goto-char 'ignore) - (fset 'set-window-point 'ignore) - (save-window-excursion - ad-do-it)) - ad-do-it)) + (require 'cl-macs) -(ad-activate 'compilation-start) + (defadvice compilation-start + (around inhibit-display + (command &optional mode name-function highlight-regexp)) + (if (not (string-match "^\\(find\\|grep\\)" command)) + (cl-letf (((symbol-function 'display-buffer) #'ignore)) + (save-window-excursion ad-do-it)) + ad-do-it)) + (ad-activate 'compilation-start)) #+end_src *** Search for non-ASCII characters @@ -827,7 +823,8 @@ file. (let* ((file-tangle-start-time (current-time)) (file (buffer-file-name)) (file-nodir (file-name-nondirectory file)) - (async-quiet-switch "-q")) + ;; (async-quiet-switch "-q") + ) (async-start `(lambda () (require 'org) @@ -957,7 +954,7 @@ There's no way I could top that, so I won't attempt to. (defun amin|eshell-setup () (make-local-variable 'company-idle-delay) - (setq company-idle-delay nil) + (defvar company-idle-delay nil) (bind-keys :map eshell-mode-map ("C-d" . amin/eshell-quit-or-delete-char) ("C-S-l" . amin/eshell-clear) @@ -996,6 +993,13 @@ There's no way I could top that, so I won't attempt to. '(("default" ("dired" (mode . dired-mode)) ("org" (mode . org-mode)) + ("gnus" + (or + (mode . gnus-group-mode) + (mode . gnus-summary-mode) + (mode . gnus-article-mode) + ;; not really, but... + (mode . message-mode))) ("web" (or (mode . web-mode) @@ -1005,20 +1009,21 @@ There's no way I could top that, so I won't attempt to. ("shell" (or (mode . eshell-mode) - (mode . shell-mode))) - ("notmuch" (name . "\*notmuch\*")) + (mode . shell-mode) + (mode . term-mode))) ("programming" (or (mode . python-mode) + (mode . c-mode) (mode . c++-mode) - (mode . emacs-lisp-mode))) + (mode . emacs-lisp-mode) + (mode . scheme-mode) + (mode . haskell-mode) + (mode . lean-mode))) ("emacs" (or (name . "^\\*scratch\\*$") - (name . "^\\*Messages\\*$"))) - ("slack" - (or - (name . "^\\*Slack*")))))) + (name . "^\\*Messages\\*$")))))) (ibuffer-formats '((mark modified read-only locked " " (name 18 18 :left :elide) @@ -1553,6 +1558,23 @@ treemacs :after (treemacs)) #+end_src +** geiser + +#+begin_src emacs-lisp +(use-package geiser) + +(use-package geiser-guile + :config + (setq geiser-guile-load-path "~/src/git/guix")) +#+end_src + +** guix + +#+begin_src emacs-lisp +(use-package guix + :load-path "lib/guix/elisp") +#+end_src + * Emacs Enhancements ** [[https://github.com/justbur/emacs-which-key][which-key]] @@ -1984,8 +2006,10 @@ Hopefully temporary. read-mail-command 'gnus) (use-package gnus - :bind (("s-m" . gnus) - ("s-M" . gnus-unplugged)) + :bind (("C-c m" . gnus) + ("C-c M" . gnus-unplugged) + ("s-m" . gnus) + ("s-M" . gnus-unplugged)) :init (setq gnus-select-method '(nnnil "") @@ -2269,4 +2293,5 @@ Display how long it took to load the init file. * COMMENT Local Variables :ARCHIVE: # Local Variables: # eval: (add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local) +# eval: (typo-mode -1) # End: