[HN Gopher] Setting up Gmail in Doom Emacs using mbsync and mu4e ___________________________________________________________________ Setting up Gmail in Doom Emacs using mbsync and mu4e Author : erwald Score : 74 points Date : 2021-11-06 19:12 UTC (3 hours ago) (HTM) web link (www.erichgrunewald.com) (TXT) w3m dump (www.erichgrunewald.com) | User23 wrote: | > Wait, why did I do this again? ... in this case for example by | linking directly to email from org-mode files | | Org-mode. Capturing whatever into the appropriate note is | wonderful. These days about 80% of the time my answer to why | Emacs is org-mode. Not that there aren't other great note taking | options, but I've yet to find one that integrates so fully with, | well, everything. | | For all the doubters, I was right there with you 6 months ago. | Who cares about yet another markdown clone am I right? Perhaps | someone else can explain better, but in my case no amount of | explanation really helped, I didn't get it until I did it. | enchiridion wrote: | I am proficient with emacs, but I've never gotten to the point | where org-mode clicks. Any advice? | User23 wrote: | For me it was org-babel[1] that finally sucked me in. For | example, I keep notes of various shell invocations as source | blocks. Also various one-off SQL queries. Org-mode tables are | surprisingly powerful too. Basically, a lot of things that I | used to do occasionally are now contextualized and embedded | in my notes. | | [1] https://orgmode.org/worg/org-contrib/babel/intro.html | stragies wrote: | And If you name tables in org-mode, you can reference them | from shell with some simple functions, e.g. `fromOrg tsv | Network.org:[MAC-List]` | mickeyp wrote: | Taking notes is the simplest. I started with outline-mode | back in the day. Once you start taking notes you'll think: if | only I had a way of cataloguing, tagging and prioritising | tasks. Before long you'll start estimating tasks and creating | agendas; then you'll want to tie in other parts of your life | to your tasks and notes -- as nothing ever lives in a vacuum | -- and... well, there you go. That's how it goes. | | Create a .org file and start writing is really the simplest. | If you never make it past that, you still have an effective | note taking system in Emacs. | georgewsinger wrote: | Has anyone switched from Spacemacs to Doom Emacs? Are there | special advantages Doom offers that make this switch worthwhile? | fayten wrote: | I did, I used spacemacs for a few years, but switched to Doom | at the beginning of 2020. It is dramatically faster in start up | and usage. I also find the configuration a lot easier and | straightforward. I did the initial switch because Java LSP was | stalling out spacemacs constantly. | doyougnu wrote: | I can confirm a lot of what has already been said. I've used | spacemacs since 2017, have contributed to it, and have written | several private layers for it, such as a custom org layer. | | But I switch to Doom emacs literally two weeks ago and I'm | never going back. I find doom to be much faster not just | startup time but in general responsiveness (one major | exception: hitting SPC and waiting for key binding tips to show | seems to be much slower in doom than spacemacs). Other than | that I found doom to be much easier to configure and much more | configurable. | | The major selling point for me was that in doom emacs there is | much much less ceremony in wrapping a new package in a module, | and more importantly it is _easier_ to reuse documentation for | those packages because most packages provide configuration | examples using `use-package` anyway. My only hangup was less | documentation around writing custom modules which took me about | a day to figure out (I would advise to just read some of the | source code or mimic a module that doom ships with). | | YMMV, but if you feel like you've attained a certain level of | emacs maturity, I would 100% recommend trying it out. Be | prepared that some modules, like the haskell module, don't ship | with a lot of keybindings so you'll have to set those up | yourself. | Phenix88be wrote: | I tried, when Spacemacs was somehow broken on my system. I | didn't find anything better on Doom, and fixing Spacemacs was | easier than switching to Doom. Using Doom, most of your muscle | memory from Spacemacs is gone because not everything is | configured the same (that is of course normal). But not all, | and that make the experience weird to me. | | I also feel like Spacemacs is growing faster and has more | feature than Doom, because more dev's are working on Spacemacs. | But I might be wrong about that. | mbil wrote: | I switched. Doom starts much faster and feels generally | snappier and more minimal. I like the configuration system. I | use this Spacemacs module for Doom[0] to retain (most of) the | Spacemacs keybindings and some of the functionality. | | [0] https://github.com/chenyanming/spacemacs_module_for_doom | codethief wrote: | Has anyone here used both offlineimap and mbsync and can speak to | how these two compare? | k2enemy wrote: | I switched to mbsync from offlineimap about four years ago. I | was having issues with offlineimap hanging during sync, as well | as slow performance in general. | | I switched to mbsync and have had zero issues since. Just set | it and forget it. | bickwhale wrote: | I've been using Neomutt for some time now and I'm already | contemplating ditching it. Fewer emails these days are purely | text, viewing them brings me right back to the browser anyways. | Never got into the Org-Mode hype for Doom Emacs. I do love Magit | though, it remains the best git tool I've used to date, but the | pain of wrestling with some of my lsp plugins (Looking at ESS) | has made waste more time than anything. | upofadown wrote: | I have found that running the html email through w3m generates | usable text in almost all cases: text/html; | w3m -I %{charset} -T text/html; copiousoutput; | | ... in your .mailcap. The result is usually better than what | ends up in in the text portion of dual text/html emails. | Particularly nice when someone thinks they need html to show a | table. | pfortuny wrote: | mu4e is mail on steroids. If you need to automate anything you | can grok a small script in an afternoon (much less if you are | familiar with elisp) and have it work for you in ways no other | mail agent will. | | My need: write personalized exams for my (50-ish) students, | send an email for each with his respective exam, and upon | receiving the replies, save each attachment in its own | directory. | | Some perl+latex+mu4e+elisp ans voila. | | Edit: I refuse to use my Uni's version of moodle for long-reply | exams. Also using pdftools has changed my life. | rvdginste wrote: | I discovered Doom Emacs a couple of months ago and it made me use | emacs more often again. Doom Emacs is well made and makes | configuration of emacs a lot faster and easier. I've noticed that | a lot of file types have support from an LSP server and setting | that up is also easy. | | Long time ago, I used to read email using wanderlust on emacs. I | remember I really liked it, it was very powerfull in handling | email and it had really good imap (and offline) support. The only | drawback was related to handling html email. Back then that was | not that much of a problem because I used it for a lot of | mailinglists which were typically text only, and the remaining | email was often sent in both a text and a html version. | | Anyone using email in emacs and has a good solution to deal with | html email? Both receiving and sending? I kinda remember reading | about people writing email in markdown and have it converted to | html when sending it out. | tmalsburg2 wrote: | Mu4e can render HTML e-mails in Emacs (using Emacs' shr render | engine). Works well enough for most cases. When it doesn't, | there is a command for opening the message in your browser of | choice. Re sending HTML: I personally think it's a bad idea and | don't do it. But I think it's possible to write e-mails in org | mode markup and them have them automatically converted to HTML. | Probably easy to build something similar for Markdown, if it | doesn't exist yet. | jfmc wrote: | I'm very happy with mbsync and mu4e. The only drawback is that | email fetching+indexing can be very slow (10 to 30 seconds), | compared with the instantaneous gmail web interface. I'm not sure | if this is poor configuration on my side, or some other | bottlenecks (mbsync, mu indexing, IMAP protocol). | handstad wrote: | 10-30 seconds sounds very slow indeed. It used to be slow for | me (over 10 seconds against my university server), but I | discovered it was because I had not deleted emails and | propogated that to the server, I had only marked them for | deletion (d), not deleted (D), and so there was some kind of | syncing back and forth each time of quite many emails with | mbsync. For me now it is always under 5 seconds for syncing and | indexing, usually quicker. | contravariant wrote: | I'm not sure if the gmail interface is instantaneous or if it's | just using tricks to make it seem that way. | | I've regularly waited up to a minute for an email I've just | sent to arrive on someone else's account. A large part of this | delay seems to be for some weird undo feature they've added | which you can no longer fully disable. | taeric wrote: | Would be great if there was an option for those of us that have | enabled the "2-step verification" setting for our account. :( | eddieh wrote: | You might want to store application specific passwords in the | Keychain. | | Here is how to do it in .mbsyncrc | | https://gist.github.com/eddieh/8c853c6cf8ffb3ad87e0720eb50f8... | | And here is how to do it in .msmtprc | | https://gist.github.com/eddieh/5b4df4a8a98ea202e6ebb020871b0... | eddieh wrote: | And for Gmail specifically you might want to look at the mbsync | option PipelineDepth | | As noted in the .mbsyncrc gist: | | > _The value is "used to limit average bandwidth consumption | (GMail may require this if you have a very fast connection)." | Turns out the same is true for iCloud. There's probably some | optimized value greater than "1" that can be used, but this | works for me._ | | I actually have it set to 5 now. ___________________________________________________________________ (page generated 2021-11-06 23:00 UTC)