gnus-notifications: add actions support
[gnus] / lisp / nnmaildir.el
index 65f3341..7139a52 100644 (file)
@@ -1381,7 +1381,8 @@ by nnmaildir-request-article.")
        (error
         (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil
                           'excl)
-        (unix-sync))) ;; no fsync :(
+        (when (fboundp 'unix-sync)
+          (unix-sync)))) ;; no fsync :(
       (nnheader-cancel-timer 24h)
       (condition-case err
          (add-name-to-file tmpfile curfile)
@@ -1460,7 +1461,7 @@ by nnmaildir-request-article.")
        (if (eq time 'immediate)
            (setq time 0)
          (if (numberp time)
-             (setq time (* time 86400)))))
+             (setq time (round (* time 86400))))))
       (when no-force
        (unless (integerp time) ;; handle 'never
          (throw 'return (gnus-uncompress-range ranges)))
@@ -1559,7 +1560,7 @@ by nnmaildir-request-article.")
                  (t (signal (car err) (cdr err))))))
             todo-marks))
          set-action (lambda (article)
-                      (funcall add-action)
+                      (funcall add-action article)
                       (mapcar (lambda (mark)
                                 (unless (memq mark todo-marks)
                                   (funcall del-mark mark)))