diff options
author | Arun Isaac | 2020-08-03 02:01:34 +0530 |
---|---|---|
committer | Arun Isaac | 2020-08-03 02:06:16 +0530 |
commit | ad903fd96c582388a2cd6212c78c5c1a84fe0055 (patch) | |
tree | 90eaef0801e7bd64c161dc58972a21a40da61aa7 /ennum.el | |
parent | ccd01d1aee5cf5093e4237399a61a24ca3d4b0f9 (diff) | |
download | ennum-ad903fd96c582388a2cd6212c78c5c1a84fe0055.tar.gz ennum-ad903fd96c582388a2cd6212c78c5c1a84fe0055.tar.lz ennum-ad903fd96c582388a2cd6212c78c5c1a84fe0055.zip |
Print better log messages.
* ennum.el (ennum-intern, ennum-publish-feed, ennum-publish-image,
ennum-copy): Print log messages.
(ennum-eval): Do not print "skipping build" messages. It is too
verbose.
Diffstat (limited to 'ennum.el')
-rw-r--r-- | ennum.el | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -25,7 +25,8 @@ (interned-path (expand-file-name (file-name-nondirectory filename) store-item))) (unless (file-exists-p store-item) - (ennum-copy filename interned-path) + (message "Interning %s in %s" filename store-item) + (ennum-copy filename interned-path t) (ennum--set-file-modes-recursively store-item #o555 #o444 #o555)) interned-path)) @@ -79,8 +80,7 @@ respectively by - and _, and the pad character = is optional." ;; Create store if it doesn't exist (ennum-mkdir-p (ennum-setting :store)) ;; Create store item if it doesn't already exist - (if (file-exists-p output) - (message "Skipping build of %s" output) + (unless (file-exists-p output) (message "Building %s" output) (ennum-with-temporary-directory temporary-directory (ennum-with-current-directory temporary-directory @@ -448,6 +448,7 @@ result as a string." (ennum-intern (ennum-post-filename post))) posts))) (ennum-exp + (message "Writing %s" feed-file) ;; TODO: Create ennu-mkdir-p-for-file (when (file-name-directory feed-file) (ennum-mkdir-p (file-name-directory feed-file))) @@ -526,6 +527,7 @@ result as a string." (defun ennum-publish-image (image width) (let ((interned-image (ennum-intern image))) (ennum-exp + (message "Resizing %s to width %s" image width) (ennum-mkdir-p (ennum-setting :images-directory)) (ennum-image-optimize-image (ennum-image-resize-image @@ -551,9 +553,11 @@ result as a string." (defun ennum-mkdir-p (directory) (make-directory directory t)) -(defun ennum-copy (source destination) +(defun ennum-copy (source destination &optional quiet) "Copy file or directory from SOURCE to DESTINATION. Overwrite if DESTINATION already exists." + (unless quiet + (message "Copying %s to %s" source destination)) (if (file-directory-p source) (copy-directory source destination) (when (file-name-directory destination) |