[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote e4f39ac0ff 12/13: Set the denote-rename-buffer--
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote e4f39ac0ff 12/13: Set the denote-rename-buffer--fallback function |
Date: |
Sun, 15 Oct 2023 03:57:51 -0400 (EDT) |
branch: externals/denote
commit e4f39ac0ff5be2ebc4196818e46e12cdf106b254
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Set the denote-rename-buffer--fallback function
---
denote-rename-buffer.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/denote-rename-buffer.el b/denote-rename-buffer.el
index 61d064e805..71d8948ca1 100644
--- a/denote-rename-buffer.el
+++ b/denote-rename-buffer.el
@@ -150,10 +150,16 @@ option `denote-rename-buffer-function' and is thus used
by the
'denote-rename-buffer
"2.1.0")
+(defun denote-rename-buffer--fallback (&optional buffer)
+ "Fallback to rename BUFFER or `current-buffer'.
+This is called if `denote-rename-buffer-rename-function' is nil."
+ (denote-rename-buffer--with-unique-name
+ (denote-rename-buffer--get-title (or buffer (current-buffer)))))
+
(defun denote-rename-buffer-rename-function-or-fallback ()
"Call `denote-rename-buffer-function' or its fallback to rename with title.
Add this to `find-file-hook' and `denote-after-new-note-hook'."
- (funcall (or denote-rename-buffer-function
#'denote-rename-buffer--get-title)))
+ (funcall (or denote-rename-buffer-function
#'denote-rename-buffer--fallback)))
;;;###autoload
(define-minor-mode denote-rename-buffer-mode
- [elpa] externals/denote updated (c0db85dc68 -> 9b8fb2e490), ELPA Syncer, 2023/10/15
- [elpa] externals/denote 63621dc37b 03/13: Fix regression caused by commit c0db85d, ELPA Syncer, 2023/10/15
- [elpa] externals/denote f695776a72 04/13: Remove needless asterisks from some when-let forms, ELPA Syncer, 2023/10/15
- [elpa] externals/denote edbe4e0193 02/13: Return non-nil in denote--dir-in-denote-directory-p, ELPA Syncer, 2023/10/15
- [elpa] externals/denote 238086defb 09/13: Add missing markup from commit 69142b2, ELPA Syncer, 2023/10/15
- [elpa] externals/denote f18a9ea8a5 01/13: Remove denote--default-dir-has-denote-prefix, ELPA Syncer, 2023/10/15
- [elpa] externals/denote ec804b2e45 07/13: Use only title by default in denote-rename-buffer-format, ELPA Syncer, 2023/10/15
- [elpa] externals/denote 9b8fb2e490 13/13: Add FIXME for denote-file-prompt history, ELPA Syncer, 2023/10/15
- [elpa] externals/denote 5213f50ae0 11/13: Merge branch 'main' of github.com:protesilaos/denote, ELPA Syncer, 2023/10/15
- [elpa] externals/denote e4f39ac0ff 12/13: Set the denote-rename-buffer--fallback function,
ELPA Syncer <=
- [elpa] externals/denote a9486b01f6 05/13: Abstract buffer rename into denote-rename-buffer--with-unique-name, ELPA Syncer, 2023/10/15
- [elpa] externals/denote 425558e73c 06/13: BREAKING Add denote-rename-buffer-format user option (work-in-progress), ELPA Syncer, 2023/10/15
- [elpa] externals/denote 69142b2335 08/13: Expand the documentation of denote-rename-buffer-mode and related, ELPA Syncer, 2023/10/15
- [elpa] externals/denote 37e8876b43 10/13: Merge pull request #174 from jeanphilippegg/small-cleanup, ELPA Syncer, 2023/10/15