From b8467c0708973d6e499f2a9c2c94ba5569aa75ad Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sun, 16 Jul 2023 16:32:33 +0300 Subject: style & emacs 29 adjustments --- emacs.org | 96 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/emacs.org b/emacs.org index 739753c..c888777 100755 --- a/emacs.org +++ b/emacs.org @@ -4,6 +4,10 @@ #+auto_tangle: t #+STARTUP: overview +* Fix for 29 +#+begin_src emacs-lisp + (add-to-list 'load-path "/usr/share/emacs/site-lisp/elpa/mu4e-1.8.14") +#+end_src * System Information Set my name and email address #+begin_src emacs-lisp @@ -192,8 +196,8 @@ Fonts and basic appearance settings for each device (require 'ivy) (ivy-mode 1) - ;(setq ivy-use-virtual-buffers t) - ;(setq enable-recursive-minibuffers t) + ;(setq ivy-use-virtual-buffers t) + ;(setq enable-recursive-minibuffers t) (global-set-key (kbd "C-s") 'swiper) (define-key ivy-minibuffer-map (kbd "TAB") 'ivy-alt-done) (global-set-key "\C-s" 'swiper) @@ -421,8 +425,8 @@ Fonts and basic appearance settings for each device '((right-divider-width . 5) (internal-border-width . 5))) (dolist (face '(window-divider - window-divider-first-pixel - window-divider-last-pixel)) + window-divider-first-pixel + window-divider-last-pixel)) (face-spec-reset-face face) (set-face-foreground face (face-attribute 'default :background))) (set-face-background 'fringe (face-attribute 'default :background)) @@ -482,10 +486,10 @@ Fonts and basic appearance settings for each device org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦))) ;; changes +/- symbols in item lists) #+end_src ~Keybindings:~ - #+begin_src emacs-lisp +#+begin_src emacs-lisp (define-key org-mode-map (kbd "C-c t") 'org-time-stamp-inactive) (define-key org-mode-map (kbd "C-c s") 'org-download-screenshot) - #+end_src +#+end_src ~Hooks~ #+begin_src emacs-lisp (add-hook 'org-mode-hook 'thanos/org-theme-gruvbox) @@ -532,11 +536,11 @@ Fonts and basic appearance settings for each device * Markdown ** Theme #+begin_src emacs-lisp -(defun thanos/markdown-theme () - (interactive) - (dolist - (face - '(markdown-header-face-1 :height 2.0)))) + (defun thanos/markdown-theme () + (interactive) + (dolist + (face + '(markdown-header-face-1 :height 2.0)))) #+end_src ** Settings #+begin_src emacs-lisp @@ -991,7 +995,7 @@ Set aliases for emacs functions and ~PATH~ (if (boundp arg) (eval arg) default - )) + )) (defgroup multi-eshell nil "Simple support for having multiple shells open." @@ -1007,7 +1011,7 @@ Set aliases for emacs functions and ~PATH~ (defun multi-eshell-function () "This function opens the appropriate shell." (eval multi-eshell-shell-function) ) ;;;(defvar multi-eshell-function `(shell) ) ;;; Defines the shell. ('shell) or ('eshell) - ;(defvar multi-eshell-name "*eshell*") ;;; Name of default shell or eshell buffer + ;(defvar multi-eshell-name "*eshell*") ;;; Name of default shell or eshell buffer (defvar multi-eshell-ring (make-ring 100) "This stores a bunch of buffers, which are shells created by multi-eshell." ) (setq multi-eshell-index 0 ) @@ -1016,19 +1020,19 @@ Set aliases for emacs functions and ~PATH~ (defun multi-eshell-is-current-buffer-current-multi-eshell (&optional ignored) "Checks if current buffer is the current multi-eshell." (eq (current-buffer) (ring-ref multi-eshell-ring multi-eshell-index)) - ) + ) (defun multi-eshell-switch-to-current-shell (&optional ignored) "Switch to shell buffer." (if (buffer-live-p (ring-ref multi-eshell-ring multi-eshell-index)) (switch-to-buffer (ring-ref multi-eshell-ring multi-eshell-index)) ) - ) + ) (defun multi-eshell-current-shell (&optional ignored) "Returns the current multi-eshell." (ring-ref multi-eshell-ring multi-eshell-index) - ) + ) (defun multi-eshell-switch-to-next-live-shell (&optional ignored) "Switches to the next live shell. Creates one if none exists." @@ -1054,7 +1058,7 @@ Set aliases for emacs functions and ~PATH~ ) ) ) - ) + ) ;;;###autoload (defun multi-eshell-go-back (&optional ignored) @@ -1063,7 +1067,7 @@ Set aliases for emacs functions and ~PATH~ (if (buffer-live-p multi-eshell-last-buffer) (switch-to-buffer multi-eshell-last-buffer) (message "Last buffer visited before multi-eshell is gone. Nothing to go back to..") - )) + )) ;;;###autoload @@ -1077,12 +1081,12 @@ Set aliases for emacs functions and ~PATH~ (if (ring-empty-p multi-eshell-ring) (multi-eshell 1) (if (and (buffer-live-p (multi-eshell-current-shell) ) - (not (eq (multi-eshell-current-shell) (current-buffer)))) - (switch-to-buffer (multi-eshell-current-shell)) - (multi-eshell-switch-to-next-live-shell) - ) - ) - ))) + (not (eq (multi-eshell-current-shell) (current-buffer)))) + (switch-to-buffer (multi-eshell-current-shell)) + (multi-eshell-switch-to-next-live-shell) + ) + ) + ))) ;;;###autoload (defun multi-eshell (&optional numshells) @@ -1098,7 +1102,7 @@ Set aliases for emacs functions and ~PATH~ (if (eq (get-buffer multi-eshell-name) nil) ;If a (progn (multi-eshell-function) - ;(process-send-string (get-buffer-process new-buff-name) (concat "cd " localdir "\n")) + ;(process-send-string (get-buffer-process new-buff-name) (concat "cd " localdir "\n")) (ring-insert multi-eshell-ring (current-buffer) ) (setq multi-eshell-index (+ multi-eshell-index 1)) ) @@ -1110,11 +1114,11 @@ Set aliases for emacs functions and ~PATH~ (rename-buffer new-buff-name ) (switch-to-buffer tempname) (rename-buffer multi-eshell-name) - (switch-to-buffer new-buff-name) - ;(process-send-string (get-buffer-process new-buff-name) (concat "cd " localdir "\n")) - (ring-insert multi-eshell-ring (current-buffer) ) - (setq multi-eshell-index (+ multi-eshell-index 1)) - ) + (switch-to-buffer new-buff-name) + ;(process-send-string (get-buffer-process new-buff-name) (concat "cd " localdir "\n")) + (ring-insert multi-eshell-ring (current-buffer) ) + (setq multi-eshell-index (+ multi-eshell-index 1)) + ) ) ) ) @@ -1128,14 +1132,14 @@ Set aliases for emacs functions and ~PATH~ (cond ((bufferp buffer-of-name) ;If the buffer exists, switch to it (assume it is a shell) (switch-to-buffer name)) ( (bufferp (get-buffer multi-eshell-name)) - (progn - (multi-eshell-function) - (rename-buffer tempname) - (multi-eshell-function) - (rename-buffer name) - (switch-to-buffer tempname) - (rename-buffer multi-eshell-name) - (switch-to-buffer name))) + (progn + (multi-eshell-function) + (rename-buffer tempname) + (multi-eshell-function) + (rename-buffer name) + (switch-to-buffer tempname) + (rename-buffer multi-eshell-name) + (switch-to-buffer name))) ( t (progn (multi-eshell-function) @@ -1259,16 +1263,16 @@ Set aliases for emacs functions and ~PATH~ "feh" nil "feh --bg-scale ~/dotfiles/wallpaper.png")) (defun thanos/emacs-keys () - "Swap caps with ctrl." - (interactive) - (start-process-shell-command - "setxkbmap" nil "setxkbmap us -option ctrl:swapcaps")) + "Swap caps with ctrl." + (interactive) + (start-process-shell-command + "setxkbmap" nil "setxkbmap us -option ctrl:swapcaps")) (defun thanos/greek-keyboard () - "Swap caps with ctrl." - (interactive) - (start-process-shell-command - "setxkbmap" nil "setxkbmap gr")) + "Swap caps with ctrl." + (interactive) + (start-process-shell-command + "setxkbmap" nil "setxkbmap gr")) (defun thanos/exwm-update-class () (exwm-workspace-rename-buffer exwm-class-name)) -- cgit v1.2.3