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

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

[elpa] externals/greader 6a44d22a7b 1/2: greader-audiobook.el: now infor


From: ELPA Syncer
Subject: [elpa] externals/greader 6a44d22a7b 1/2: greader-audiobook.el: now informs the user when removing an audiobook, as it can take some time.
Date: Fri, 12 Jul 2024 21:58:18 -0400 (EDT)

branch: externals/greader
commit 6a44d22a7b09a8497d6910bcfd4146d8af916f8b
Author: Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com>
Commit: Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com>

    greader-audiobook.el: now informs the user when removing an audiobook, as 
it can take some time.
---
 greader-audiobook.el | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/greader-audiobook.el b/greader-audiobook.el
index cbbe399391..8a46121dd4 100644
--- a/greader-audiobook.el
+++ b/greader-audiobook.el
@@ -108,9 +108,13 @@ this variable will be ignored to honor the mode specified 
in
 
 (defcustom greader-audiobook-modes '((ereader-mode . "\\W*"))
   "Different treatment of block based on the current major mode.
-Instead of numerical block size, use a string to determine the end of
-each block."
-  :type '(alist :key-type (symbol :tag "mode") :value-type (string)))
+Instead of numerical block size, use a string or function to determine the end
+of each block.
+If you specify a function, that function has to return a cons in which
+car represents the start of the block, and cdr represents the end,
+or nil if there are no more blocks to convert."
+  :type '(alist :key-type (symbol :tag "mode") :value-type (choice
+  (string  function))))
 
 (defcustom greader-audiobook-transcode-wave-files nil
   "If enabled,  transcode original wave files using `ffmpeg'."
@@ -417,9 +421,12 @@ buffer without the extension, if any."
     (let ((response (yes-or-no-p "This audiobook already
   exists.  Overwrite it?")))
       (if response
-         (delete-directory (concat greader-audiobook-base-directory
-                                   (file-name-sans-extension (buffer-name)))
-                           t t)
+         (progn
+           (unless greader-audiobook-buffer-quietly
+             (message "removing old audiobook..."))
+           (delete-directory (concat greader-audiobook-base-directory
+                                     (file-name-sans-extension (buffer-name)))
+                             t t))
        (user-error "Audiobook creation aborted by user"))))
   (unless greader-audiobook-buffer-quietly
     (message "Preparing for conversion (this could take some time...)"))



reply via email to

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