~ferdinandyb

Budapest

https://bence.ferdinandy.com


#179 having a query named like a folder will show the query on startup but open the folder 12 days ago

maildir added by ~ferdinandyb on ~rjarry/aerc

#179 having a query named like a folder will show the query on startup but open the folder 12 days ago

notmuch added by ~ferdinandyb on ~rjarry/aerc

#179 having a query named like a folder will show the query on startup but open the folder 12 days ago

Ticket created by ~ferdinandyb on ~rjarry/aerc

If you run notmuch+maildir and have a query named like a folder, on startup the message counts will come from the query, but if you try to open the query aerc will load the folder instead (and show the folder's counts as well)

#175 Allow remapping imap folder names to user defined foldernames. 17 days ago

Comment by ~ferdinandyb on ~rjarry/aerc

On Fri May 12, 2023 at 22:42, ~konimarti wrote:

I don't think we need a folder map for this. We can already handle this using templates in the dirlist-left config. For example, you could do the following:

dirlist-left =  {{if (eq .Account "Gmail")}} \
                         {{- .Folder | exec "sed 's/\\[Gmail\\]\\///'" -}} \
                 {{else}} \
                         {{- .Folder | compactDir -}} \
                 {{end}}

However, this is currently super slow because the dirlist is redrawn so many times and it's an external command. A better approach would be to add a template function such as 'replace' and map it to strings.ReplaceAll:

{{- .Folder | replace "[Gmail]/" "" -}} \

Or the filepath.Base function could be an option, too.

What do you think?

This solution only rewrites the display name, but leaves the actual name (the one that can be used with commands like :cf) the same. I think that actually makes the situation a bit worse, because it just hides whatever is underneath. My goal is to be able to completely remap the folder so if I have a [GMAIL]/label -> label remap, then all aerc commands would operate on "label" instead of [GMAIL]/label.

#176 Some servers store all folders as subfolders of INBOX. 22 days ago

feature added by ~ferdinandyb on ~rjarry/aerc

#176 Some servers store all folders as subfolders of INBOX. 22 days ago

imap added by ~ferdinandyb on ~rjarry/aerc

#176 Some servers store all folders as subfolders of INBOX. 22 days ago

Ticket created by ~ferdinandyb on ~rjarry/aerc

Some servers store all folders as subfolders of INBOX, e.g. the Drafts folder is INBOX/Drafts. This is a technical thing that users should not see preferably.

On one such account isync/mbysnc with a minimal config of

MaildirStore imaptest-local
SubFolders Verbatim
Path ~/.mail/imaptest/
Inbox ~/.mail/imaptest/INBOX

Channel imaptest-folders
Far :imaptest-remote:
Near :imaptest-local:
Patterns *

will create a "flat" structure (if you don't specify the Inbox path then your Inbox will go to ~/Maildir and all the other folders will go to ~/.mail/imaptest and any further nesting is done as expected). I do not know how isync knows this. Maybe it automatically flattens any subfolder within inbox?

#175 Allow remapping imap folder names to user defined foldernames. 22 days ago

imap added by ~ferdinandyb on ~rjarry/aerc

#175 Allow remapping imap folder names to user defined foldernames. 22 days ago

feature added by ~ferdinandyb on ~rjarry/aerc

#175 Allow remapping imap folder names to user defined foldernames. 22 days ago

Ticket created by ~ferdinandyb on ~rjarry/aerc

This feature would be useful for example for gmail users, where you could remap [GMAIL]/X folders to just plain X.

It could be configured similary to notmuch query-maps, i.e. by configuring a folder-map entry in accounts which points to a file with lines like [GMAIL]/X = X.