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

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

[elpa] externals/dired-duplicates 0d71465d6a 13/57: Make the use of the


From: ELPA Syncer
Subject: [elpa] externals/dired-duplicates 0d71465d6a 13/57: Make the use of the dummy separator file optional
Date: Sat, 4 Nov 2023 06:58:26 -0400 (EDT)

branch: externals/dired-duplicates
commit 0d71465d6a980b338587d19e1c4a45f8046a3e73
Author: Harald Judt <h.judt@gmx.at>
Commit: Harald Judt <h.judt@gmx.at>

    Make the use of the dummy separator file optional
---
 find-dupes-dired.el | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/find-dupes-dired.el b/find-dupes-dired.el
index 377bd34b16..c0109a3c27 100644
--- a/find-dupes-dired.el
+++ b/find-dupes-dired.el
@@ -1,3 +1,10 @@
+(defcustom find-dupes-use-separator-file
+  t
+  "Whether to use a separator dummy file or not."
+  :group 'find-dupes-dired
+  :tag "Use separator dummy file"
+  :type 'boolean)
+
 (defcustom find-dupes-separator-file
   (concat "/tmp/-" (make-string 40 ?-))
   "Path and name of the separator file used for making search
@@ -5,7 +12,7 @@ results easier to discern. It will be created immediately 
before
 and deleted as soon as possible after the search operation
 finishes."
   :group 'find-dupes-dired
-  :tag "Dummy separator file"
+  :tag "Separator dummy file"
   :type 'string)
 
 (defcustom find-dupes-checksum-exec
@@ -53,9 +60,11 @@ ascending or descending order."
 (defmacro find-dupes-with-separator-file (&rest rest)
   `(unwind-protect
          (progn
-           (find-dupes--ensure-separator-file)
+           (when find-dupes-use-separator-file
+             (find-dupes--ensure-separator-file))
            ,@rest)
-     (find-dupes--remove-separator-file)))
+     (when find-dupes-use-separator-file
+       (find-dupes--remove-separator-file))))
 
 (defun find-dupes--duplicate-files (directories)
   "Given one or more root directories, search inside below the
@@ -99,7 +108,7 @@ separator file specified by `find-dupes-separator-file'."
                                :key #'second)
            for (checksum) in sorted-sums
            append (rest (gethash checksum dupes-table))
-           append (list find-dupes-separator-file)))
+           when find-dupes-use-separator-file append (list 
find-dupes-separator-file)))
 
 (defun find-dupes-revert-function (&optional arg noconfirm)
   "Revert function used instead of `dired-revert' for dired buffers generated 
by find-dupes."



reply via email to

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