David Bremner <david@tethera.net> writes: > +(defun notmuch-tag-undo () > + (interactive) > + (when (null notmuch-tag-history) > + (error "no further notmuch undo information")) > + (let* ((action (pop notmuch-tag-history)) > + (from (plist-get action :from)) > + (to (plist-get action :to)) > + (changes (notmuch-tag-change-list (plist-get action :tag-changes) t)) > + (query (format "lastmod:%d..%d" from to))) > + (when (<= from to) > + (notmuch-tag query changes t)))) I got pretty far down this path before I realized there is a fundamantal flaw with using lastmod info for undo. With some extra work, we can only manage one level of undo, since the undo operation itself invalidates the queries in the undo history. So now I don't really know the best approach. d _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org