4 Commits 85a9235f99 ... 0e98e7b9a2

Auteur SHA1 Bericht Datum
  contrapunctus 0e98e7b9a2 Merge branch 'dev' 5 jaren geleden
  contrapunctus 69b62d23a1 Update changelog 5 jaren geleden
  contrapunctus ad752ca78c package-lint fixes 5 jaren geleden
  contrapunctus 76f63afd54 Add support for excluding files 5 jaren geleden
2 gewijzigde bestanden met toevoegingen van 14 en 4 verwijderingen
  1. 2 1
      CHANGELOG.md
  2. 12 3
      sxiv.el

+ 2 - 1
CHANGELOG.md

@@ -4,10 +4,11 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
-## Unreleased
+## [0.2.0] - 2020-01-13
 ### Added
 * `sxiv-arguments` to hold argument list
 ### Fixed
 * Slow startup/freezing on large directories
+* `package-lint` fixes
 
 ## [0.1.0] - 2020-01-12

+ 12 - 3
sxiv.el

@@ -2,7 +2,9 @@
 
 ;; Author: contrapunctus <xmpp:contrapunctus@jabber.fr>
 ;; Maintainer: contrapunctus <xmpp:contrapunctus@jabber.fr>
-;; Package-Requires: (dash (emacs "25.1"))
+;; Keywords: multimedia
+;; Homepage: https://notabug.org/contrapunctus/sxiv.el/src/master/sxiv.el
+;; Package-Requires: ((dash "2.16.0") (emacs "25.1"))
 ;; Version: 0.1.0
 
 ;;; Commentary:
@@ -14,13 +16,17 @@
 
 (defgroup sxiv nil
   "Run the Simple X Image Viewer."
-  :group 'external)
+  :group 'multimedia)
 
 (defcustom sxiv-arguments '("-a" "-f" "-o")
   "Arguments to be passed to the sxiv process.
 It must contain \"-o\" for marking in Dired buffers to function."
   :type '(repeat string))
 
+(defcustom sxiv-exclude-strings '()
+  "Exclude files whose paths match these strings."
+  :type '(repeat string))
+
 (defvar sxiv--directory nil
   "Directory `sxiv' was called from.
 Used by `sxiv-filter' to know where to mark files.")
@@ -78,7 +84,10 @@ the files listed."
                               (split-string it "\n")))
                         (t (directory-files default-directory))))
          (paths   (--remove (or (equal it ".")
-                                (equal it ".."))
+                                (equal it "..")
+                                (-find (lambda (exclude)
+                                         (string-match-p exclude it))
+                                       sxiv-exclude-strings))
                             paths))
          ;; recurse with prefix arg, or if every path is a directory
          (recurse (or prefix