0

I'm trying to write a function that will open all emails listed in a buffer created with a tree search in notmuch. It's meant to go over every line, get message id of an email and then open it with the notmuch-show function. The idea is that then you would be able to do a full-text search with multi-occur.

(defun test-test ()
 (interactive)
 (goto-char (point-min))
            (while (not (eobp))
                 (let ((id (notmuch-tree-get-message-id)))
                       (notmuch-show id))
              (forward-line 1))
 )

results in error Wrong type argument: stringp

If there is any better way to do it, please let me know.

1 Answers1

0

I've tweaked it slightly and now it works:

(defun notmuch-tree-show-message-all ()
 (interactive)
 (goto-char (point-min))
            (while (and (not (eobp)))
              (notmuch-tree-show-message-out)
              (previous-buffer)
              (forward-line 1)))

In the meantime I came across recoll, which is an amazing project for doing full-text searches that go way beyond just email.