{"action":"created","issue":{"url":"https://api.github.com/repos/djcb/mu/issues/829","repository_url":"https://api.github.com/repos/djcb/mu","labels_url":"https://api.github.com/repos/djcb/mu/issues/829/labels{/name}","comments_url":"https://api.github.com/repos/djcb/mu/issues/829/comments","events_url":"https://api.github.com/repos/djcb/mu/issues/829/events","html_url":"https://github.com/djcb/mu/issues/829","id":146785706,"node_id":"MDU6SXNzdWUxNDY3ODU3MDY=","number":829,"title":"Using mbsync -a always fails in Emacs. mu4e-get-mail-command","user":{"login":"jojojames","id":1227856,"node_id":"MDQ6VXNlcjEyMjc4NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1227856?v=4","gravatar_id":"","url":"https://api.github.com/users/jojojames","html_url":"https://github.com/jojojames","followers_url":"https://api.github.com/users/jojojames/followers","following_url":"https://api.github.com/users/jojojames/following{/other_user}","gists_url":"https://api.github.com/users/jojojames/gists{/gist_id}","starred_url":"https://api.github.com/users/jojojames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojojames/subscriptions","organizations_url":"https://api.github.com/users/jojojames/orgs","repos_url":"https://api.github.com/users/jojojames/repos","events_url":"https://api.github.com/users/jojojames/events{/privacy}","received_events_url":"https://api.github.com/users/jojojames/received_events","type":"User","site_admin":false},"labels":[{"id":284306435,"node_id":"MDU6TGFiZWwyODQzMDY0MzU=","url":"https://api.github.com/repos/djcb/mu/labels/needinfo","name":"needinfo","color":"c7def8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-04-08T01:22:49Z","updated_at":"2019-08-26T13:02:32Z","closed_at":"2016-07-24T11:20:54Z","author_association":"NONE","body":"## Expected or desired behavior\n\nWhen fetching new mail (by setting variable mu4e-get-mail-command) with \"mbsync -a\", fetching should update mail properly (updated inbox, etc).\n## Actual behavior\n\nWhen fetching new mail (by setting variable mu4e-get-mail-command) with \"mbsync -a\", fetching always returns with non zero value. Inbox is not updated. Running $ mbsync -a in command line works as expected.\n## Steps to reproduce\n\n(setq mu4e-get-mail-command \"mbsync -a\")\n\nLet the mail refresh/request run and it should return with non zero value. (as well as not retrieve any new mail)\n## Versions of mu, mu4e/emacs, operating system etc.\n\n± mu --version\nmu (mail indexer/searcher) version 0.9.16\nCopyright (C) 2008-2015 Dirk-Jan C. Binnema\nLicense GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n± emacs --version\nGNU Emacs 24.5.1\nCopyright (C) 2015 Free Software Foundation, Inc.\nGNU Emacs comes with ABSOLUTELY NO WARRANTY.\nYou may redistribute copies of Emacs\nunder the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n\n± mbsync --version\nisync 1.2.1\n\n± zsh --version\nzsh 5.0.8 (x86_64-apple-darwin15.0)\n\nOSX El Captain\nVersion 10.11.2\n## Any other detail\n\nI believe the actual command emacs is running is \"/bin/zsh -c mbsync -a\".\n\nIf I try this command in the terminal, it returns an error.\n\n± zsh -c mbsync -a\nNo channel specified. Try 'mbsync -h'\n\nWrapping the 'mbsync -a' part in quotes is successful however.\n\n± zsh -c \"mbsync -a\"\nC: 3/3  B: 3/3  M: +0/0 *0/0 #0/0  S: +2/2 *0/0 #0/0\n\nSo the -a must be getting chopped off/ignored somehow.\n"},"comment":{"url":"https://api.github.com/repos/djcb/mu/issues/comments/524851533","html_url":"https://github.com/djcb/mu/issues/829#issuecomment-524851533","issue_url":"https://api.github.com/repos/djcb/mu/issues/829","id":524851533,"node_id":"MDEyOklzc3VlQ29tbWVudDUyNDg1MTUzMw==","user":{"login":"blandinw","id":413070,"node_id":"MDQ6VXNlcjQxMzA3MA==","avatar_url":"https://avatars1.githubusercontent.com/u/413070?v=4","gravatar_id":"","url":"https://api.github.com/users/blandinw","html_url":"https://github.com/blandinw","followers_url":"https://api.github.com/users/blandinw/followers","following_url":"https://api.github.com/users/blandinw/following{/other_user}","gists_url":"https://api.github.com/users/blandinw/gists{/gist_id}","starred_url":"https://api.github.com/users/blandinw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blandinw/subscriptions","organizations_url":"https://api.github.com/users/blandinw/orgs","repos_url":"https://api.github.com/users/blandinw/repos","events_url":"https://api.github.com/users/blandinw/events{/privacy}","received_events_url":"https://api.github.com/users/blandinw/received_events","type":"User","site_admin":false},"created_at":"2019-08-26T13:02:32Z","updated_at":"2019-08-26T13:02:32Z","author_association":"NONE","body":"For posterity, you need to [tell the pinentry program to interface w/ emacs](https://github.com/gpg/pinentry/blob/779b8e6df7d2678d40bc61ba9e9ff35324a40d03/pinentry/pinentry-emacs.h#L31), like epa/epg does.\r\n\r\nYou can configure emacs and gpg-agent as follows:\r\n```\r\n;; in init.el\r\n(package-install 'pinentry)\r\n(setq mu4e-get-mail-command (format \"INSIDE_EMACS=%s mbsync -a\" emacs-version)\r\n      epa-pinentry-mode 'ask)\r\n(pinentry-start)\r\n\r\n;; in ~/.gnupg/gpg-agent.conf\r\nallow-emacs-pinentry\r\n```"}}
{"actor":{"display_login":"blandinw"}}