                      (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)
+    (olm-do-command (format "Olm.message %S" entry-id) mbuf)
     (with-current-buffer mbuf
       (olm-message-mode)
       (goto-char (point-min)))

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


  ()
  (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)))

