new email folder ideas:
- defer
- day
- week
- month
- treasure_chest -> fun
- later
- someday/mb
- delegate
- awaiting response
- important
- urgent
- ref
- project
- task
- A,B,C
- 1,2,3
- flag
- star
- asap
- do
- todo
- toread
- fyi
- backlog/archived/mbox bankruptcy/mbox2
- this system sounds good: act wait idea archive proj https://www.muo.com/tag/folders-inbox-zero-email/
what is the problem i'm trying to solve?
- when busy, need to more quickly go thru INBOX and mbox and isolate those emails that can wait from those that i need to read ASAP
- currently inbox and mbox have a lot of 'i know this isn't important but i do want to take 30 secs to glance at it before i delete/archive it'
- currently mbox has a mixture of important/urgent, important and not urgent, unimportant and urgent, and unimportant stuff
- currently mbox has a mixture of todos and stuff kept for reference
- important but not urgent is an important category: these are things that i do need to do but that can be put off. These shouldn't be cluttering stuff up and making me miss important urgent stuff, but neither should they get missed because archived away with unimportant stuff
- want almost nothing old and unimportant in inbox, even when busy
thoughts:
- we have mutt's 'important' flag to work with, too
- don't want so many folders that we can't reach them by single keys
- want a new key to flag important messages without shift-F
- tbh i probably will never look at most folders so don't want too many b/c stuff will get lost
- too many folders makes updating take too long
- the current behavior of archiving into a folder named by from-address is fine
- we can still use inbox and mbox
- do i need a 'ref' folder for temporary reference items? maybe not, there aren't so many of those so maybe they can stay in inbox
- should consider todo status folders, too?
- do i need a 'wait' folder? Can that be combined with 'ref'? i think so
- don't i already have an 'mbox2' folder that i never use?
- i also have the unused 'labels' functionality (editlabel eg. bound to A)
- interesting parallel with the todo list stuff: two ways of categorizing things: move it to a separate file, or prioritize it within the same file
- first impulse: need different files for: (a) different projects, (b) to prevent things from getting too cluttered (so remove the 'later' stuff, at the least). But hard to have discipline to look at lots of files. For important stuff, better to keep in one file, and use priorities to not miss the most important stuff.
- interesting parallel with the todo list stuff: some reasons to have less fine-grained 'real' categories and therefore to have labels instead of finer-grained subcategories
- in theory, emails are never todos, but in fact, many email-based todos are too unimportant or short-lived to be worth manually creating todos for, so the emails are todos after all
- similarly, it's often not worth it to manually sort out personal/work email (unless needed for some other reason)
- consider if maybe the system is fine as-is and i'm just not using enough discipline; perhaps if i went through my email more often i wouldn't need any more folders?
- note two axes: 'important'/flagged; and labels
- what are the current colors?
- what are the current keys? which keys are free?
- what are the autosort folders in gmail (and outlook?)
- gmail: important and unread, starred, and everything else; primary, social, promotions, forums, and updates ; bulk, notifications, forums
- many of the proposals down below have a nice mapping to my todo thoughts:
- later-backlog folder / later folder
- wait-ref-delegated folder/ wait/dg status
- inbox / todo.txt (and new status)
- mbox / main todo lists
- important flag - !! tags / priorities
- fun / zzz
- the idea that we have both folders, and priorities
proposal:
- remap F key
- treasure_chest -> "fun"
- put unfun but unimportant, unurgent stuff in with 'fun'
- create a folder for important but not urgent
- mbox is then for somewhat important and urgent; the 'important' flag can then highlight the highest priority items. Even higher priority stuff can live in inbox
- create 'wait' folder (this also serves as:ref, awaiting reply, weekly review, delegated)
- create 'backlog' folder. Create 'later' folder? Or is this the same as 'backlog'? I think it's the same -- if there's something important not to miss, but for later, it deserves to be made into a todo or calendar item. Mb call the folder 'later' (or defer), these are shorter than 'backlog'.
- make use of the unused 'labels' functionality
- answer the question marks above in 'thoughts'
---
(note: you can use :exec what-key to see the name of a key in Mutt)
current email keyboard:
Home row: arst d h neio
a t n o: movement r: reply s: mbox e: delete i: treasure_chest h: flag
Big keys: enter, space: both display-message TODO: opportunity for something else here backspace: unbound Esc: leader key
Other index finger keys:
List of obvious opportunities:
enter, space: one of them could be something different backspace: unbound
consider a key for adding an email to a TODO list and also archiving it
--- ok i was considering lieer but:
https://www.reddit.com/r/planetemacs/comments/ebczkf/lieer_fast_emailfetching_and_twoway_tag/
Sort by User avatar level 1 singularineet 1 year ago
Gmailieer is a great tool. It's even a Debian package. I use it.
But, it's a bit of a hassle to set up (like, it gets confused about paths if you move stuff to other volumes and set up symbolic links) and there doesn't seem to be any nice way to tell it to not delete a message even if that message has been deleted remotely. Which means if you run it in a cron job and someone breaks into your Google account and deletes all your mail, your local copies will be automatically deleted. Or if your gmail account is getting near its quota so you delete everything older than two years, these messages will soon be deleted locally. Which isn't what I want. 1
---
so i'd better think harder about what i want, and about what's available:
- lieer will fully sync gmail and local, without changing gmail except for labels. However, it will delete mails locally if they are deleted at Gmail
- mb i can ues lieer but also use other folders outside of lieer for longterm/archival storage?
- offlineimap by default will represent gmail labels as folders, but with 'synclabels', can (also?) represent them as X-Keywords or X-Label within the email. However, this modifies the email.
- the notmuch way of doing things, and the gmail way of doing things, has just one 'folder' with labels applied to emails instead of folders
- when asked about synclabels, someone (a user? dev?) related to notmuch seemed to ask why not just use folders.
- notmuch stores the labels in a separate db, unlike X-Keywords or X-Label
- the only way to sync labels FROM notmuch TO Gmail seems to be lieer
- neomutt can handle X-Label etc, and/or notmuch. Relabling with X-Label etc is a little more cumbersome than relabeling with notmuch b/c you are mutating the email, which show up as a deleting of the old version and a new email holding the new version
- do i really care about syncing labels back to Gmail? that's only relevant to me on mobile, which doesnt happen often
- i don't want to have a million folders on Gmail, b/c that makes the UI hard to use (must scroll thru folders). But i do want a million folders locally, so that i can do that thing where you just archive an email by storing it to the sender folder
- i'm not sure if i'm ready to just put everything in one folder locally and just use tags. I feel like the tech isnt quite there yet; every now and then i face some annoyance when trying to deal with too many emails at once in mutt (limiting a large folder, esp. if some messages are encrypted; having to grep for an email). Gmails 'folders are just labels' is fine w/me b/c someone else is developing/maintaining the whole system. I'm not sure if i'm willing to go all-in on the notmuch way of doing things locally, b/c that locks me in to the notmuch ecosystem, which i dont know if i like yet.
- so it's looking like: there is some subset of labels that i want to appear on gmail, probably ones relating to 'current business' as opposed to archived stuff. Maybe for these, use lieer. Maybe for other archives, use folders locally (and just 'all mail' in gmail)
so current proposal:
- use lieer
- switch to labels for 'current business', like the inbox/mbox distinction
- continue to use folders for long-term archival stuff
- so the distinction between labels and folders is (i) stuff we dont want to sync between local and gmail, and/or (b) short-term vs. long-term
- adjust neomutt keybindings so that Save and Delete don't really delete on server, but just archives
- mb --no-remove-local-messages
- gmi set --ignore-tags-local new
- mb gmi set --local-trash-tag "deleted" to match notmuch convention: https://github.com/gauteh/lieer/issues/189
- no, want to distinguish between archived (and deleted locally), and actually trashed?
- but notmuch doesn't locally deleted anyway, it's just a tag
- still, could use 'deleted' to mean 'archived', sorta
- dont ignore gmail categories
- --replace-slash-with-dot (is this default?)
- be sure and dont set 'unread' and 'inbox' upon import!
- b/c https://github.com/gauteh/lieer/issues/104 https://github.com/gauteh/lieer/issues/163
questions:
- do we want to sync All Mail locally, and if not, how?
- no, but i think lieer does and i havent yet found a way to tell it not to
- do we want everything to stay in All Mail on Gmail, or only some things
- do we want to distinguish in everyday neomutt workflow b/t 'delete' and 'archive'?
- naw, that burns a key and is rarely needed. Delete locally = archive on gmail.
- what do we do about document retention?
- just search for old All Mail messages in Gmail and delete them, i guess. And search for old messages locally and delete them as needed
- what happens if you delete locally in lieer, anyhow?
- guess: nothing happens to remote msg; or, mb, it just get re-dl'd (cannot delete locally)
notes/later:
- authenticated send to gmail (could use postfix or lieer)
- lieer has symbolic link issues: https://github.com/gauteh/lieer/issues/128
- decided not to have a separate notmuch for work (using NOTMUCH_CONFIG env var for notmuch and a folder-hooked $nm_default_url for neomutt), b/c the chance that i'll want to have a virtual folder mixing personal and work emails is greater than the chance that i'll be annoying that one email was in multiple of my accounts and i can't give it different labels in different accounts. Don't have a separate neomutt b/c i want the UI to be (mostly) the same between all of my accounts
- custom header in notmuch eg: notmuch config set index.header.AcceptLanguage? Accept-Language then mb notmuch reindex '*' then notmuch search AcceptLanguage:en-US
- finds the original email from mairix: https://github.com/weisslj/muttjump/blob/master/muttjump
- special tags:
- lieer's default ignore-tags-local: 'attachment', 'encrypted', 'signed', 'passed', 'replied', 'muted', 'mute', 'todo', 'Trash', 'voicemail'
- special tags to notmuch: https://github.com/notmuch/notmuch-wiki/blob/master/special-tags.mdwn
- other reserved labels at Gmail: buzz concept todo voicemail finance purchases trips travel
- https://www.instantfundas.com/2010/02/gmail-doesnt-let-you-create-label-named.html https://www.reddit.com/r/GMail/comments/ebjlck/gmail_wont_allow_certain_labels/ https://support.google.com/mail/thread/2523404?hl=en https://support.google.com/mail/thread/16121310?hl=en
http://lieer.gaute.vetsj.com/#changing-ignored-tags-and-translation-after-initial-sync https://github.com/gauteh/lieer
might need:
Python 3
notmuch >= 0.25 python bindings
google_api_python_client (sometimes google-api-python-client)
oauth2client
tqdm (optional - for progress bar)
plan:
- sudo apt-get install python3-tqdm python3-oauth2client python3-notmuch python3-googleapi python3
- git clone https://github.com/gauteh/lieer.git
- cd lieer
- pip3 install .
- cd ~/Mail
- mkdir bsworkgmail
- cd bsworkgmail
- gmi -h
- just to look
- gmi init THIS_EMAIL@gmail.com
Repository information and settings: Account ...........: THIS_EMAIL@gmail.com historyId .........: 0 lastmod ...........: 0 Timeout ...........: 600.000000 File extension ....: Remove local messages .....: True Drop non existing labels...: False Ignore empty history ......: False Replace . with / ..........: False Ignore tags (local) .......: set() Ignore labels (remote) ....: {'CATEGORY_SOCIAL', 'CATEGORY_PROMOTIONS', 'CATEGORY_FORUMS', 'CATEGORY_PERSO NAL', 'CATEGORY_UPDATES'} Trash tag (local) .........: trash
- gmi set
- copy it down here, so that i have a record of the default
- just to look
- gmi set --local-trash-tag "deleted"
- gmi set --replace-slash-with-dot
- gmi set --ignore-tags-remote ""
- gmi set --ignore-tags-local "new"
- gmi set --no-remove-local-messages
- gmi set
got: Account ...........: THIS_EMAIL@gmail.com historyId .........: 0 lastmod ...........: 0 Timeout ...........: 600.000000 File extension ....: Remove local messages .....: False Drop non existing labels...: False Ignore empty history ......: False Replace . with / ..........: True Ignore tags (local) .......: {'new'} Ignore labels (remote) ....: set() Trash tag (local) .........: deleted
- gmi pull
- to list labels: gmi pull -t
CHAT CHAT SENT SENT INBOX INBOX IMPORTANT IMPORTANT TRASH TRASH DRAFT DRAFT SPAM SPAM CATEGORY_FORUMS CATEGORY_FORUMS CATEGORY_UPDATES CATEGORY_UPDATES CATEGORY_PERSONAL CATEGORY_PERSONAL CATEGORY_PROMOTIONS CATEGORY_PROMOTIONS CATEGORY_SOCIAL CATEGORY_SOCIAL STARRED STARRED UNREAD UNREAD
- notmuch new
- configure (neo)mutt to run '<shell-escape>(cd ~/Mail/bscovgmail; gmi sync && notmuch new)<enter><sync-mailbox>'
- that should also be a cron job
- test out 'important' and 'flagged' labels
- configure neomutt to remove 'inbox' tag when saving to another folder
- someday: get my own API key
---
it would be nice to have two accounts but to also have a 'unified inbox' but:
https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/2021-March/001001.html
also some users report that the numbers of new emails in the sidebar doesn't immediately update until you visit. Someone found a workaround but i forgot what it was.
i guess i could just accept going all-in on labels for now and annotate things that i would have saved to folder with a 'save' label. The folder i would have saved to would be a sender folder (the default in mutt) if no other labels, or another folder if there is another label.
so i'd need a neomutt macro that (a) removes the 'current business' labels, and (b) adds the 'save' label.
todo check out '21. Dynamically Changing $index_format using Patterns' in mutt manual!
---
eh, i guess getting rid of saving to folders and just using a 'deleted' tag instead (assuming that everything else is 'saved' in the archive) is the best short-term solution. Can always write a script later to save to folders based on sender. So there are then 5 tiers of saved stuff:
- topic labels: for things that i want to be able to search for other than by From:
- save: things in the archive that are more important to save than others
- nothing/default: these things are in the archive (and so can be found by searching for the From: author)
- 'deleted': these things are hidden locally
- 'trash': these things are deleted from Gmail (and should probably also be 'deleted' locally)
---
i think i'm going to have to convert everything to notmuch and lieer at once for this to work with a unified inbox:
- if you're in a unified inbox, and you hit the 'save' key, what should happen?
- when you save an email in the old system, you delete it from the existing folder and copy it to the destination folder
- when you save an email in the new system, you remove existing labels and add a new label
- as i note here, there doesn't seem to be a way for mutt macros to execute things conditionally: https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/2021-March/001001.html
- if you add a new label, but delete the email from the existing folder and copy it to the new folder, the new label doesn't follow; the new copy of the email in the destination folder has no labels at all
so if the email you want to save is in an account using notmuch, you can't delete it from its folder when saving. But otherwise, you have to delete it from its folder when saving. And there is no way to do this conditionally.
could probably achieve conditional execution by using shell scripts or by doing something tricky with tags, since there is conditional execution specialized to the condition of whether or not there are currently any tagged messages. But may not be worth the complexity, since i might eventually want to convert my main mailbox to notmuch/lieer anyhow.
---
what if you delete a message from a lieer mailbox?
i tested this. If you delete from the client, it stays on the server (the way to delete from the server is to assign the 'trash' tag and then wait 30 days -- you can also delete immediately from the trash folder using the Gmail web client). If you delete an email from the client, then even though it persists on the server, on the client, it stays deleted and does not download again -- unless you manually do a 'gmi sync -f', in which case it re-downloads.
if you delete from the server, then, since i did "gmi set --no-remove-local-messages" for this repository, the deleted message stays on the client. It stays even if you do a 'gmi sync -f'. If you move a message to the trash on the server without permanently deleting, it adds a 'trash' tag to the message, which appears to hide it from virtual folders in the client, unless you search with tag:trash.
So, this meets my criteria: with this setup, it's hard for either the client or the server to cause unintentional permanent loss of email on the other.
---
ok so to convert my main mail directory:
- cd ~/Mail/bsgmail
- gmi init THIS_EMAIL@gmail.com
- gmi set --local-trash-tag "deleted"
- gmi set --replace-slash-with-dot
- gmi set --ignore-tags-remote ""
- gmi set --ignore-tags-local "new"
- gmi set --no-remove-local-messages
- gmi set
- (just to confirm everything looks good)
- gmi pull
- to list labels: gmi pull -t
CHAT CHAT SENT SENT INBOX INBOX IMPORTANT IMPORTANT TRASH TRASH DRAFT DRAFT SPAM SPAM CATEGORY_FORUMS CATEGORY_FORUMS CATEGORY_UPDATES CATEGORY_UPDATES CATEGORY_PERSONAL CATEGORY_PERSONAL CATEGORY_PROMOTIONS CATEGORY_PROMOTIONS CATEGORY_SOCIAL CATEGORY_SOCIAL STARRED STARRED UNREAD UNREAD
- notmuch new
- configure (neo)mutt to run '<shell-escape>(cd ~/Mail/bscovgmail; gmi sync && notmuch new)<enter><sync-mailbox>'
- that should also be a cron job
ok we got an email issue
i have some filters in one of my gmail accounts that fwds messages to another of my email accounts, and then deletes them from the original email account.
it seems that these messages got the 'trash' tag in the original account, that was synced down to my computer, and then, after a delay, since notmuch considers all copies of emails the same, it was synced back up to the second account. This means that in both accounts, the emails ended up in the 'trash' folder online, and hidden locally.
(weirdly, even though lieer has setting "Trash tag (local) .........: deleted" in both repos, i still see these messages tagged 'trash' locally)
Analysis:
How was the 'trash' tag added to the emails in the second account?
- Email was received by Gmail the first account, and immediately forwarded to the second account and then had the 'trash' tag applied in the first account
- gmi sync downloaded the email from the first account, with the 'trash' tag
- when gmi sync saw the email in the second account, wouldn't it have downloaded it first, wiping out the 'trash' tag?
But what if the second account was synced first:
- Email was received by Gmail the first account, and immediately forwarded to the second account and then had the 'trash' tag applied in the first account
- gmi sync downloaded the email from the second account, without the 'trash' tag
- when gmi sync saw the email in the first account, it downloaded it, adding the 'trash' tag locally
- when gmi sync next synced the second account, it added the 'trash' tag remotely
Some initial ideas:
- could ignore the remote 'trash' tag. But this would make it impossible to delete a message on the server (while traveling, for example) and have it propagate to the client. Also, might this cause the 'inbox' tag to be removed on the other account?
- could stop deleting emails on the server when i propagate them, and archive them instead. But i'm worried that this could sometimes cause the 'inbox' tag to be removed on the other account.
- could stop deleting emails on the server when i propagate them, and leave them in the inbox instead. But this would mean that i lose the ability to filter emails on the server. Any email that goes to any of my accounts has to sit there in its inbox.
- could ignore the remote and local 'trash' and 'inbox' tags
- also, in any case maybe i should "gmi set --local-trash-tag "trash", so that i can distinguish 'deleted' from trash, and take 'trash' out of the .notmuch-config excluded tags
Q: if a message has been seen by notmuch, and then is d/led from a new inbox during a gmi sync, and then 'notmuch new' is run on it, will 'new' be added to it again? I doubt it, but we can try and see. seems like yes, although i only did one test Does this help? Maybe not. I can't be sure that the notmuch posthook will execute in an atomic transaction along with the other notmuch stuff. If another notmuch process occurred while we were operating on 'new' then i don't think we'd be ableto prevent the inbox and trash tags from being sync'd across accounts.
oh, i have an idea. All the tags which we want to assign different values to in different accounts, just translate them to local tags with distinct names. So 'inbox' translates to 'inboxAcct1' or something like that, and the same with 'trash'. But lieer doesn't have an option for this. And local-trash-tag already seems buggy. But i could implement it. -- i think the bug is in local.py, in Config.__init__. I think it should call Local.update_translation('TRASH', self.local_trash_tag), which is currently called only in set_local_trash_tag, which i'm betting is only executed during the invocation when the relevant 'gmi set' is first given. -- could pass an assoc list (alternating key,value list) to encode an arbitrary set of translations into an option. -- so i guess i'll have 3 pull requests: fixing the exponential backoff undo to 1, fixing the trash bug, generalized translating updates LATER: i implemented this, and submitted a pull request to upstream. Works great, solves this problem.
if we're talking about implementing stuff, tho, the best thing would be to modify notmuch to not deduplicate different emails with the same message-id. They are probably using message-id as a primary key; we could make the primary key be the concatenation of the message-id and the containing folder path. well, if we did that, then the labels would not follow the message if it were copied to new folder
---
mb create a 'todomb' or 'should' folder for lower-priority/potential todos, but not as low as zzz/someday/mb? name? tdmb? shd? td0? later? low? todo-?
or should later, zzz, low, someday/mb all be the same concept?
what about the distinction b/t low priority toreads vs low priority todos? and what about 'work' fyis? low priority toreads could be the same as work fyis, and are still above fyi, i guess.
leaning towards: 'low' which would be an alternate 'mbox' for lower-priority stuff that i don't want to clutter 'mbox'
but now the naming is getting confusing; we have 'low' which contains something analogous to 'fyi'. low would be conceptually similar to the opposite of 'high', but 'high' is represented as an 'important' label on top of mbox, whereas low is an alternative to mbox.
could also have 'low' be a tag like 'important', but the opposite, and then replace the 'mbox' mailbox with low/med/high virtual mailboxes via queries
- leaning towards adding 'low' with spacebar, or mb with 's' (S would then be mbox). Then 'fyi' is reserved for moderately important FYI stuff.
- alt: read
- mb also change header to Esc-H then H can be the same in both index and pager
- confirm that Flag persists across relabeling
- mb have a 'lesser todo'?
---