The `dired-mark-if’ `macro` also marks special lines (such as those specifying a directory path), so let’s exclude such lines:
(dired-mark-if (let ((current-filename (dired-get-filename t t)))
(and current-filename
(time-less-p cutoff (file-attribute-modification-time (file-attributes current-filename)))
(not (looking-at-p dired-re-dot))))
msg)
– Anonymous 2026-05-20 14:37 UTC