From fd849e28022c03c7925fd2b4693c0497327adefc Mon Sep 17 00:00:00 2001 From: Spencer Williams Date: Sun, 6 Jul 2025 21:51:51 -0400 Subject: Rename seam-make-note --- lisp/seam-test.el | 24 ++++++++++++------------ lisp/seam.el | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'lisp') diff --git a/lisp/seam-test.el b/lisp/seam-test.el index 3f8c4e5..4907b51 100644 --- a/lisp/seam-test.el +++ b/lisp/seam-test.el @@ -65,7 +65,7 @@ `(seam-test-environment (let ,options (let ,(cl-loop for (name . args) in varlist - collect `(,name (seam-make-note ,@args))) + collect `(,name (seam-create-note ,@args))) ;; FIXME: It's quite possible for tests to fail in such a way ;; that this does not kill the buffers. (unwind-protect (progn ,@body) @@ -102,7 +102,7 @@ (cl-loop for ret = (re-search-forward "" nil t) while ret collect (match-string 1))))) -(ert-deftest seam-test-make-note-private () +(ert-deftest seam-test-create-note-private () (should (equal '("private/note.org") @@ -110,7 +110,7 @@ ((note "Note")) (seam-test-list-files))))) -(ert-deftest seam-test-make-note-public () +(ert-deftest seam-test-create-note-public () (should (equal '("html/note.html" "public/note.org") @@ -118,7 +118,7 @@ ((note "Note" "public")) (seam-test-list-files))))) -(ert-deftest seam-test-make-note-weird-filename () +(ert-deftest seam-test-create-note-weird-filename () (should (equal '("./Weir'd file name!" ("private/weird-file-name.org")) @@ -153,22 +153,22 @@ (buffer-name note) (seam-get-title-from-file (buffer-file-name note)))))) -(ert-deftest seam-test-make-note-invalid-type () +(ert-deftest seam-test-create-note-invalid-type () (should-error (seam-test-environment - (kill-buffer (seam-make-note "Note" "invalid-type"))))) + (kill-buffer (seam-create-note "Note" "invalid-type"))))) -(ert-deftest seam-test-make-note-name-conflict () +(ert-deftest seam-test-create-note-name-conflict () (should-error (seam-test-environment - (kill-buffer (seam-make-note " Note 1 ")) - (kill-buffer (seam-make-note "Note_1"))))) + (kill-buffer (seam-create-note " Note 1 ")) + (kill-buffer (seam-create-note "Note_1"))))) -(ert-deftest seam-test-make-note-name-conflict-different-types () +(ert-deftest seam-test-create-note-name-conflict-different-types () (should-error (seam-test-environment - (kill-buffer (seam-make-note "Note")) - (kill-buffer (seam-make-note "Note" "public"))))) + (kill-buffer (seam-create-note "Note")) + (kill-buffer (seam-create-note "Note" "public"))))) (ert-deftest seam-test-rename-note () (should diff --git a/lisp/seam.el b/lisp/seam.el index 0bd0f96..113d2c8 100644 --- a/lisp/seam.el +++ b/lisp/seam.el @@ -99,7 +99,7 @@ naming. Must be a function taking two arguments: TITLE and TYPE." (org-mark-ring-push) (if-let ((file (seam-lookup-slug path))) (find-file file) - (seam-make-note path nil t)) + (seam-create-note path nil t)) (seam-set-buffer-name)) (defvar seam-note-file-regexp "\\`[^.].+\\.org\\'") @@ -203,7 +203,7 @@ naming. Must be a function taking two arguments: TITLE and TYPE." (unless (member type (seam-get-all-note-type-names)) (error "`%s' is not a valid Seam note type" type))) -(defun seam-make-note (title &optional type select) +(defun seam-create-note (title &optional type select) (unless type (setq type seam-default-note-type)) (seam-validate-note-type type) @@ -274,7 +274,7 @@ completion prompt is given to choose the type." ;; formatter function) (NOTE: Redundant if buffer wasn't ;; already open, as `seam-setup-buffer' does this too.) (seam-set-buffer-name)) - (seam-make-note (string-trim completion) (or type seam-default-note-type) t))))) + (seam-create-note (string-trim completion) (or type seam-default-note-type) t))))) (cl-defun seam-get-note-type (file &optional no-error) (when (and file (equal "org" (file-name-extension file))) @@ -621,7 +621,7 @@ link will replace it." (cl-destructuring-bind (completion . file) (seam-read-title "Insert note link: ") (let* ((new-buffer (unless file - (seam-make-note completion seam-default-note-type nil))) + (seam-create-note completion seam-default-note-type nil))) (selection (when (use-region-p) (buffer-substring (region-beginning) -- cgit v1.2.3