docs(emacs): remove csetq, replace it with setopt
All checks were successful
deploy / build (push) Successful in 5m24s

This commit is contained in:
2024-10-06 11:58:42 +02:00
parent 4baaaadf02
commit d9a7e58f1e
5 changed files with 49 additions and 93 deletions

View File

@@ -409,13 +409,13 @@ configuration for the ~mu4e~ package itself.
<<mu4e-ical-setup>>
<<mu4e-ical-init-config>>
(csetq mu4e-completing-read-function 'completing-read
mu4e-use-fancy-chars t
message-kill-buffer-on-exit t
mu4e-org-support nil)
(setopt mu4e-completing-read-function 'completing-read
mu4e-use-fancy-chars t
message-kill-buffer-on-exit t
mu4e-org-support nil)
(let ((dir (concat (getenv "HOME") "/Downloads/mu4e")))
(when (file-directory-p dir)
(csetq mu4e-attachment-dir dir)))
(setopt mu4e-attachment-dir dir)))
(defmacro mu4e-view-mode--prepare ()
`(lambda () (visual-line-mode 1)))
:gfhook ('mu4e-view-mode-hook (mu4e-view-mode--prepare))
@@ -1331,7 +1331,7 @@ dark mode for PDFs.
"m" 'pdf-view-midnight-minor-mode)
:config
(with-eval-after-load 'pdf-view
(csetq pdf-view-midnight-colors '("#d8dee9" . "#2e3440"))))
(setopt pdf-view-midnight-colors '("#d8dee9" . "#2e3440"))))
#+end_src
One thing ~pdf-tools~ doesnt handle is restoring the PDF to the last
@@ -1365,8 +1365,8 @@ doing and what Git is doing! In short, I absolutely love it!
:config
(add-hook 'magit-process-find-password-functions 'magit-process-password-auth-source)
<<magit-angular-keywords-highlight>>
(csetq magit-clone-default-directory "~/fromGIT/"
magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
(setopt magit-clone-default-directory "~/fromGIT/"
magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
(with-eval-after-load 'evil-collection
(phundrak/evil
:packages '(evil-collection magit)

View File

@@ -81,20 +81,20 @@ Since Emacs 29, it is possible to enable drag-and-drop between Emacs
and other applications.
#+name: dired-drag-and-drop
#+begin_src emacs-lisp :tangle no
(csetq dired-mouse-drag-files t
mouse-drag-and-drop-region-cross-program t)
(setopt dired-mouse-drag-files t
mouse-drag-and-drop-region-cross-program t)
#+end_src
In Dirvish, its best to use the long name of flags whenever possible,
otherwise some commands wont work.
#+name: dired-listing-flags
#+begin_src emacs-lisp :tangle no
(csetq dired-listing-switches (string-join '("--all"
"--human-readable"
"--time-style=long-iso"
"--group-directories-first"
"-lv1")
" "))
(setopt dired-listing-switches (string-join '("--all"
"--human-readable"
"--time-style=long-iso"
"--group-directories-first"
"-lv1")
" "))
#+end_src
However, it is possible to instead use =eza= when it is available (its
@@ -121,12 +121,12 @@ files and images.
(my/dir (lambda (path &optional dir)
(expand-file-name (file-name-as-directory path)
(or dir user-emacs-directory)))))
(csetq image-dired-thumb-size 150
image-dired-dir (funcall my/dir "dired-img")
image-dired-db-file (funcall my/file "dired-db.el")
image-dired-gallery-dir (funcall my/dir "gallery")
image-dired-temp-image-file (funcall my/file "temp-image" image-dired-dir)
image-dired-temp-rotate-image-file (funcall my/file "temp-rotate-image" image-dired-dir)))
(setopt image-dired-thumb-size 150
image-dired-dir (funcall my/dir "dired-img")
image-dired-db-file (funcall my/file "dired-db.el")
image-dired-gallery-dir (funcall my/dir "gallery")
image-dired-temp-image-file (funcall my/file "temp-image" image-dired-dir)
image-dired-temp-rotate-image-file (funcall my/file "temp-rotate-image" image-dired-dir)))
#+end_src
Copying files with Dired is a blocking process. Its usually fine when
@@ -461,10 +461,10 @@ supported natively. I will describe them here.
:straight (tramp :type built-in :build t)
:config
<<tramp-add-yadm>>
(csetq tramp-ssh-controlmaster-options nil
tramp-verbose 0
tramp-auto-save-directory (locate-user-emacs-file "tramp/")
tramp-chunksize 2000)
(setopt tramp-ssh-controlmaster-options nil
tramp-verbose 0
tramp-auto-save-directory (locate-user-emacs-file "tramp/")
tramp-chunksize 2000)
(add-to-list 'backup-directory-alist ; deactivate auto-save with TRAMP
(cons tramp-file-name-regexp nil)))
#+end_src

View File

@@ -25,16 +25,16 @@ it bépo-compatible.
:defer t
:straight t
:config
(csetq avy-keys '(?a ?u ?i ?e ?c ?t ?s ?r ?n)
avy-dispatch-alist '((?x . avy-action-kill-move)
(?X . avy-action-kill-stay)
(?T . avy-action-teleport)
(?m . avy-action-mark)
(?C . avy-action-copy)
(?y . avy-action-yank)
(?Y . avy-action-yank-line)
(?I . avy-action-ispell)
(?z . avy-action-zap-to-char)))
(setopt avy-keys '(?a ?u ?i ?e ?c ?t ?s ?r ?n)
avy-dispatch-alist '((?x . avy-action-kill-move)
(?X . avy-action-kill-stay)
(?T . avy-action-teleport)
(?m . avy-action-mark)
(?C . avy-action-copy)
(?y . avy-action-yank)
(?Y . avy-action-yank-line)
(?I . avy-action-ispell)
(?z . avy-action-zap-to-char)))
(defun my/avy-goto-url ()
"Jump to url with avy."
(interactive)
@@ -71,12 +71,12 @@ Whats the point of using Emacs if you cant tell everyone?
:straight (:built t)
:defer t
:config
(csetq elcord-use-major-mode-as-main-icon t
elcord-refresh-rate 5
elcord-boring-buffers-regexp-list `("^ "
,(rx "*" (+ any) "*")
,(rx bol (or "Re: "
"Fwd: ")))))
(setopt elcord-use-major-mode-as-main-icon t
elcord-refresh-rate 5
elcord-boring-buffers-regexp-list `("^ "
,(rx "*" (+ any) "*")
,(rx bol (or "Re: "
"Fwd: ")))))
#+end_src
** Elpher

View File

@@ -60,8 +60,8 @@ it is.
:host github
:repo "Phundrak/appwrite.el")
:config
(csetq appwrite-endpoint "https://appwrite.phundrak.com"
appwrite-devel t))
(setopt appwrite-endpoint "https://appwrite.phundrak.com"
appwrite-devel t))
#+end_src
*** Databases
@@ -1419,11 +1419,11 @@ languages in the same buffer, mainly HTML, CSS, and JavaScript.
("\\.djhtml\\'" . web-mode)
("\\.vue\\'" . web-mode))
:config
(csetq web-mode-markup-indent-offset 2
web-mode-code-indent-offset 2
web-mode-css-indent-offset 2
web-mode-style-padding 0
web-mode-script-padding 0)
(setopt web-mode-markup-indent-offset 2
web-mode-code-indent-offset 2
web-mode-css-indent-offset 2
web-mode-style-padding 0
web-mode-script-padding 0)
:general
(phundrak/major-leader-key
:keymaps 'web-mode-map