From 25f0fe5d68ebec67f3a1ca2f24c4a0bc8e49381f Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Fri, 5 Apr 2024 09:12:32 +1100 Subject: [emacs][urxvt] bunch of small changes - add org clock string to frame title - add ansi color to compilation buffer - look for project source dir from build dir - fix my-kill-sexp-or-comment - more lines in urxvt --- emacs/.emacs.d/init/ycp-editing.el | 4 +++- emacs/.emacs.d/init/ycp-org.el | 5 +++++ emacs/.emacs.d/init/ycp-prog.el | 5 +++++ emacs/.emacs.d/init/ycp-project.el | 2 +- emacs/.emacs.d/init/ycp-web.el | 5 +++-- 5 files changed, 17 insertions(+), 4 deletions(-) (limited to 'emacs/.emacs.d/init') diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el index 8d260ee..203b185 100644 --- a/emacs/.emacs.d/init/ycp-editing.el +++ b/emacs/.emacs.d/init/ycp-editing.el @@ -125,7 +125,9 @@ (setq avy-keys '(97 115 100 102 103 104 106 107 108))) (my-package flyspell - (my-keybind flyspell-mode-map "C-." nil)) + (my-keybind flyspell-mode-map + "C-." nil + )) (my-package pyim (:delay 30) diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el index 8364810..4ae1ed3 100644 --- a/emacs/.emacs.d/init/ycp-org.el +++ b/emacs/.emacs.d/init/ycp-org.el @@ -108,6 +108,11 @@ (plist-put org-format-latex-options :scale 1.5) (setq org-reverse-note-order t) (add-hook 'before-save-hook #'my-org-update-updated) + ;; Add org mode line string, including `org-clock-get-clock-string' + (setq frame-title-format + '(multiple-frames "%b" + ("" "%b - GNU Emacs at " system-name + " " org-mode-line-string))) ) (my-package org-duration diff --git a/emacs/.emacs.d/init/ycp-prog.el b/emacs/.emacs.d/init/ycp-prog.el index 054b035..e2d7451 100644 --- a/emacs/.emacs.d/init/ycp-prog.el +++ b/emacs/.emacs.d/init/ycp-prog.el @@ -289,6 +289,9 @@ compilation-context-lines 10 compilation-scroll-output 'first-error compilation-skip-threshold 2) + (require 'ansi-color) + ;; ansi color in compilation buffer + (add-hook 'compilation-filter-hook 'ansi-color-compilation-filter) ) ;;; flymake @@ -499,6 +502,8 @@ "C-c d s" 'my-gdb-maria-spider ) (define-key gud-mode-map (kbd "C-c C-z") 'my-gdb-mysql-parse-frame) + (define-key gud-mode-map (kbd "C-c C-p") 'comint-previous-prompt) + (define-key gud-mode-map (kbd "C-c C-n") 'comint-next-prompt) (add-to-list 'grep-files-aliases '("mtr" . "*.inc *.test *.cnf *.result *.rdiff")) (add-to-list 'grep-files-aliases diff --git a/emacs/.emacs.d/init/ycp-project.el b/emacs/.emacs.d/init/ycp-project.el index d4c7dd9..99c022c 100644 --- a/emacs/.emacs.d/init/ycp-project.el +++ b/emacs/.emacs.d/init/ycp-project.el @@ -45,7 +45,7 @@ (add-to-list 'project-switch-commands '(project-shell "Shell")) (define-key project-prefix-map "m" #'magit-project-status) (add-to-list 'project-switch-commands '(magit-project-status "Magit") t) - ) + (add-to-list 'project-find-functions #'my-project-try-find-from-build-dir t)) (provide 'ycp-project) ;;; ycp-project.el ends here diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el index 2a56f95..865236b 100644 --- a/emacs/.emacs.d/init/ycp-web.el +++ b/emacs/.emacs.d/init/ycp-web.el @@ -23,7 +23,7 @@ ;;; Commentary: ;; My config for web related. Covers cookies, web browsing, clients to -;; web services like osm and openlibrary +;; web services like osm and openlibrary ;;; Code: @@ -212,7 +212,8 @@ ;; it pulls. (add-hook 'org-jira-mode-hook (lambda () (setq show-trailing-whitespace nil))) - ) + (add-hook 'org-jira-mode-hook + 'turn-off-auto-fill) ) (my-package eww (:delay 60) -- cgit v1.2.3