aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/prog-general.el12
-rw-r--r--tests/test-prog-general-open-project-daily-prep.el7
2 files changed, 9 insertions, 10 deletions
diff --git a/modules/prog-general.el b/modules/prog-general.el
index e09c3f40..a4be7205 100644
--- a/modules/prog-general.el
+++ b/modules/prog-general.el
@@ -147,16 +147,16 @@ buffer the user is looking at."
(defun cj/open-project-daily-prep ()
"Open the current Projectile project's daily prep, respecting the split.
-The prep file is inbox/today-prep.org under the project root (a stable
-symlink to the dated prep doc). Project-scoped: a project without one gets a
-message. Opens in the other window when the frame is split and reuses the
-current window otherwise, matching `cj/open-project-root-todo'."
+The prep file is daily-prep.org under the project root (a stable symlink
+to the dated prep doc in daily-prep/). Project-scoped: a project without
+one gets a message. Opens in the other window when the frame is split and
+reuses the current window otherwise, matching `cj/open-project-root-todo'."
(interactive)
(if-let ((root (projectile-project-root)))
- (let ((file (expand-file-name "inbox/today-prep.org" root)))
+ (let ((file (expand-file-name "daily-prep.org" root)))
(if (file-exists-p file)
(cj/--find-file-respecting-split file)
- (message "No inbox/today-prep.org in project: %s" root)))
+ (message "No daily-prep.org in project: %s" root)))
(message "Not in a Projectile project")))
(use-package projectile
diff --git a/tests/test-prog-general-open-project-daily-prep.el b/tests/test-prog-general-open-project-daily-prep.el
index 07895ed4..d9c78ff0 100644
--- a/tests/test-prog-general-open-project-daily-prep.el
+++ b/tests/test-prog-general-open-project-daily-prep.el
@@ -1,7 +1,7 @@
;;; test-prog-general-open-project-daily-prep.el --- daily-prep opener -*- lexical-binding: t; -*-
;;; Commentary:
-;; `cj/open-project-daily-prep' (C-c p d) opens inbox/today-prep.org under the
+;; `cj/open-project-daily-prep' (C-c p d) opens daily-prep.org under the
;; current Projectile project root, via `cj/--find-file-respecting-split' so it
;; lands in the other window when the frame is split and reuses the current
;; window otherwise (matching `cj/open-project-root-todo'). It is
@@ -21,11 +21,10 @@
(ert-deftest test-prog-general-daily-prep-opens-existing-respecting-split ()
"Normal: in a project with a prep file, open it respecting the split."
(let* ((root (file-name-as-directory (make-temp-file "cj-prep-" t)))
- (prep (expand-file-name "inbox/today-prep.org" root))
+ (prep (expand-file-name "daily-prep.org" root))
opened)
(unwind-protect
(progn
- (make-directory (expand-file-name "inbox" root) t)
(write-region "" nil prep)
(cl-letf (((symbol-function 'projectile-project-root) (lambda () root))
((symbol-function 'cj/--find-file-respecting-split)
@@ -44,7 +43,7 @@
((symbol-function 'find-file-other-window) (lambda (f) (setq opened f))))
(setq result (cj/open-project-daily-prep)))
(should-not opened)
- (should (string-match-p "No inbox/today-prep.org" result)))
+ (should (string-match-p "No daily-prep.org" result)))
(delete-directory root t))))
(ert-deftest test-prog-general-daily-prep-not-in-project-messages ()