aboutsummaryrefslogtreecommitdiffstats
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* compose: allow changing edit-headers on the flyRobin Jarry2023-07-171-9/+45
| | | | | | | | | Add -e|-E flags to all compose commands to allow switching between edit-headers = true/false without restarting aerc. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Tested-by: Koni Marti <koni.marti@gmail.com>
* compose: implement embedded headers in editorKoni Marti2023-07-171-0/+11
| | | | | | | | | Implement embedded header mode in the composer widget. To activate it, use set [compose].edit-headers=true in aerc.conf. Signed-off-by: Koni Marti <koni.marti@gmail.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* templates: add ThreadCount and ThreadFoldedKoni Marti2023-07-162-2/+17
| | | | | | | | | | | | | | Add the number of threads and a flag to indicated folded threads to the template data. Use {{.ThreadCount}} and {{.ThreadFolded}} in template expression for the message list. column-subject = {{.ThreadPrefix}}{{if .ThreadFolded}}[{{.ThreadCount}}] {{end}}{{.Subject}} Update default configuration accordingly. Signed-off-by: Koni Marti <koni.marti@gmail.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: inwit <inwit@sindominio.net>
* foldermap: make folder-map syntax more expressiveKoni Marti2023-07-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Improve the folder mapping syntax so that prefixes can be removed completely. The following line in the folder-map file * = INBOX/* will strip the INBOX/ prefix from all subfolders of INBOX, e.g. map "INBOX/Project1" to "Project1". To prevent a key collision with multiple "*" keys (the folder mapping is stored as a map internally), a group of "*" will be condensed to one "*", e.g. ** = INBOX/* has the same meaning as above. Also, adjust name translation for folder creation and add tests. Fixes: https://todo.sr.ht/~rjarry/aerc/176 Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* doc: fix hooks title level in aerc-config(5)Robin Jarry2023-07-101-1/+1
| | | | | | | It should be a top level item. Fixes: f10b184eb346 ("hooks: add aerc-startup hook") Signed-off-by: Robin Jarry <robin@jarry.cc>
* open: add option -d to automatically delete temporary filesVitaly Ovchinnikov2023-07-071-1/+3
| | | | | | | | | | | | | | | By default `:open` leaves its temporary files in the temp directory. The patch adds an option `-d` that defers the deletion of the temporary file when the opener is started. This works well with "sync" openers that don't exit until the user is done with the preview, but may not work with "async" openers that pass the file to their parent process and exit. That's why the automatic deletion needs to be intentionally enabled by using the option. Suggested-by: Robin Jarry <robin@jarry.cc> Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
* doc: mention :search in aerc(1)Robin Jarry2023-06-292-2/+11
| | | | | | | | | :search is mentioned in the help of :filter of aerc(1), but is not "documented" which might be confusing for new users. Add a shallow entry that points to aerc-search(1). Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Inwit <inwit@sindominio.net>
* doc: folder-map in aerc-accountsKoni Marti2023-06-221-0/+33
| | | | | | | | Document folder-map option in aerc-accounts. Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Robin Jarry <robin@jarry.cc>
* worker: add jmap supportRobin Jarry2023-06-214-8/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for JMAP backends. This is on par with IMAP features with some additions specific to JMAP: * tagging * sending emails This makes use of git.sr.ht/~rockorager/go-jmap for the low level interaction with the JMAP server. The transport is JSON over HTTPS. For now, only oauthbearer with token is supported. If this proves useful, we may need to file for an official three-legged oauth support at JMAP providers. I have tested most features and this seems to be reliable. There are some quirks with the use-labels option. Especially when moving and deleting messages from the "All mail" virtual folder (see aerc-jmap(5)). Overall, the user experience is nice and there are a lot less background updates issues than with IMAP (damn IDLE mode hanging after restoring from sleep). I know that not everyone has access to a JMAP provider. For those interested, there are at least these two commercial offerings: https://www.fastmail.com/ https://www.topicbox.com/ And, if you host your own mail, you can use a JMAP capable server: https://stalw.art/jmap/ https://www.cyrusimap.org/imap/download/installation/http/jmap.html Link: https://www.rfc-editor.org/rfc/rfc8620.html Link: https://www.rfc-editor.org/rfc/rfc8621.html Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* doc: fix typosRobin Jarry2023-06-192-2/+2
| | | | | | | Reported by lintian. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* doc: move toggle-headers to view categoryErik Schilling2023-06-171-3/+3
| | | | | | | This is a command for the viewer not the composer. Signed-off-by: Erik Schilling <erik.schilling@linaro.org> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* templates: add map functionsRobin Jarry2023-06-101-0/+19
| | | | | | | | | Similar to switch and .StyleSwitch, add map and .StyleMap to work on lists. An extra "exclude" item is available to filter elements out of the list. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
* bindings: add backspace keyVitaly Ovchinnikov2023-06-101-0/+2
| | | | | | | | Add `<backspace>` option to bindings, so it can be used to leave the message view similar to some file managers. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Acked-by: Robin Jarry <robin@jarry.cc>
* save: new option for saving attachmentsVitaly Ovchinnikov2023-06-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new `-A` option to `:save` that works in the same manner as `-a`, but saves all the named parts of an email, not just attachments. The reason is that I have an email with this structure: multipart/related multipart/alternative text/plain text/html image/png (image001.png) image/png (image002.png) image/png (image003.png) text/plain (env.txt) Where the `env.txt` is a "real" attachment, while the images are just a part of the HTML version of the email. However, in this particular email it was important to see them which can't be done with text UI and opening the HTML part with the browser also didn't work. Saving them to a temorary folder did the job and this can be useful in other scenarios. So before the patch we could do `:save -ap /some/path` and get just the `env.txt` saved there. After the patch we could also do `:save -Ap /some/path` and get all the images and the text file saved into the folder. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
* compose: quit composing when editor returns errorMoritz Poldrack2023-06-011-0/+3
| | | | | | | | | | When the editor crashes, or the user forces it to exit with an error code, it is safe to assume that they can't (if the command failed) or don't want to (if :cq'd) continue composing a meaningful message. Suggested-by: tristan957 Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* contrib: add carddav-query scriptRobin Jarry2023-06-012-2/+108
| | | | | | | | | | | Add a standalone python script to allow querying contacts from a CardDAV compatible server. The script works with python 3.6+ and has no external dependencies. Link: https://sabre.io/dav/building-a-carddav-client/ Link: https://www.rfc-editor.org/rfc/rfc6352 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* doc: fix invalid markupRobin Jarry2023-05-301-1/+1
| | | | | | | Extraneous underscore slipped in. Fixes: 3d99fae3d224 ("term: add config options for TERM and osc8") Signed-off-by: Robin Jarry <robin@jarry.cc>
* doc: mention regex for the bindings definitioninwit2023-05-281-1/+10
| | | | | | | | Document the possibility of using regex when defining bindings for specific accounts or folders. Signed-off-by: inwit <inwit@sindominio.net> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* templates: add boolean flagsRobin Jarry2023-05-201-0/+8
| | | | | | | | | | | | | | | | | | Allow accessing email flags via boolean properties instead of having to rely on obscure regular expressions on (.Flags | join ""). With this patch, it is now possible to do this: [ui] index-columns = star:1,name<15%,reply:1,subject,size>=,date>= column-star = {{if .IsFlagged}}★{{end}} column-name = {{if eq .Role "sent"}}{{.To | names | join ", "}}{{else}}{{.From | names | join ", "}}{{end}} column-reply = {{if .IsReplied}}{{end}} column-subject = {{.ThreadPrefix}}{{.Subject}} column-size = {{if .HasAttachment}}📎 {{end}}{{humanReadable .Size}} column-date = {{.DateAutoFormat .Date.Local}} Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Koni Marti <koni.marti@gmail.com>
* headers: enable partial header fetchingTim Culverhouse2023-05-161-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enable partial header fetching by creating config values for headers to specifically include, or specifically exclude. The References field will always be fetched, regardless of the include list. Envelope data is always fetched, but is not shown with :toggle-headers, since it isn't in the RFC822 struct unless explicitly included in the list. Partial headers can break the cache on changes. Update the cache tag key to include the state of the partially-fetched headers. Partial header fetching can have a significant performance increase for IMAP, and for all backends a resource improvement. Some data to support this is below. Gathered by opening aerc, selecting a mailbox with approximately 800 messages and scrolling to the end. Received measured with nethogs, RAM from btop Received | RAM ------------------------------------- All Headers | 9,656 kb | 103 MB Minimum Headers | 896 kb | 36 MB Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* config: update default pagerMoritz Poldrack2023-05-161-1/+1
| | | | | | | | | | | Since aercs embedded terminal now behaves correctly, a messages contents are at the bottom of the pager by default, this has already sparked confusion as this is uncommon and not matching previous behaviour. Thanks: Stacy Harper <contact@stacyharper.net> Suggested-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* compose: warn before sending with empty subjectJason Cox2023-05-161-0/+5
| | | | | | | | Ask user whether they want to abort before sending if the subject header is empty and they have enabled the warn-empty-subject config option. Signed-off-by: Jason Cox <me@jasoncarloscox.com> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* colorize: style chunk function nameJason Cox2023-05-161-0/+2
| | | | | | | | | It's nice to use a different style for the chunk's function name to make it clear that the name is not necessarily adjacent to the chunk's actual lines. Signed-off-by: Jason Cox <me@jasoncarloscox.com> Acked-by: Robin Jarry <robin@jarry.cc>
* term: add config options for TERM and osc8Tim Culverhouse2023-04-241-0/+12
| | | | | | | | Add config options for setting the TERM environment variable used in tcell-term and for enabling or disabling OSC8 escape sequence output. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry<robin@jarry.cc>
* mailto: add template parameterKoni Marti2023-04-221-0/+2
| | | | | | | | | Add template parameter to the mailto query and set the config.Template.NewMessage template file as default. Fixes: https://todo.sr.ht/~rjarry/aerc/145 Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry<robin@jarry.cc>
* search: handle headers in search/filter queryJulian Marcos2023-04-221-1/+6
| | | | | | | | | Handle headers in the search and filter commands, for searching and filtering based on the Headers specified by the -H parameter, the syntax for the -H parameter should be `Header: Key`. Signed-off-by: Julian Marcos <jmjl@tilde.green> Acked-by: Robin Jarry<robin@jarry.cc>
* directory: add role to template fieldsTim Culverhouse2023-04-221-0/+6
| | | | | | | | | Add .Role as a template field for use in distinguishing between mailboxes with a given IANA role, or custom role defined by aerc ("query" for notmuch queries, for example). Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry<robin@jarry.cc>
* templates: change layered fg & bg color prioritiesRobin Jarry2023-04-151-7/+6
| | | | | | | | | | | | | This is mostly a revert of commit ae4d742c5a90 ("templates: fix layered fg & bg color for inline styles"). As it turns out, context colors (msglist_selected, msglist_marked, msglist_deleted, etc.) need to have priority over inline colors. Otherwise strange and confusing results occur. Reported-by: Skejg <grolleman@zoho.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* doc: clarify layered styles render priorityRobin Jarry2023-04-101-0/+43
| | | | | | | | | With all the new different options, the behaviour can be confusing. Add explicit rules and examples to avoid ambiguities. Reported-by: skejg <grolleman@zoho.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Inwit <inwit@sindominio.net>
* hooks: add aerc-shutdownMoritz Poldrack2023-04-011-0/+8
| | | | | | | | | | Add a hook to run when aerc shuts down. The environment is supplemented with the duration aerc was alive for. References: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* hooks: add aerc-startup hookMoritz Poldrack2023-04-011-0/+15
| | | | | | | | | | | Add a hook to run when aerc starts up. The environment is supplemented with aerc version and the path to its binary. References: https://todo.sr.ht/~rjarry/aerc/136 References: https://todo.sr.ht/~rjarry/aerc/139 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* config: replace triggers with hooksMoritz Poldrack2023-04-011-12/+15
| | | | | | | | | | | | | Deprecate triggers and replace them with hooks. Now that aerc supports running arbitrary ex commands over IPC, it is possible to run internal aerc commands *and* shell commands via external shell scripts. Hooks only allow running shell commands. Hooks info is passed via environment variables. Implements: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* config: remove subject contextual ui sectionsRobin Jarry2023-03-311-9/+1
| | | | | | | | | | We have been wanting to remove this for a while now. The only use case is styleset and changing the whole styleset based on an email subject does not make much sense. The same feature can be achieve with dynamic msglist* styles based on any email header value in the stylesets now. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* styleset: allow dynamic msglist stylingRobin Jarry2023-03-311-0/+20
| | | | | | | | | | | Add support for dynamic msglist*.$HEADER,$VALUE.$ATTR = $VALUE where $VALUE can be either a fixed string or a regular expression. This is intended as a replacement of contextual ui sections based on subject values. Implements: https://todo.sr.ht/~rjarry/aerc/18 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* style: inherit colors unless explicitly set in layered stylesRobin Jarry2023-03-311-7/+11
| | | | | | | | Inherit from the lower layers colors unless explicitly overridden in upper layers. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* smtp: replace smtp-starttls with schema optionMarcin Serwin2023-03-261-8/+5
| | | | | | | | | The "smtp-starttls" options is now ignored in favor of more detailed schema specification, similarly to IMAP. Fixes: https://todo.sr.ht/~rjarry/aerc/149 Signed-off-by: Marcin Serwin <marcin.serwin0@protonmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* doc: merge duplicate :filter in aerc(1)witcher2023-03-161-6/+2
| | | | | | | | | | | :filter was given twice in the "MESSAGE LIST COMMANDS" section of aerc(1), both incomplete/wrong. Merge both to reference aerc-search(1) and say it actually *filters* the message list. Fixes: af63bd0188d1 ("doc: homogenize scdoc markup") References: https://todo.sr.ht/~rjarry/aerc/144 Signed-off-by: witcher <witcher@wiredspace.de> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* openers: support basic shell globbingRobin Jarry2023-03-131-1/+5
| | | | | | | Allow wild cards for MIME types like in filters. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* openers: add mime type handling for open-linkRobin Jarry2023-03-132-6/+14
| | | | | | | | | Provide a way to configure link openers. Based on the URL mime type: x-scheme-handler/$scheme. Signed-off-by: Kirill Chibisov <contact@kchibisov.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* doc: improve aerc-templates examplesRobin Jarry2023-03-131-2/+5
| | | | | | Adjust some examples with real world use cases. Signed-off-by: Robin Jarry <robin@jarry.cc>
* doc: add missing references to other manpagesTom Schwindl2023-03-091-2/+3
| | | | | | | | aerc(1) is most likely the entry point for a user who wants to read the docs. Thus, reference all other manpages to improve accessibility. Signed-off-by: Tom Schwindl <schwindl@posteo.de> Acked-by: Robin Jarry <robin@jarry.cc>
* templates: add conditional style methodRobin Jarry2023-03-081-0/+9
| | | | | | | | | | | | | Add .StyleSwitch that takes a string and an arbitrary number of cases (regexp, style). Reuse some of the constructs introduced by previous commit. The style of the first regular expression that matches will be applied. If the string does not match any of the expressions, it will be left as-is. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* templates: add switch/case functionsRobin Jarry2023-03-081-0/+9
| | | | | | | This allows much shorter templates. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* templates: add match functionRobin Jarry2023-03-081-0/+8
| | | | | | | | | | | | | | Add a match function that returns true if a string matches the provided regular expression. The compiled regular expressions are cached in a sync.Map to avoid repetitive compilations of the same expressions. Caveat: if the user mixes the arguments order, it may cause the cache to consume a lot of memory filled with garbage regular expression objects. Ideally, we would need to limit the size of this cache and/or use a LRU cache implementation. Maybe someday? Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* templates: reverse args order for .StyleRobin Jarry2023-03-081-1/+1
| | | | | | | | In preparation for .StyleMatch put the content first, followed by the style name. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* templates: make SubjectBase official apiRobin Jarry2023-03-081-0/+6
| | | | | | | | Document .SubjectBase. Fix its value along the way. Do not reuse d.Subject() which may be empty if d.threadSameSubject is true. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* templates: separate thread prefix from subjectRobin Jarry2023-03-081-2/+3
| | | | | | | | Extract {{.ThreadPrefix}} from {{.Subject}} so that the prefix can be styled in a different color. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* change-tab: document "focus previous tab" functionalityinwit2023-03-071-2/+3
| | | | | | | | | | The current :change-tab command allows to be called with a single "-" as a parameter, in which case it changes focus to the previously focused tab. This is useful to switch back and forth between a pair of tabs, and is undocumented. Document this functionality. Signed-off-by: inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
* ipc: allow triggering internal commands via IPCMoritz Poldrack2023-03-072-0/+9
| | | | | | | | | | | | | | | | | | | | | In order to make automation easier, it's useful to be able to send commands to aerc via IPC. This can be done by calling the aerc binary followed by a colon and the command to run. For example: aerc :read && aerc :remark && aerc :archive month Security to ensure no malicious commands are run is deferred to the user. By default the socket is only writable by the user. This is considered sufficient as the potential harm an attacker gaining write-access to a user's session can cause is significantly greater than "can delete some emails". To ensure users with an according threat model, it is possible to disable command IPC. mailto-handling is unaffected even though it works over IPC as it is absolutely non-destructive. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* templates: allow inline user stylesTim Culverhouse2023-03-022-0/+19
| | | | | | | | | | | | | | | | | | | | Allow custom user-defined styles in a styleset. The styles can take any name, and must be under the [user] ini section. All attributes apply to user defined styles. Example: [user] red.fg=red red.bold=true Add a .Style function which accepts the name of a user-defined style and applies it to the string. {{.Style "red" "foo"}} Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>