emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote-menu 210396d6d2: removed seq-positions call, im


From: ELPA Syncer
Subject: [elpa] externals/denote-menu 210396d6d2: removed seq-positions call, improved the README
Date: Sat, 25 Mar 2023 08:57:37 -0400 (EDT)

branch: externals/denote-menu
commit 210396d6d2a8324abef9b30cba478e08c83decfc
Author: Mohamed Suliman <sulimanm@tcd.ie>
Commit: Mohamed Suliman <sulimanm@tcd.ie>

    removed seq-positions call, improved the README
    
    Removed the call to seq-positions so that the package works with at
    least emacs 28.1. Also added elpa badges and the screenshot to the README
---
 README.org     | 5 +++++
 denote-menu.el | 8 +-------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/README.org b/README.org
index 2c72383e14..43bdd66659 100644
--- a/README.org
+++ b/README.org
@@ -4,6 +4,8 @@
 #+language: en
 #+options: ':t toc:nil author:t email:t num:t
 
+#+html: <a href="http://elpa.gnu.org/packages/denote-menu.html";><img alt="GNU 
ELPA" src="https://elpa.gnu.org/packages/denote-menu.svg"/></a>
+
 * Overview
 =denote-menu= provides an interface for viewing your denote files that
 goes beyond using the standard =dired= emacs command to view your
@@ -33,6 +35,9 @@ with dired by providing the =denote-menu-export-to-dired= 
command,
 which allows for further action on denote files beyond just viewing and
 filtering them.
 
+#+attr_html: :width 750px
+[[file:screenshots/screenshot.png]]
+
 * Installation
 =denote-menu= is available on the GNU ELPA package archive. To install,
 simply run
diff --git a/denote-menu.el b/denote-menu.el
index 16b51bc23b..5c551a7233 100644
--- a/denote-menu.el
+++ b/denote-menu.el
@@ -145,15 +145,9 @@ the defined form. Then updates the buffer."
   "Return absolute path of denote file with ID timestamp and
 FILE-TYPE in `denote-directory-files'."
   (let* ((files (denote-directory-files))
-         (file-id-positions (seq-positions files nil
-                                           (lambda (f elt)
-                                             (and (string-prefix-p id 
(file-name-nondirectory f))))))
-         (matching-files-with-id (seq-map (lambda (n) (nth n files)) 
file-id-positions)))
-    
+         (matching-files-with-id (seq-filter (lambda (f) (and (string-prefix-p 
id (file-name-nondirectory f)))) files)))
     (car (seq-filter (lambda (f) (string-match-p (concat "\\." file-type) f)) 
matching-files-with-id))))
 
-
-
 (defun denote-menu-files-matching-regexp (files regexp)
   "Return list of files matching REGEXP from FILES."
   (seq-filter (lambda (f) (string-match-p regexp f)) files))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]