{"action":"created","issue":{"url":"https://api.github.com/repos/neomutt/neomutt/issues/191","repository_url":"https://api.github.com/repos/neomutt/neomutt","labels_url":"https://api.github.com/repos/neomutt/neomutt/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/neomutt/neomutt/issues/191/comments","events_url":"https://api.github.com/repos/neomutt/neomutt/issues/191/events","html_url":"https://github.com/neomutt/neomutt/issues/191","id":182028875,"number":191,"title":"Quick way to skip sending empty mail","user":{"login":"kdave","id":1729844,"avatar_url":"https://avatars.githubusercontent.com/u/1729844?v=3","gravatar_id":"","url":"https://api.github.com/users/kdave","html_url":"https://github.com/kdave","followers_url":"https://api.github.com/users/kdave/followers","following_url":"https://api.github.com/users/kdave/following{/other_user}","gists_url":"https://api.github.com/users/kdave/gists{/gist_id}","starred_url":"https://api.github.com/users/kdave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdave/subscriptions","organizations_url":"https://api.github.com/users/kdave/orgs","repos_url":"https://api.github.com/users/kdave/repos","events_url":"https://api.github.com/users/kdave/events{/privacy}","received_events_url":"https://api.github.com/users/kdave/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neomutt/neomutt/labels/discussion","name":"discussion","color":"9f00bf"},{"url":"https://api.github.com/repos/neomutt/neomutt/labels/enhancement","name":"enhancement","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-10T14:27:41Z","updated_at":"2016-10-10T14:38:49Z","closed_at":null,"body":"Say I don't want to send a mail, then I can exit the editor, press 'q' in the compose screen, confirm that I don't want to postpone the mail and go back to index.\r\n\r\nDesired behaviour: let composer check if the text of the mail is empty and then skip asking, ie. go directly to index. The test could be simple, empty file (or just whitespace), or parse the file and look if body is empty.\r\n\r\nA non working attempt (send.c::ci_send_message):\r\n```\r\n\r\n     fcc_error = 0; /* reset value since we may have failed before */\r\n     mutt_pretty_mailbox (fcc, sizeof (fcc));\r\n+    if (msg->lines == 0) {\r\n+      /* abort */\r\n+      mutt_message _(\"Mail empty, sending aborted.\");\r\n+      goto cleanup;\r\n+    }\r\n     i = mutt_compose_menu (msg, fcc, sizeof (fcc), cur);\r\n     if (i == -1)\r\n     {\r\n```"},"comment":{"url":"https://api.github.com/repos/neomutt/neomutt/issues/comments/252640656","html_url":"https://github.com/neomutt/neomutt/issues/191#issuecomment-252640656","issue_url":"https://api.github.com/repos/neomutt/neomutt/issues/191","id":252640656,"user":{"login":"4nd3r","id":7166727,"avatar_url":"https://avatars.githubusercontent.com/u/7166727?v=3","gravatar_id":"","url":"https://api.github.com/users/4nd3r","html_url":"https://github.com/4nd3r","followers_url":"https://api.github.com/users/4nd3r/followers","following_url":"https://api.github.com/users/4nd3r/following{/other_user}","gists_url":"https://api.github.com/users/4nd3r/gists{/gist_id}","starred_url":"https://api.github.com/users/4nd3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4nd3r/subscriptions","organizations_url":"https://api.github.com/users/4nd3r/orgs","repos_url":"https://api.github.com/users/4nd3r/repos","events_url":"https://api.github.com/users/4nd3r/events{/privacy}","received_events_url":"https://api.github.com/users/4nd3r/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T14:38:49Z","updated_at":"2016-10-10T14:38:49Z","body":"I often use templates (Esc e), but sometimes change my mind and cancel sending.\r\nand with template, message is not empty. can we detect it somehow?"}}
{"actor":{"display_login":"4nd3r"}}