[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 431124fea1 060/355: Generalise dired fontificati
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 431124fea1 060/355: Generalise dired fontification |
Date: |
Sun, 26 Jun 2022 23:58:00 -0400 (EDT) |
branch: externals/denote
commit 431124fea1598105fa251957f71f06dcbd92ffff
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Generalise dired fontification
There is no need to limit it to the denote-directory. We ultimately
want to fontify all Denote-style file names, not just the notes created
by Denote.
For example, I have been recording all my longer-term storage using such
a naming scheme: this mode gives me the extra faces for .pdf, .mp3, and
other files.
Users of Denote may want this for attachments.
The upside of having this as a buffer-local mode is that the user can
write a wrapper function that applies the mode only in a given
directory (like we were doing before).
Thanks to Ypot for suggesting a kernel of this idea in issue 1 over at
the GitHub mirror: <https://github.com/protesilaos/denote/issues/1>.
---
README.org | 2 +-
denote-dired.el | 12 ++++--------
denote.el | 2 +-
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/README.org b/README.org
index 265804d15b..fc37453f41 100644
--- a/README.org
+++ b/README.org
@@ -370,7 +370,7 @@ Denote is meant to be a collective effort. Every bit of
help matters.
+ Author/maintainer :: Protesilaos Stavrou.
-+ Ideas and/or user feedback :: Kaushal Modi.
++ Ideas and/or user feedback :: Kaushal Modi, Ypot.
* GNU Free Documentation License
:PROPERTIES:
diff --git a/denote-dired.el b/denote-dired.el
index 3c5ca05b97..8628f5a1d2 100644
--- a/denote-dired.el
+++ b/denote-dired.el
@@ -88,18 +88,14 @@
(defun denote-dired--setup (&optional reverse)
"Setup `denote-dired--fontify' local hook.
If optional REVERSE is non-nil, remove the hook."
- (cond
- (reverse
- (setq dired-font-lock-keywords denote-dired-original-keywords))
- ((or (string-match-p (denote--directory) default-directory)
- (string-match-p (abbreviate-file-name denote-directory)
default-directory)
- (string-match-p denote-directory default-directory))
- (denote-dired--fontify)))
+ (if reverse
+ (setq dired-font-lock-keywords denote-dired-original-keywords)
+ (denote-dired--fontify))
(font-lock-refresh-defaults))
;;;###autoload
(define-minor-mode denote-dired-mode
- "Integrate denote with Dired."
+ "Fontify all Denote-style file names in Dired."
:global nil
:group 'denote-dired
(if denote-dired-mode
diff --git a/denote.el b/denote.el
index 83da40ce76..ab2ad8add8 100644
--- a/denote.el
+++ b/denote.el
@@ -112,7 +112,7 @@ specifiers."
"Regular expression to match `denote-keywords'.")
(defconst denote--file-regexp
- (concat denote--id-regexp denote--keyword-regexp "\\(.*\\)\\.org")
+ (concat denote--id-regexp denote--keyword-regexp "\\(.*\\)\\..*")
"Regular expression to match file names from `denote-new-note'.")
(defconst denote--punctuation-regexp "[][{}!@#$%^&*()_=+'\"?,.\|;:~`‘’“”]*"
- [elpa] externals/denote efd5135835 039/355: Improve linking functionality, (continued)
- [elpa] externals/denote efd5135835 039/355: Improve linking functionality, ELPA Syncer, 2022/06/26
- [elpa] externals/denote a34ca52fbf 040/355: Fix regression in M-x denote, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 3b62f8e167 043/355: Implement denote-link-clear-stale-backlinks, ELPA Syncer, 2022/06/26
- [elpa] externals/denote d57ff29c3b 045/355: Add denote--file-regexp, ELPA Syncer, 2022/06/26
- [elpa] externals/denote de00f939d3 048/355: Fix typo, ELPA Syncer, 2022/06/26
- [elpa] externals/denote bf342a1d39 057/355: Correct factual statement about command args, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 9bf10437e0 058/355: Add denote-front-matter-date-format user option, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 96eee4aeba 068/355: Change placement of findex keyword in the manual, ELPA Syncer, 2022/06/26
- [elpa] externals/denote d09b748c8d 063/355: Fix fontification; add denote-dired-directories, ELPA Syncer, 2022/06/26
- [elpa] externals/denote f8ea03abfb 067/355: Add documentation about renaming non-notes, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 431124fea1 060/355: Generalise dired fontification,
ELPA Syncer <=
- [elpa] externals/denote 147901f971 072/355: Rename 'denote--directory' to 'denote-directory', ELPA Syncer, 2022/06/26
- [elpa] externals/denote a5120e0e93 061/355: Enable optional EXTENSION in file name creation, ELPA Syncer, 2022/06/26
- [elpa] externals/denote a6303a6101 074/355: Update doc string of variable 'denote-directory', ELPA Syncer, 2022/06/26
- [elpa] externals/denote e2c49771f7 078/355: Placate the compiler about symbol disambiguation, ELPA Syncer, 2022/06/26
- [elpa] externals/denote e8c1e31dec 084/355: Expand gitignore, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 739d485600 079/355: Fix bug about missing point in link de-duplication, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 3df88a05d0 096/355: Make linking aware of file types (extends 299b897), ELPA Syncer, 2022/06/26
- [elpa] externals/denote e1bd4c9cb8 094/355: BREAKING Put keywords after the title, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 7366004e91 106/355: Fix markdown-toml front matter format, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 5fd4e97dad 105/355: Add support for markdown-toml, ELPA Syncer, 2022/06/26