From f77444c030038100908e298666f8f84f85e768cb Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sun, 25 Jun 2023 17:06:47 +1000 Subject: Refile clock entries and some basic settings --- emacs/.emacs.d/init/ycp-basic.el | 15 ++++++++------- emacs/.emacs.d/init/ycp-editing.el | 32 ++++++++++++++++++++++++-------- emacs/.emacs.d/init/ycp-gnus.el | 2 +- emacs/.emacs.d/init/ycp-org.el | 1 + 4 files changed, 34 insertions(+), 16 deletions(-) (limited to 'emacs/.emacs.d/init') diff --git a/emacs/.emacs.d/init/ycp-basic.el b/emacs/.emacs.d/init/ycp-basic.el index 07bb11f..12000e5 100644 --- a/emacs/.emacs.d/init/ycp-basic.el +++ b/emacs/.emacs.d/init/ycp-basic.el @@ -30,13 +30,6 @@ ;;; Code: -(setq use-short-answers t) -(prefer-coding-system 'utf-8) -(set-default-coding-systems 'utf-8) -(set-terminal-coding-system 'utf-8) -(set-keyboard-coding-system 'utf-8) -(set-language-environment 'utf-8) - (my-configure (my-keybind global-map "C-x C-c" nil @@ -44,6 +37,14 @@ "C-x C-z" nil ) (setq auth-source-save-behavior nil) + (setq use-short-answers t) + (prefer-coding-system 'utf-8) + (set-default-coding-systems 'utf-8) + (set-terminal-coding-system 'utf-8) + (set-keyboard-coding-system 'utf-8) + (set-language-environment 'utf-8) + (setq load-prefer-newer t) + (setq message-log-max 16384) ) (my-configure diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el index 4b6922e..ab1bc9e 100644 --- a/emacs/.emacs.d/init/ycp-editing.el +++ b/emacs/.emacs.d/init/ycp-editing.el @@ -36,6 +36,11 @@ (setq bidi-inhibit-bpa t) (setq save-interprogram-paste-before-kill t) (setq kill-ring-max 200) +(setq sentence-end-double-space nil) +(setq show-paren-delay 0) +(setq window-divider-default-bottom-width 1) +(setq window-divider-default-places 'bottom-only) +(define-key input-decode-map [?\C-m] [C-m]) ; don't interpret C-m as RET (my-package my-editing (:delay 5) @@ -61,6 +66,10 @@ "C-M-y" #'my-yank-primary "C-a" #'my-beginning-of-line-or-indentation "M-c" #'my-copy-buffer-file-name ; override capitalize + "M-o" #'delete-blank-lines ; alias for C-x C-o + "M-SPC" #'cycle-spacing + "M-z" #'zap-up-to-char ; NOT `zap-to-char' + "" #'backward-kill-sexp ) (electric-pair-mode) ) @@ -73,12 +82,16 @@ (define-key global-map (kbd "C-c r r") 'replace-regexp) (define-key global-map (kbd "C-c r s") 'replace-string) -(my-keybind global-map - "M-o" #'delete-blank-lines ; alias for C-x C-o - "M-SPC" #'cycle-spacing - "M-z" #'zap-up-to-char ; NOT `zap-to-char' - "" #'backward-kill-sexp - ) +(my-package aggressive-indent + (:install t) + (:delay 15) + (add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode)) + +(my-package avy + (:install t) + (:delay 15) + (my-keybind global-map "C-." #'avy-goto-char-timer) + (setq avy-keys '(97 115 100 102 103 104 106 107 108))) (my-package pyim (:delay 30) @@ -109,11 +122,14 @@ (put 'narrow-to-region 'disabled nil) -(setq large-file-warning-threshold 15000000) +(setq large-file-warning-threshold nil) +(setq x-stretch-cursor t) +(setq delete-old-versions t) +(setq version-control t) (add-hook 'text-mode-hook #'turn-on-auto-fill) (add-to-list 'auto-mode-alist '("\\(README\\|CHANGELOG\\|COPYING\\|LICENSE\\)\\'" . text-mode)) - +(add-hook 'before-save-hook 'time-stamp) (provide 'ycp-editing) diff --git a/emacs/.emacs.d/init/ycp-gnus.el b/emacs/.emacs.d/init/ycp-gnus.el index 6eef1cd..d8ae4ed 100644 --- a/emacs/.emacs.d/init/ycp-gnus.el +++ b/emacs/.emacs.d/init/ycp-gnus.el @@ -30,7 +30,6 @@ (my-setq-from-local user-mail-address user-full-name) -(setq mail-user-agent 'message-user-agent) (setq auth-sources '("~/.authinfo.gpg")) ;;;; `mm-encode' @@ -77,6 +76,7 @@ ") (my-setq-from-local gnus-secondary-select-methods) (setq gnus-agent t) + (setq mail-user-agent 'gnus-user-agent) (dolist (mode '(gnus-group-mode-hook gnus-summary-mode-hook gnus-browse-mode-hook)) diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el index 513f719..77c4436 100644 --- a/emacs/.emacs.d/init/ycp-org.el +++ b/emacs/.emacs.d/init/ycp-org.el @@ -281,6 +281,7 @@ (setq org-use-speed-commands t) (setq org-speed-commands '(("User commands") + ("W" . my-org-clock-refile-clocking) ("+" . my-org-vote-up) ("-" . my-org-vote-down) ("m" . my-magit-clone-org-source) -- cgit v1.2.3