reddit / emacs
Emacs Email setup that doesn't involve full Email sync
Thaodan · 2022-10-23 00:42
Hey,
I've recently moved my calendar need to org-mode with org-caldav after using Emacs for years for programming, writing and chatting.
Now I wonder how/if I should do the same for Email..
My current setup involves Kontact for IMAP and EWS.
All the setups I've seen so far do download/sync all Emails from the IMAP server. Is it possible only download the headers and then the full emails on demand? My current setup is that I keep my Emails on the IMAP server and fetch only what I want to read.
Akonadi does this quite good.
BluePinkElephant · 2022-10-23 04:09
You can do this with a pretty normal nnimap setup with gnus.
Personally, if I were going to set up from scratch today, I'd have gone the notmuch route and having a local copy everywhere. It'll be faster and disk space is cheap, but I use nnimap with gnus and it works fine too.
aard_fi · 2022-10-23 11:23
The reason for doing a full sync typically isn't because you have to, but because it's significantly faster in many cases, and - in case you're setting it up on a portable device - also gives you offline email for when you don't have internet connectivity.
If you don't care about offline functionality, or are fine with the limited functionality provided by the various mailreaders, and have a proper connection and a proper IMAP server¹ just set it up against whatever remote server you have.
¹ Exchange is particularly broken, and regularly decides to randomly assign now UUIDs to all mails, which isn't quite ideal. The best way to deal with exchange IMAP is to just sync the Exchange inbox to a local IMAP folder, deleting it on Exchange.
Thaodan · 2022-10-23 12:03
>The reason for doing a full sync typically isn't because you have to, but because it's significantly faster in many cases, and - in case you're setting it up on a portable device - also gives you offline email for when you don't have internet connectivity.
I get that point but I want to be able to sync certain folders only on demand.
I have proper IMAP server set up my self and have to use Exchange only for work.
jjgarciaripoll · 2022-10-23 12:37
Gnus with IMAP only downloads headers, not a full synchronization. When opening an email you can also choose to download the main body or the full email. Folders that are not opened are not downloaded at all.
This said, if you have all emails (or a significant fraction) in a common folder, it can be pretty slow to download all headers every time, as Gnus does not seem to cache this information between sessions.
nonhok · 2022-10-23 13:04
I have gone the way to setup notmuch with mbsync/isync and afew for filtering the email. I'd like to have every email on my work machine. The searching with notmuch is so fast (although I have all company emails since 2004 available), it is really unbelievalbe compared to ms outlook.
With this setup I can easily link my incoming emails, which need to be worked on to the inbox of my org-mode setup and move them to the right projects they belong to. I do send emails by smtp, so I don't have to use any other emails programs. I leave the emails at the imap account, as for mobile my company has a blackberry serivce, so I can read new emails, if I am on a business travel. For me it's the best way ever.
The only thing, which works not so quite nice is the appointments thing. I used a notmuch-calendar-x.el published on the net, which I modified a little bit, to add appointments to a special org file ([meetings.org](https://meetings.org)). So I am able to capture the appointments. Unfortunately the response to appointment does not work with this solution. Also the automatic inclusion as appointments, as it is done in Microsoft Outlook program, does not work. I introduced a tag for appointments (added by afew), so that I can easily see all new appointments and add them to the [meeting.org](https://meeting.org) file, which show up in my agenda.
I think I read somewhere that gnus can work with appointments, but gnus is not for me.
deaddyfreddy · 2022-10-23 14:19
I used Wanderlust for this
Thaodan · 2022-10-23 19:23
Is Wanderlust async?
Thaodan · 2022-10-23 19:24
oh that sounds bad. If I read correctly it is also not async or it?
jjgarciaripoll · 2022-10-24 18:07
AFAK folder download is a synchronous process, at least on my Windows computer with Emacs 28.2. I have email organized by topics and in the case of work by years, so 10k emails take about 1 or 2 seconds. Not that much.
simbledress · 2022-10-29 12:00
> Gnus does not seem to cache this information between sessions
Actually it can, if you simply enable the agent. See [this thread](https://lists.gnu.org/archive/html/help-gnu-emacs/2020-09/msg00099.html).
jjgarciaripoll · 2022-10-31 09:08
I had never been able to configure the agent properly. The manual is overly verbose without examples. In my init-file I have
```
(gnus-agent t)
(gnus-agent-consider-all-articles t)
(gnus-agent-mark-unread-after-downloaded nil)
(gnus-cache-enter-articles '(ticked dormant unread read))
(gnus-cache-remove-articles nil)
(gnus-cacheable-groups "^nnimap")
```
but still the agent refuses to download the groups I ask it to with a message "Group **** isn't covered by the agent"
Edit: today I discovered one has to manually enter the server menu and add a server explicitly to the agent with `J a`.