iens

Manager of links to read
git clone https://git.instinctive.eu/iens.git
Log | Files | Refs | README | LICENSE

commit 480c1cd8d3f8179876d8105888397d399132c013
parent 0d06d77c2517a7bf699272380d03ddc1e3c82dda
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Thu, 15 Feb 2024 19:13:48 +0000

Command `without-mtime!`
Diffstat:
Msrc/iens.scm | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/iens.scm b/src/iens.scm @@ -655,6 +655,24 @@ (else (touch* (car args) (cadr args))))) +(define (without-mtime* entry-id proc) + (let ((prev-entry cur-entry) + (prev-mtime (query fetch-value + (sql db "SELECT mtime FROM entry WHERE id=?;") + entry-id))) + (set! cur-entry entry-id) + (eval proc) + (touch* prev-mtime entry-id) + (set! cur-entry prev-entry))) + +(defcmd (without-mtime! first . args) + "[entry-id] '(...)" "Perform updates and restore entry mtime" + (cond ((null? args) + (without-mtime* cur-entry first)) + ((and (null? (cdr args)) (integer? first)) + (without-mtime* first (car args))) + (else (assert #f "Invalid arguments " (cons first args))))) + ;; Entry Tagging (define (print-tags* entry-id)