aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-project.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2024-04-05 09:12:32 +1100
committerYuchen Pei <id@ypei.org>2024-04-05 09:12:32 +1100
commit25f0fe5d68ebec67f3a1ca2f24c4a0bc8e49381f (patch)
tree94f54c59a0116949d2ee2342e54d91185f2c5367 /emacs/.emacs.d/lisp/my/my-project.el
parent5e5406f6b1b47b84591ee9dea4233164e9a55fb0 (diff)
[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
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-project.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-project.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-project.el b/emacs/.emacs.d/lisp/my/my-project.el
index 1cf23ee..70f86dc 100644
--- a/emacs/.emacs.d/lisp/my/my-project.el
+++ b/emacs/.emacs.d/lisp/my/my-project.el
@@ -45,6 +45,16 @@
(file-name-nondirectory (directory-file-name
(project-root (project-current)))))
+(defun my-project-try-find-from-build-dir (dir)
+ "Try to find project from the build dir.
+
+To use as an item in `project-find-functions'.
+
+TODO: check whether we could use
+`project-vc-external-roots-function' instead."
+ (when (string-match-p "/build\\>.*" dir)
+ (project-current nil (replace-regexp-in-string "/build\\>.*" "/src" dir))))
+
(defvar my-licenses nil
"List of licenses in the form of (licence-id . license-text-file)")