THE WRETCHEDNESS OF CONFIRMATION IN EMACS
Backups
https://sachachua.com/dotemacs/index.html#backups
(setq backup-directory-alist '(("." . "~/.config/emacs/backups"))) (with-eval-after-load 'tramp (add-to-list 'tramp-backup-directory-alist (cons tramp-file-name-regexp nil))) (setq delete-old-versions -1) (setq version-control t) (setq vc-make-backup-files t) (setq auto-save-file-name-transforms '((".*" "~/.config/emacs/auto-save-list/" t)))
End Confirmations
(setq dired-clean-confirm-killing-deleted-buffers nil) (setq dired-confirm-shell-command nil) (setq dired-no-confirm t) (setq dired-recursive-deletes (quote always)) (setq dired-deletion-confirmer '(lambda (x) t)) (setq dired-recursive-deletes 'always) (setq confirm-kill-emacs nil) (setq confirm-kill-processes nil) (setq confirm-nonexistent-file-or-buffer nil) (set-buffer-modified-p nil) (defalias 'yes-or-no-p 'y-or-n-p)
To kill the buffer immediately without saving any changes made to the buffer and without having to say yes or no or even y or n. I understand changes will be lost.
(add-hook 'kill-buffer-query-functions (lambda () (not-modified) t))
My Revised Configuration
(set-buffer-modified-p nil) (setq confirm-kill-emacs nil) (setq confirm-kill-processes nil) (setq confirm-nonexistent-file-or-buffer nil) (setq dired-clean-confirm-killing-deleted-buffers nil) (setq dired-confirm-shell-command nil) (setq dired-deletion-confirmer '(lambda (x) t)) (setq dired-recursive-deletes (quote always)) (setq revert-buffer-quick-short-answers t) (setq use-short-answers t) (global-set-key (kbd "C-x C-c") 'kill-emacs) ;; Temporarily disable y-or-n-p prompts by always returning t (defadvice y-or-n-p (around always-yes (prompt) activate) "Always return t for y-or-n-p prompts." (setq ad-return-value t))