[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 28943674e5 2/3: Clarify denote-rename-buffer-wit
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 28943674e5 2/3: Clarify denote-rename-buffer-with-title purpose |
Date: |
Sun, 8 Oct 2023 06:57:53 -0400 (EDT) |
branch: externals/denote
commit 28943674e578249971e81d9da814a9d621023a5d
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Clarify denote-rename-buffer-with-title purpose
This is already explained in the user option and the manual, but it is
good to have it here as well.
---
denote-rename-buffer.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/denote-rename-buffer.el b/denote-rename-buffer.el
index 76011e45b7..dce5d50685 100644
--- a/denote-rename-buffer.el
+++ b/denote-rename-buffer.el
@@ -65,7 +65,12 @@ Return the file path and the type of it as a cons cell."
(defun denote-rename-buffer-with-title (&optional buffer)
"Retrieve Denote file of BUFFER and rename BUFFER based on the file title.
BUFFER is an object that satisfies `bufferp'. If nil, then use
-the return value of `current-buffer'."
+the return value of `current-buffer'.
+
+This is a generic reference implementation for use in the user
+option `denote-rename-buffer-function'. If you need something
+else, check the Denote manual for functions/variables that
+extract the data you are looking for."
(when-let* ((file-and-type (denote-rename-buffer--common-check (or buffer
(current-buffer))))
(title (denote--retrieve-title-or-filename (car file-and-type)
(cdr file-and-type))))
(rename-buffer title :unique)))