aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init')
-rw-r--r--emacs/.emacs.d/init/ycp-editing.el9
-rw-r--r--emacs/.emacs.d/init/ycp-gnus.el11
-rw-r--r--emacs/.emacs.d/init/ycp-grep.el11
-rw-r--r--emacs/.emacs.d/init/ycp-org.el24
-rw-r--r--emacs/.emacs.d/init/ycp-prog.el10
5 files changed, 39 insertions, 26 deletions
diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el
index b5da08a..2e87ecc 100644
--- a/emacs/.emacs.d/init/ycp-editing.el
+++ b/emacs/.emacs.d/init/ycp-editing.el
@@ -41,7 +41,14 @@
;; don't interpret C-m as RET
(define-key input-decode-map [?\C-m] [C-m])
(setq save-place-file (locate-user-emacs-file "saveplace"))
-(setq visual-line-fringe-indicators '(left-curly-arrow right-curly-arrow))
+
+(my-configure
+ (setq visual-line-fringe-indicators
+ '(left-curly-arrow right-curly-arrow))
+ ;; Keep the binding of C-a and C-e
+ (my-keybind visual-line-mode-map
+ "C-a" nil
+ "C-e" nil))
(my-package my-editing
(:delay 5)
diff --git a/emacs/.emacs.d/init/ycp-gnus.el b/emacs/.emacs.d/init/ycp-gnus.el
index 6945de1..8485a86 100644
--- a/emacs/.emacs.d/init/ycp-gnus.el
+++ b/emacs/.emacs.d/init/ycp-gnus.el
@@ -30,19 +30,19 @@
(my-setq-from-local user-mail-address user-full-name)
(setq auth-sources '("~/.authinfo.gpg"))
-;;;; `mm-encode'
+;;; `mm-encode'
(my-package mm-encode
(setq mm-encrypt-option nil ; use 'guided if you need more control
mm-sign-option nil)) ; same
-;;;; `mml-sec'
+;;; `mml-sec'
(my-package mml-sec
(setq mml-secure-openpgp-encrypt-to-self t
mml-secure-openpgp-sign-with-sender t
mml-secure-smime-encrypt-to-self t
mml-secure-smime-sign-with-sender t))
-;;;; `message'
+;;; `message'
(my-package message
(setq mail-user-agent 'message-user-agent
message-elide-ellipsis "\n> [... %l lines elided]\n"
@@ -64,7 +64,7 @@
(setq smtpmail-smtp-service 587
smtpmail-queue-mail nil))
-;;;; `sendmail' (mail transfer agent)
+;;; `sendmail' (mail transfer agent)
(setq send-mail-function 'smtpmail-send-it)
;;; gnus
@@ -167,7 +167,7 @@
(setq gnus-treat-display-smileys nil)
(setq gnus-article-x-face-too-ugly ".*")) ; all images in headers are outright
; annoying---disabled!
-;; gnus-desktop-notify
+;;; gnus-desktop-notify
(my-package gnus-desktop-notify
(:delay 30)
(gnus-desktop-notify-mode)
@@ -184,6 +184,7 @@
(bbdb-mua-auto-update-init 'gnus 'message)
(setq bbdb-message-all-addresses t)
(setq bbdb-mua-pop-up-window-size .15)
+ (setq bbdb-new-mails-primary nil)
(setq bbdb-mail-user-agent 'gnus-user-agent)
(setq bbdb-update-records-p 'create)
(setq bbdb-message-clean-mail-function 'my-bbdb-clean-mail)
diff --git a/emacs/.emacs.d/init/ycp-grep.el b/emacs/.emacs.d/init/ycp-grep.el
index 2e75e26..6496c78 100644
--- a/emacs/.emacs.d/init/ycp-grep.el
+++ b/emacs/.emacs.d/init/ycp-grep.el
@@ -27,6 +27,9 @@
;;; Code:
+;;; Some configs in `simple' are related to search
+(my-package simple
+ (add-hook 'next-error-hook #'which-func-update))
;;; `grep' package
(my-package grep
@@ -87,14 +90,6 @@
(my-keybind occur-mode-map "t" #'toggle-truncate-lines)
)
-
-;;; `xref' package
-(my-package xref
- ;; All those have been changed for Emacs 28
- (setq xref-show-definitions-function #'xref-show-definitions-completing-read) ; for M-.
- (setq xref-show-xrefs-function #'xref-show-definitions-buffer)
- )
-
;;; wgrep (writable grep)
(my-package wgrep
(:install t)
diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el
index db29697..2d40c37 100644
--- a/emacs/.emacs.d/init/ycp-org.el
+++ b/emacs/.emacs.d/init/ycp-org.el
@@ -170,11 +170,14 @@
(setq org-agenda-skip-deadline-if-done nil)
(setq org-agenda-skip-scheduled-if-done nil)
(setq org-agenda-skip-timestamp-if-done t)
- (setq org-agenda-start-on-weekday 6)
+ (setq org-agenda-start-on-weekday nil)
(setq org-agenda-custom-commands
`(("A" "Agenda and next"
((agenda ""
- ((org-agenda-span 'week)))
+ ((org-agenda-span 'week)
+ ;; only works when `org-agenda-start-on-weekday'
+ ;; is nil
+ (org-agenda-start-day "-2d")))
(tags-todo "PRIORITY=\"A\"" nil))
nil
,(my-get-from-local my-org-agenda-and-next-export-files))
@@ -206,22 +209,27 @@
(my-package org-capture
(my-override org-capture-set-plist)
(setq org-capture-templates
- `(("j" "Journal" entry
+ `(("w" "Today's work" checkitem
+ (file+headline org-default-notes-file "Today's work")
+ "- [ ] %a%?"
+ :prepend t)
+ ("j" "Journal" entry
(file+olp+datetree ,(my-get-from-local my-org-journal-file))
- "* %^{Title}
+ "* %?
:PROPERTIES:
:CREATED: %U
:END:
-
-%?")
+")
("t" "Todo" entry
(file+headline org-default-notes-file "Inbox")
- "* TODO %a%?
+ "* TODO %?
:PROPERTIES:
:CREATED: %U
+:Referral: %a
:END:
-%i"
+%i
+"
:prepend t)
("ya" "Blank audio" entry
(file+headline org-default-notes-file "Audios")
diff --git a/emacs/.emacs.d/init/ycp-prog.el b/emacs/.emacs.d/init/ycp-prog.el
index 63cdb36..23982ea 100644
--- a/emacs/.emacs.d/init/ycp-prog.el
+++ b/emacs/.emacs.d/init/ycp-prog.el
@@ -293,10 +293,12 @@
;; "Probably \"%s\" should be imperative \"%s\""
(setq checkdoc-verb-check-experimental-flag nil))
-(my-package my-prog
- (:delay 10)
- (require 'xref)
- (my-override xref-query-replace-in-results))
+(my-package xref
+ (add-hook 'xref-after-jump-hook #'which-func-update)
+ ;; All those have been changed for Emacs 28
+ (setq xref-show-definitions-function #'xref-show-definitions-completing-read) ; for M-.
+ (setq xref-show-xrefs-function #'xref-show-definitions-buffer)
+ )
(my-package js
(:delay 60)