aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add html "unsafe" filter to work also without danteJens Grassel2022-04-172-0/+17
| | | | | | | | If socksify (from dante) is not installed then the filter uses w3m without it to render an html message part. Signed-off-by: Jens Grassel <jens@wegtam.com> Acked-by: Robin Jarry <robin@jarry.cc>
* binds: allow to bind a command to < and >Koni Marti2022-04-171-0/+8
| | | | | | | | | | | | | | | Allow to bind to < and > by using \< and \> in binds.conf. Ensure that the single \ can still be properly used to bind to other commands. For example, the following binds would work now: \< = :prev-tab<Enter> \> = :next-tab<Enter> \ = :filter<space> Fixes: https://todo.sr.ht/~rjarry/aerc/37 Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Sebastian LaVine <mail@smlavine.com> Acked-by: Robin Jarry <robin@jarry.cc>
* review: show command that will be executed by bindingkt programs2022-04-141-4/+2
| | | | | | | | Also show commands that don't have a binding. This allows users to see what's available to bind. Signed-off-by: kt programs <ktprograms@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* main: remove unnecessary pointer dereferenceConnor Kuehl2022-04-141-2/+2
| | | | | | | Calling a method on a pointer will dereference it automatically. Signed-off-by: Connor Kuehl <cipkuehl@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* binds: add binding for :open by default in viewerkt programs2022-04-141-1/+2
| | | | | | | | Also move binding for :delete such that the :open, :save, :pipe command bindings are grouped together. Signed-off-by: kt programs <ktprograms@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* forward: allow ':forward -A' with no addressTim Culverhouse2022-04-141-6/+9
| | | | | | | | Allow using the command ':forward -A' without specifying an email address inline. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* config: don't swallow error in checkConfigPermsConnor Kuehl2022-04-141-1/+5
| | | | | | | | | | os.Stat might return other errors aside from one stating that the file does not exist. If it does, propagate the error down. As before, if the file does not exist, just do nothing. Signed-off-by: Connor Kuehl <cipkuehl@gmail.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
* Initialization fix for dynamic foldersAivars Vaivods2022-04-141-0/+9
| | | | | | | | | | | | | | | | | | | There is an issue with backends, that provide dynamic folders, namely when opening folder, that isn't defined in config file, you get empty folder. To actually get messages listed, you need to open that folder twice. At first attempt only DirectoryInfo is fetched and new MessageStore created. Second attempt populates previously created MessageStore with list of messages. For pre-configured folders, DirectoryInfos are fetched upon connection to backend and, when folder is opened, MessageStore is updated with list of messages. Fixes: https://todo.sr.ht/~rjarry/aerc/30 Signed-off-by: Aivars Vaivods <aivars@vaivods.lv> Acked-by: Robin Jarry <robin@jarry.cc>
* mk: do not depend on cmp being availableRobin Jarry2022-04-141-3/+1
| | | | | | | cmp is part of gnu diffutils which may not be available. Use grep which is more widespread. Signed-off-by: Robin Jarry <robin@jarry.cc>
* builds: add gnupg in preparation of gpg integrationRobin Jarry2022-04-145-1/+5
| | | | | | This is required for future gpg unit tests to run. Signed-off-by: Robin Jarry <robin@jarry.cc>
* builds: test with notmuchRobin Jarry2022-04-144-1/+8
| | | | | | This is never tested. Let's check that it compiles at least. Signed-off-by: Robin Jarry <robin@jarry.cc>
* builds: reformat yamlRobin Jarry2022-04-144-50/+53
| | | | | | Use two spaces for indentation consistently. Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: fix no-envelope-for-message errorKoni Marti2022-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | | Fix the "no envelope available for this message" error that can occur when using the same imap mailbox in another mailclient (e.g. through a webmail interface) at the same time. Complements the fixes in commit 7fe7fe4 ("ui: fix panic in header formatter") and commit 074b0a1 ("view,list: fix crash when viewing incomplete imap messages"). The error is caused when a message attribute update is received by the message store before the message list had a chance to fetch the proper header first. In this case, an (incomplete) message info is stored in the message store and the message list will never fetch the correct header. To prevent this, add only messages to the store with a non-nil envelope but make sure that message attribute updates are properly merged. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* stylesets: allow specifying color by numberTobias Wölfel2022-04-072-2/+18
| | | | | | | | | Make it possible to specify the color in the style sets by number in addition to the color name. This allows using colors defined by the terminal. Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org> Acked-by: Robin Jarry <robin@jarry.cc>
* fix: out-of-bounds error in command headerMoritz Poldrack2022-04-061-0/+6
| | | | | | | | This commit fixes an out-of-bound error that happened while parsing commands. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* header: remove trailing colon in header fieldMoritz Poldrack2022-04-061-0/+2
| | | | | | | | With this commit trailing colons in the :header command's field are removed to prevent double-colon-headers from being sent. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: fix panic in header formatterMoritz Poldrack2022-04-061-0/+4
| | | | | | Reported-by: noex Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* compose: parse headers correctly from -HEvan Gates2022-04-061-2/+15
| | | | | | | | | | | | By using :compose -H <header> a user should be able to add arbitrary headers to an email. The existing implementation from 5b523880b4b4cd2abd9457b4b09c384af33be14b added the headers as lines to the beginning of the body. These lines were not interpreted as headers anywhere and ended up as plain text in the body of the email. Fix the code to parse and add the headers correctly. Signed-off-by: Evan Gates <evan.gates@gmail.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
* mk: rename ambiguous LDFLAGS variableRobin Jarry2022-04-061-4/+7
| | | | | | | | | | | | | | | | | | The LDFLAGS environment variable is usually indented for C the linker flags which are not compatible with go -ldflags. Use a more explicit GO_LDFLAGS variable instead. Allow adding extra flags without overriding the default ones by specifying GO_EXTRA_LDFLAGS. This may break the build on some distros that rely on setting LDFLAGS to change the default shareDir or version. They will have to switch to GO_EXTRA_LDFLAGS. Link: https://salsa.debian.org/go-team/packages/aerc/-/commit/e9ed90beae9f Link: https://src.fedoraproject.org/rpms/aerc/blob/f36/f/aerc.spec#_86 Fixes: e7e22aba60ce ("mk: rebuild if goflags or ldflags have changed") Signed-off-by: Robin Jarry <robin@jarry.cc>
* save: fix path completionRobin Jarry2022-03-311-0/+9
| | | | | | | | Ignore option flags and prepend default-save-path if the current path is not absolute. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
* statusline: indicate when sorting is in progressKoni Marti2022-03-253-2/+16
| | | | | | | Indicate when sorting is in progress in the statusline. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* store: sort messages even when a filter is appliedKoni Marti2022-03-251-0/+1
| | | | | | | | | | Sort the message list even when a filter is applied according to the sort criteria given by the sort command. Currently, the sort command has no effect when a filter is in use. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* sort: keep sort criteria applied to folderKoni Marti2022-03-253-8/+16
| | | | | | | | | | | | | | | Keep the sort criteria applied to the selected folder until the default sort order should be restored. Call the sort command without arguments to restore the default sort order. The current behavior is that the default sort order is restored as soon as the folder reloads. This happens often and then the results of the sort command are lost. This makes the sort command not very user-friendly. Instead, we should keep the sort criteria applied until the user explicitly wants to restore the default sort order again. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* statusline: improve status line updatingKoni Marti2022-03-252-1/+10
| | | | | | | | | | | | Update statusline only for the selected account (to prevent other updates from different accounts to interfere). Update status when jumping/selecting/closing tabs. Fixes cosmetic regressions introduced by commit feecc09b73e2 ("statusline: make statusline folder-specific"). Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* completion: install panic handler in completion callbackRobin Jarry2022-03-251-0/+2
| | | | | | | | | This callback is actually invoked in a goroutine by time.AfterFunc. The panic handler must be explicitly installed. Link: https://github.com/golang/go/blob/go1.18/src/time/sleep.go#L160-L173 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* show-ics-details.py: fix error with python < 3.9Jens Grassel2022-03-241-16/+16
| | | | | | | | Change the pattern matching into a if/elif construct because pattern matching is not supported on python < 3.9. Signed-off-by: Jens Grassel <jens@wegtam.com> Acked-by: Robin Jarry <robin@jarry.cc>
* save: add -a option to save all attachmentsRobin Jarry2022-03-243-18/+69
| | | | | | | | | | Allow saving all message parts that have the content disposition "attachment" header to a folder. Suggested-by: Ondřej Synáček <ondrej@synacek.org> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Koni Marti <koni.marti@gmail.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
* logging: fix race condition in startupMoritz Poldrack2022-03-244-7/+14
| | | | | | | | | If a panic occurs in one of the workers, it can happen after the UI was initialised, but before the cleanup function has been registered. With this the start of the worker loops is deferred until the cleanup routine was registered. Signed-off-by: Moritz Poldrack <git@moritz.sh>
* readme: add ~rjarry/aerc-discuss@lists.sr.ht in resourcesRobin Jarry2022-03-241-2/+5
| | | | | | | Add a reference to a new end-user discussion list. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
* readme: add links to documentationRobin Jarry2022-03-241-3/+20
| | | | | | | Let's make it easier for new users to find information. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
* threading: fix msg-id order in references headerKoni Marti2022-03-231-5/+17
| | | | | | | | | | | Fix order in the references header when an in-reply-to msg-id is erroneously added at the beginning instead of at the end. Add description to the function that cleans up the reference headers for threading. Reported-by: Evan Gates <evan.gates@gmail.com> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* Add filter script for ics files.Jens Grassel2022-03-232-0/+90
| | | | | | | | This is a python script for python 3 using the vobject library to show details about an ics file (text/calendar attachment). Signed-off-by: Jens Grassel <jens@wegtam.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
* logging: added a log on panicMoritz Poldrack2022-03-2327-23/+161
| | | | | | | | | | | | | Since panics still regularly "destroy" the terminal, it is hard to get a stack trace for panics you do not anticipate. This commit adds a panic handler that automatically creates a logfile inside the current working directory. It has to be added to every goroutine that is started and will repair the terminal on a panic. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* statusline: make statusline folder-specificKoni Marti2022-03-234-46/+67
| | | | | | | | | | | | Make statusline folder-specific. Update filter, search and threading status when changing folders. Commit 2512c04 ("statusline: implement per-account status") introduced an account-specific statusline. This makes it account- and folder-specific. Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
* compose: make headerEditor focusing more reliableTim Culverhouse2022-03-223-22/+10
| | | | | | | | | | | | Focusing header editors was hardcoded as integers which only worked with the default ui. If a user changed the UI to, for example, put CC as a field below "to", FocusSubject would focus the CC field instead of the subject. This commit reuses and modifies the function FocusEditor to generalize the focusing of header editors - which can now be called by name via FocusEditor(name string) Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* threading: fix stack overflow from faulty headersKoni Marti2022-03-221-1/+13
| | | | | | | | | | | Fix stack overflow from faulty headers that cause a circularity in the threading algorithm. Remove duplicated message-ids in the references headers. Check that the message-id itself is not part of the references. Fixes: https://todo.sr.ht/~rjarry/aerc/32 Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Robin Jarry <robin@jarry.cc> Acked-by: Robin Jarry <robin@jarry.cc>
* Release version 0.9.00.9.0Robin Jarry2022-03-211-1/+1
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* readme: fix typoRobin Jarry2022-03-211-1/+1
| | | | | Fixes: 7e6c0d2e6e8c ("readme: add more details about the review process") Signed-off-by: Robin Jarry <robin@jarry.cc>
* msglist: update message counter upon filter changeKoni Marti2022-03-202-0/+17
| | | | | | | | | | | | | | | | Update message counter in msglist when the filter is changed (either set or cleared in the msgstore). When we apply a filter, we change the number of uids in the message store. This can unintentionally trigger the storeUpdate() function of the msglist which checks the number of uids for new messages and advances the pointer by the difference in the number of messages. This can be avoided when we update the message counter upon changing the filter. Fixes: https://todo.sr.ht/~rjarry/aerc/23 Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* store: fix deleting messages in filter modeKoni Marti2022-03-201-0/+8
| | | | | | | | | | | fix deleting messages when in filter mode. Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CCIO3IVSM2JUB.3L46NM6LJZ2KB%40Archetype%3E Reported-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* statusline: update status only when necessaryKoni Marti2022-03-201-1/+6
| | | | | | | | | | | | | Update statusline only when changed to reduce cpu usage. commit 2512c0403fa4 ("statusline: implement per-account status") updates the status irrespective of whether the statusline changed or not. This can lead to high cpu usage that can be avoided. Reported-by: Jens Grassel <jens@wegtam.com> Reported-by: inwit <inwit@sindominio.net> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* statusline: implement per-account statusKoni Marti2022-03-1810-45/+196
| | | | | | | | | | | | | | | | Implement a statusline state for each account. Keep the ex line and the push notifications global. Add account name prefix to push notifications. Prefix status line with account name when multiple accounts are available. Use account-specific status line for each tab where an account is defined. Handle threading, filter/search, viewer passthrough and connection status. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* colorize: handle mailto prefixes in urlsRobin Jarry2022-03-181-1/+1
| | | | | | | | | mailto:email@domain.tld is the only exception that does not use the <scheme>:// prefix. Requested-by: Moritz Poldrack <moritz@poldrack.dev> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
* mailto: handle bcc and body fieldsTim Culverhouse2022-03-181-0/+10
| | | | | | | Enable handling of bcc and body fields in mailto links Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* go vet: not compatible with reflect.StructTag.GetMoritz Poldrack2022-03-181-1/+1
| | | | | | | | This commit fixes all occurrences of the abovementioned lint-error in the codebase. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* go vet: unreachable codeMoritz Poldrack2022-03-181-5/+0
| | | | | | | | This commit fixes all occurrences of the abovementioned lint-error in the codebase. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* go vet: composite literal uses unkeyed fieldsMoritz Poldrack2022-03-1815-102/+102
| | | | | | | | This commit fixes all occurrences of the abovementioned lint-error in the codebase. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* mailto: allow empty recipient fieldTim Culverhouse2022-03-181-1/+4
| | | | | | | | Allow a mailto link to open a new composer even if no recipient is in the url. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Moritz Poldrack <git@moritz.sh>
* commands: use SelectedAccountUiConfig instead of explicit nil checkkt programs2022-03-163-19/+5
| | | | | | | Remove code duplication and provide completion even when acct is nil Signed-off-by: kt programs <ktprograms@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* commands: fix possible panic in CompletionFromListkt programs2022-03-161-1/+1
| | | | | | | Panic might occur if aerc.SelectedAccount() is nil Signed-off-by: kt programs <ktprograms@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>