aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* config: do not hardcode sharedirRobin Jarry2022-02-197-51/+102
| | | | | | | | | | | | Instead of using a static SHAREDIR at compile time, use a list of standard paths to use at runtime for templates, config files and stylesets. This implies removing all default filters in the default configuration. Replace them with basic commands. New users can configure the filters as they wish. Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: improve reconnect stabilityKoni Marti2022-02-062-8/+22
| | | | | | | | | | | | | | | | improves the robustness of the imap reconnect feature which was introduced in commit beae17a6da37 ("imap: auto-reconnects on connection error"). If a connection error is emitted, the message list is cleared and a corresponding error message is shown in the ui. Status bar is updated as well. Upon reconnect, the directories and the message list will be re-fetched (same behavior as the connect command). Reconnect can be enabled and disabled with the connect and the disconnect commands. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* postpone: re-open review mode on errorKoni Marti2022-02-061-4/+9
| | | | | | | | | re-opens the review UI when the postpone operation fails. Before, the composer would close, even on error, and we would lose the email draft. Now, the user can decide on how to proceed when postponing fails. References: https://lists.sr.ht/~rjarry/aerc-devel/patches/28824 Signed-off-by: Koni Marti <koni.marti@gmail.com>
* readme: add license infoRobin Jarry2022-02-061-0/+2
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* readme: remove #aerc-devel irc channelRobin Jarry2022-02-061-2/+1
| | | | | | | This channel has not received much activity and all development discussions are happening on #aerc. No need to multiply channels. Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: do not abort on malformed messagesRobin Jarry2022-02-061-1/+7
| | | | | | | | | | | | | | Some messages contain invalid headers, textproto.ReadHeader fails with an error: malformed MIME header key: From nobody Fri Jan 14 19 And all other messages of the selected folder are ignored. Return an explicit error message to the UI and continue processing other messages. This is consistent with what the maildir worker does. Signed-off-by: Robin Jarry <robin@jarry.cc>
* LICENSE: add license nameRobin Jarry2022-02-061-1/+3
| | | | | | | It is not obvious by reading the license text that aerc is distributed under the MIT license. Explicitly state it. Signed-off-by: Robin Jarry <robin@jarry.cc>
* lib/ui/textinput: stop at /, ", and ' charsPranjal Kole2022-02-031-5/+11
| | | | This matches the default behaviour of Ctrl+W in vim.
* compose: allow setting all headers in templatesRobin Jarry2022-02-032-2/+6
| | | | | | | Allow setting To, Cc, Subject, Bcc in template headers. Fixes: https://todo.sr.ht/~rjarry/aerc/19 Signed-off-by: Robin Jarry <robin@jarry.cc>
* review: display actual bindings for commandsRobin Jarry2022-02-022-8/+99
| | | | | | | | | Parse the actual user bindings to determine what shortcuts are available in the compose::review stage. Add a predefined list of commands for which we want to display the keyboard shortcuts. Fixes: https://todo.sr.ht/~rjarry/aerc/14 Signed-off-by: Robin Jarry <robin@jarry.cc>
* binds.conf: change default review bindingsRobin Jarry2022-02-021-1/+2
| | | | | | | Add missing :detach binding. Ask user for confirmation when pressing 'q'. Signed-off-by: Robin Jarry <robin@jarry.cc>
* mk: use debug to generate a non-optimized binaryRobin Jarry2022-02-022-3/+8
| | | | | | | | Do not use this to run the debugger. Instead, build a non-optimized binary and display what command should be executed to attach to a running program. Signed-off-by: Robin Jarry <robin@jarry.cc>
* completions: add folder flexible search as an optioninwit2022-01-314-1/+26
| | | | | | | | | | | Provide an option to change the completion style when selecting a folder from completing with folders starting with the input string to completing with folders in which the input string is a substring present at any point in the folder name. References: https://lists.sr.ht/~sircmpwn/aerc/%3C20201129181020.186984-1-inwit%40sindominio.net%3E References: https://lists.sr.ht/~sircmpwn/aerc/%3C20210223202536.199355-1-clayton%40craftyguy.net%3E Signed-off-by: inwit <inwit@sindominio.net>
* compose: add option to never include your own address when replyingjohn1doe@ya.ru2022-01-314-0/+28
| | | | | | | Introduce an option in aerc.conf to disable the auto-including of your own address when replying to your own emails (address replies to the original To: and Cc: instead); default to true (allow the auto-including)
* maildir: defer the count of recent messagesRobin Jarry2022-01-301-25/+32
| | | | | | | | | | | | | | | Since commit 01c96e78dfe8 ("Update DirectoryInfo handling for maildir"), flags are checked for every message of a folder when entering it. Iterating over all messages of a folder takes a long time for large collections of emails. Only count the number of messages and state that the directory info counts are not accurate. Defer the parsing of message flags in a goroutine to have a more responsive UI. Fixes: https://todo.sr.ht/~rjarry/aerc/16 Suggested-by: Koni Marti <koni.marti@gmail.com> Signed-off-by: Robin Jarry <robin@jarry.cc>
* dirlist: use shorter delay before listing directory contentsRobin Jarry2022-01-294-1/+18
| | | | | | | | | | | | 1 second is a bit excessive. Use 200ms which should cover most quick folder changes. Add an option to make that delay configurable by the users. References: https://todo.sr.ht/~rjarry/aerc/16 Fixes: cb3090956cfd ("dirlist: skip unnecessary change-folder action") Suggested-by: Koni Marti <koni.marti@gmail.com> Signed-off-by: Robin Jarry <robin@jarry.cc>
* recover: recover emails from tempdir after a crashKoni Marti2022-01-291-0/+110
| | | | | | | | | | | | | | | | | | | implements a recover command that searches the local temp dir for aerc emails. If a file is found and selected, a new composer tab will open with the file contents as the message body. No header data is stored in the temp file and thus this information cannot be recovered. Recover will not remove the temporary file unless the force flag (-f) is explicitly used. This recovery method only works when the editor buffer is saved to disk and the Close() function of the composer has not been called yet. Sending, postponing or quitting will call the Close() function which removes the temporary file completely. After Close() is called, no recovery is possible anymore. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* readme: add shield for github macos buildMark Dain2022-01-281-0/+1
|
* reply: use new-message template for non-quoted repliesRobin Jarry2022-01-271-0/+3
| | | | | | | | Unless a template is specified with reply -T, use the new-message template for non-quoted replies. Fixes: 877a94f5d9a7 ("compose: add default template for new messages") Signed-off-by: Robin Jarry <robin@jarry.cc>
* doc: correct typo in man-pagesAriel Costas2022-01-2611-11/+11
| | | | | | | Fix a typo in the man page where it reads "maintained by by Robin" instead of "maintained by Robin" Signed-off-by: Ariel Costas <ariel@costas.dev>
* github: add workflow to test on macosRobin Jarry2022-01-251-0/+16
| | | | | | | We have some users on macOS. builds.sr.ht does not support proprietary build images and will never do. Signed-off-by: Robin Jarry <robin@jarry.cc>
* aerc: shutdown if socket communication failsAdnan Maolood2022-01-241-10/+13
| | | | | | | | | When provided with a mailto argument, aerc tries to connect to an existing instance via a unix socket. If that fails, it starts up a new instance and tries again. However, if that fails again (e.g. if the unix server could not be started) then the new instance will remain open without any indication that an error occured. Instead, shutdown the new instance so the user can see the error message.
* binds: Warning on unexistent account bindingsinwit2022-01-242-5/+7
| | | | | | | | | After commit 175d0ef ("binds: add account specific bindings"), when bindings are defined for an account not defined in accounts.conf, aerc quits with an error. After this commit, a warning is logged and aerc ignores those bindings. Signed-off-by: inwit <inwit@sindominio.net>
* dirlist: skip unnecessary change-folder actionKoni Marti2022-01-241-39/+55
| | | | | | | | | | when traversing the directory list, aerc will fetch the contents for every directory even though the user might just move on to the next. This causes an unnecessary delay (and load on the worker) and can be avoided by skipping the old change-folder action when a newer one arrives within a predefined time interval. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* dirlist: improve change-folder responsivenessKoni Marti2022-01-241-2/+2
| | | | | | | | | | | improves change-folder responsiveness. When changing folders, the highlighted directory is currently updated in a callback function to the open-directory action. This creates an unpleasent lag in the ui until the entire operation is done. Instead, we should provide an immediate visual feedback of the selection to the user and keep loading the directory contents in the background. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* readme: fix typo in contribution guideinwit2022-01-241-2/+2
| | | | | | | | | | git: 'sendemail' is not a git command. See 'git --help'. The most similar command is send-email Fixes: b84374a572b4 ("readme: add contribution guide") Signed-off-by: inwit <inwit@sindominio.net>
* build: check make installMark Dain2022-01-244-0/+24
| | | | Ensure that install works on all platforms.
* mk: add make checkinstallMark Dain2022-01-241-0/+12
| | | | Adds a quick way to ensure the install was successful.
* build: replace archlinux by openbsdMark Dain2022-01-242-13/+14
| | | | | | | This commit drops Arch Linux in favor of a BSD so there's more variety in CI. Link: https://lists.sr.ht/~rjarry/aerc-devel/%3C20220122033806.91728-1-ktprograms%40gmail.com%3E
* msgstore: fetch missing headers in visual modeKoni Marti2022-01-222-0/+10
| | | | | | | | | | | fetches missing headers when in visual selection mode. This prevents large archive operations from panicking due to a nil pointer dereference. The archive command will return an error to the ui when a nil message is encountered to signal that the message store is not ready yet. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* mk: syntax cleanupRobin Jarry2022-01-211-11/+7
| | | | | | Avoid multiline strings. Use dlv --build-flags. Signed-off-by: Robin Jarry <robin@jarry.cc>
* mk: be compatible with bsd makeRobin Jarry2022-01-211-25/+17
| | | | | | | ifeq is not supported by bsd make. We don't need this. Use a simple shell command. Signed-off-by: Robin Jarry <robin@jarry.cc>
* Revert "mk: only install if files changed"Robin Jarry2022-01-211-49/+25
| | | | | | | | | | | This reverts commit 22ad9e199a6dccf0f5017b3e0bacd3ad01b122e7. This breaks install on macOS: install -m755 -D aerc /usr/local/bin/aerc install: illegal option -- D Signed-off-by: Robin Jarry <robin@jarry.cc>
* mk: avoid searching in hidden directories at the rootRobin Jarry2022-01-201-1/+1
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* Add .editorconfig fileRobin Jarry2022-01-201-0/+20
| | | | | | Most of the go source files Signed-off-by: Robin Jarry <robin@jarry.cc>
* readme: add package links to debian and fedoraRobin Jarry2022-01-201-0/+3
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* build: add multiple distributionsRobin Jarry2022-01-204-0/+39
| | | | | | | Add build and test on debian, fedora and archlinux. Only check code formatting on alpine. Signed-off-by: Robin Jarry <robin@jarry.cc>
* maildir,notmuch: pass in-memory message to callbackNguyễn Gia Phong2022-01-202-2/+14
| | | | | | | This fixes piped full message (:pipe -m) being empty. Fixes: 904ffacb0e52 ("maildir,notmuch: avoid leaking open files") Signed-off-by: Nguyễn Gia Phong <mcsinyx@disroot.org>
* bindings: fix ctrl-h binding not workingRobin Jarry2022-01-201-1/+1
| | | | | | | | | For some unknown reason. tcell does not include the ctrl modifier for the ctrl-h key event. Fixes: 7a6c808c042b ("bindings: prepare for more modifers") Fixes: https://todo.sr.ht/~rjarry/aerc/8 Signed-off-by: Robin Jarry <robin@jarry.cc>
* terminal: fix nil pointer dereference in pty.GetsizeKoni Marti2022-01-191-1/+4
| | | | | | | | | | | | | pty.Getsize() is used in the Draw function of the terminal widget and wraps the pty.GetsizeFull() function. However, pty.Getsize does not check the returned error from pty.GetsizeFull before dereferencing the winsize struct. In case of an error, this will cause a nil pointer deference and panic. This has been reported in the upstream package, but in the meantime, we can directly use pty.GetsizeFull. References: https://todo.sr.ht/~rjarry/aerc/11 Signed-off-by: Koni Marti <koni.marti@gmail.com>
* mk: only install if files changedRobin Jarry2022-01-191-25/+49
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* compose: add default template for new messagesRobin Jarry2022-01-196-0/+17
| | | | | | | Allow defining a default template to use when composing new messages. Add an example to be used for new users. Signed-off-by: Robin Jarry <robin@jarry.cc>
* docs: mention missing -T options for compose and forwardRobin Jarry2022-01-194-8/+20
| | | | | | A template file may be specified for compose and forward as well. Signed-off-by: Robin Jarry <robin@jarry.cc>
* templates: add x-mailer header in default filesRobin Jarry2022-01-192-0/+2
| | | | | | This should serve as an example for new users. Signed-off-by: Robin Jarry <robin@jarry.cc>
* maildir,notmuch: avoid leaking open filesNguyễn Gia Phong2022-01-197-27/+15
| | | | | | | | | | Previously, Message.NewReader returned the wrapped buffered reader without a reference to the opened file, so the files descriptors were left unclosed after reading. Now, the file reader is returned directly and closed on the call site. Buffering is not needed here because it is an implementation detail of go-message. Fixes: https://todo.sr.ht/~rjarry/aerc/9
* imap: auto-reconnects on connection errorKoni Marti2022-01-193-3/+30
| | | | | | | | | if the worker emits a connection error, the ui will automatically send back a reconnect command. The worker then establishes a new connection. Auto-reconnect is disabled when the user sends the disconnect command. Fixes: https://todo.sr.ht/~rjarry/aerc/1 Signed-off-by: Koni Marti <koni.marti@gmail.com>
* imap: emits connection error on logoutKoni Marti2022-01-193-0/+37
| | | | | | | | implements a new connection error message. This allows the worker to emit a connection-related error message to the ui when the imap client closes the loggedOut channel. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* imap: fix panic when sending multiple connect cmdsKoni Marti2022-01-191-15/+26
| | | | | | | | | | | fixes the panic when the user sends multiple connect commands and is already connected. The panic is caused by closing an already closed channel. This happens when the idle re-init code is not executed, e.g. when there's a return statement in the switch block. A defer func() before the switch block will prevent this. The existing behavior of only creating a new idleStop channel when properly connected is preseverd. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* Release version 0.7.10.7.1Robin Jarry2022-01-151-1/+1
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* Revert "imap: attempt automatic reconnection on error"Robin Jarry2022-01-151-41/+3
| | | | | | | | | This reverts commit c605ada3ddc7569ebfc153b07db12a21b30d0569. This breaks reading message bodies. I am not sure why, I'll take some time to fix it later. Signed-off-by: Robin Jarry <robin@jarry.cc>