     (setq-local buffer-read-only nil)
     (erase-buffer)
     (let ((command (if olm-folder-id
-                       (concat "Olm.ls '" olm-folder-id "'")
+                       (format "Olm.ls %S" olm-folder-id)
                      "Olm.ls")))
       (olm-do-command command t))))
 

                     (olm-mail-item-entry-id-at))))
    (with-current-buffer mbuf
      (setq-local buffer-file-coding-system 'utf-8-dos))
    (olm-do-command (concat "Olm.message '" entry-id "'") mbuf)
    (with-current-buffer mbuf
      (olm-message-mode)
      (goto-char (point-min)))

  ()
  (interactive)
  (let ((n (line-number-at-pos)))
    (olm-do-command (format "Olm.toggle_task_flag" (olm-mail-item-entry-id-at)))
    (olm-scan)
    (goto-line n)))

