Change: (ement-room-compose-org) Improve error message

This commit is contained in:
Adam Porter 2021-08-11 23:41:06 -05:00
parent 6e0cb47a0c
commit 0f3693903d

View file

@ -2448,7 +2448,8 @@ Then invalidate EVENT's node to show the image."
Configures the buffer appropriately so that saving it will export Configures the buffer appropriately so that saving it will export
the Org buffer's contents." the Org buffer's contents."
(interactive) (interactive)
(cl-assert ement-room-compose-buffer) (unless ement-room-compose-buffer
(user-error "This command should be run in a compose buffer. Use `ement-room-compose-message' first"))
;; Calling `org-mode' seems to wipe out local variables. ;; Calling `org-mode' seems to wipe out local variables.
(let ((room ement-room) (let ((room ement-room)
(session ement-session)) (session ement-session))