[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 63621dc37b 03/13: Fix regression caused by commi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 63621dc37b 03/13: Fix regression caused by commit c0db85d |
Date: |
Sun, 15 Oct 2023 03:57:50 -0400 (EDT) |
branch: externals/denote
commit 63621dc37ba42e59102a438db9f10ad906761239
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Fix regression caused by commit c0db85d
What we ultimately want is to be able to extract data from a buffer,
though the previous version did not handle all cases gracefully. A
problem with that was how it would get the title of the current file
as the description of a link, even though it would correctly point to
the selected link target.
---
denote.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/denote.el b/denote.el
index 9279ebfba9..6131fbeb0c 100644
--- a/denote.el
+++ b/denote.el
@@ -1374,9 +1374,16 @@ Run `denote-desluggify' on title if the extraction is
sucessful."
"Return path to FILE or its buffer together with the appropriate function.
Subroutine of `denote--file-with-temp-buffer'."
(when file
- (if (file-exists-p file)
- (cons #'insert-file-contents buffer-file-name)
- (cons #'insert-buffer (get-file-buffer file)))))
+ (let ((buffer (get-file-buffer file))
+ (file-exists (file-exists-p file)))
+ (cond
+ ((or (and file-exists buffer (not (buffer-modified-p buffer)))
+ file-exists)
+ (cons #'insert-file-contents file))
+ (buffer
+ (cons #'insert-buffer buffer))
+ (t
+ (error "Cannot find anything about file `%s'" file))))))
(defmacro denote--file-with-temp-buffer (file &rest body)
"If FILE exists, insert its contents in a temp buffer and call BODY."
- [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 <=
- [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, 2023/10/15
- [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