aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-19msg/reply: simplify string comparisonReto Brunner
2020-02-16msg/reply: fix address comparisonReto Brunner
Compare self address in lowercase, to avoid self-replying when people put in uppercase versions of the mail. Reported-By: helby on Freenode
2020-02-16notmuch: refresh dirlist in backgroundReto Brunner
2020-02-16notmuch: add internal event loopReto Brunner
2020-02-16notmuch: emit DirInfo upon requestReto Brunner
2020-02-16Request DirInfo whenever the unread count may have changedReto Brunner
Actions such as read / unread or the addition of new messages do change the read/unread/recent count. Hence we request an update from the workers. Workers going over the network should probably cache the information and invalidate it only if necessary
2020-02-16dirlist: actually honor the DirInfoReto Brunner
Currently the dirlist ignores the counts provided by the dirInfo. However some of the workers can actually provide accurate counts much quicker than if we count the flags. Eventually we will also want to enable displaying counts for background folders, where the brute force counting won't work as none of the headers are fetched yet. This commit models it in an opt-in manner, if the flag isn't set then we still count the messages manually.
2020-02-16Only fetch the directory contents when we are switching directoriesReto Brunner
Previously, sending a DirectoryInfo assumed that a directory change happened. However we don't want that if we only want to update the unread message count.
2020-02-16imap: fix double closing idleStopReto Brunner
The idle restart code is at the end of handleMessage in the worker. However if an unsupported msg comes in, we returned early, skipping the re-init. That lead to a crash due to double closing idleStop in the next iteration.
2020-02-16notmuch: avoid stale DBsReto Brunner
Opening a notmuch DB gives you a snapshot of the stage at that specific time. Prior to this, we only reopened the DB upon writing. However, if say a mail sync program like offlineimap is fetching new mail, we would never pick it up. This commit caches a db for a while, so that we don't generate too much overhead and does a reconnect cycle after that. I hardcoded a value as I don't think that having an option would be beneficial. Any write operation (meaning reading mail) anyhow flushes the DB by necessity. (we need to close to commit tag changes, which changing the read state is)
2020-02-13lib: fix an out of bounds panic in the serverDaniel Martí
If the message doesn't contain ':', we don't properly discard the message, so we end up slicing it like msg[:-1]. This can be reproduced if one runs 'aerc foo', as the server receives 'foo' as the message. 'aerc foo' still doesn't do anything very user friendly, but at least it doesn't panic horribly. While at it, do the 'got message' log at the very beginning, so that the user can see what message the server got before reporting the command as invalid. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2020-02-12Fix typo in message view sectionErazem Kokot
2020-02-07Ensure we aren't selecting negative directoriesAndreas Rammhold
When the list of directories is empty trying to navigate in the directory list did previously lead to a crash. With this change we instead return early before trying to change the directory. Example backtrace: > panic: runtime error: index out of range [-1] > > goroutine 1 [running]: > git.sr.ht/~sircmpwn/aerc/widgets.(*DirectoryList).NextPrev(0xc000160680, 0xffffffffffffffff) > source/aerc/widgets/dirlist.go:285 +0xd4 > git.sr.ht/~sircmpwn/aerc/commands/account.NextPrevFolder.Execute(0xc000191040, 0xc00025c210, 0x1, 0x1, 0x0, 0xc00016f420) > source/aerc/commands/account/next-folder.go:44 +0xe0 > git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc0000101a8, 0xc000191040, 0xc00025c210, 0x1, 0x1, 0xc000020070, 0xb46d01) > source/aerc/commands/commands.go:66 +0xa7 > main.execCommand(0xc000191040, 0xc0001ca190, 0xc00025c210, 0x1, 0x1, 0xc00025c210, 0xc0003fb080) > source/aerc/aerc.go:60 +0xc7 > main.main.func3(0xc00025c210, 0x1, 0x1, 0x1, 0x1) > source/aerc/aerc.go:162 +0x57 > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0xc000201db0, 0xb) > source/aerc/widgets/aerc.go:382 +0x83 > git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc0003be100, 0xb475a0, 0xc00023cba0, 0xc00023cba0) > source/aerc/widgets/exline.go:79 +0x131 > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023cba0, 0x99ee01) > source/aerc/widgets/aerc.go:202 +0x4c1 > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate(0xc000191040, 0xc000036f00, 0xd, 0x10) > source/aerc/widgets/aerc.go:195 +0x8d > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023c9c0, 0x9c5a60) > source/aerc/widgets/aerc.go:218 +0x3e8 > git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0001ca190, 0xa99d00) > source/aerc/lib/ui/ui.go:92 +0x190 > main.main() > source/aerc/aerc.go:192 +0x5f2
2020-02-06worker/lib/parse: be more tolerant with parsing email addressesTimmy Douglas
2020-02-02Add link to scdocNoah Kleiner
2020-01-28dirlist: adapt to dynamic UIconfigReto Brunner
2020-01-28dirlist: remove not needed sort functionReto Brunner
The docs of strings.Compare state: > Compare is included only for symmetry with package bytes. It is usually > clearer and always faster to use the built-in string comparison operators > ==, <, >, and so on. So let's do that.
2020-01-24config: Strongly type context typeReto Brunner
The go compiler can't help much with untyped int constants. Even though the only valid constants are 0-3 it will happily accept 4 as input. Let's let the go compiler worry about correctness here. This also allows people not very familiar with the code to use it properly via auto completion.
2020-01-24imap: emit messageinfo when changing read state.Reto Brunner
We need to emit the changed msgInfo whenever we modify the state
2020-01-24Contextual UI ConfigurationSrivathsan Murali
+ Adds parsing of contextual ui sections to aerc config. + Add GetUiConfig method for AercConfig that is used to get the specialized UI config. + Add UiConfig method to AccountView to get specialized UI Config. + Modifies Aerc codebase to use specialized UIConfig instead. + Adds documentation for Contextual UI Configuration
2020-01-24Fix handling of multiple template-dirsBen Burwell
Before, while the docs stated that template-dirs was a colon-separated list, a delimiter was not specified in the struct tag, so it was falling back to the default for the ini library (a comma). Also added a note to the docs to clarify that templates are configured in the [templates] section.
2020-01-20msgview/open: remove manual decodingReto Brunner
2020-01-20msgview/save: Adapt to already decoded readerReto Brunner
The functionality was broken since the decoding changes. This commit also simplifies the code (in my view) to make the application logic easier to follow. The docs are updated accordingly (the feature was poorly documented). As far as I am aware there should be no breaking changes (and is certainly still in the spec of the prior documentation)
2020-01-20Display the mimetype when offering to pipe or saveLuke Drummond
2020-01-18worker/imap: don't decode in FetchFullMessage.Reto Brunner
Doing that breaks `git am` as it expected the encoded variant. Same is probably true for any sort of signature validation (gpg / dkim)
2020-01-16Switch back to upstream pty libraryBen Fiedler
The relevant change was merged upstream, and thus allows us to clean up unneeded forks.
2020-01-16Correct spellingReto Brunner
2020-01-11Add docs for reply -TBen Burwell
2020-01-09Strip trailing newline from address book entries without namesBen Burwell
When the list of completions from the external command doesn't have associated contact names, the email address we attempt to parse was being terminated with a newline. Now, we strip the trailing newline if present.
2020-01-09compose: don't call ti.tabcomplete when it is nilTimmy Douglas
2020-01-09template: man cosmetic changesLeszek Cimała
2020-01-09template: add exec and wrapLeszek Cimała
2020-01-09template: remove last \n to fix additional new lines after quoteLeszek Cimała
2020-01-09add .OriginalMIMEType variable to reply templateLeszek Cimała
2020-01-09remove Original* checkLeszek Cimała
2020-01-09create OriginalMail structLeszek Cimała
2020-01-05maildir/notmuch: don't re-encode readersReto Brunner
2020-01-05imap: decode reader prior to returning themReto Brunner
2020-01-05FetchBodyParts: decode source in the workersReto Brunner
Previously the workers returned a mixture of decoded / encoded parts. This lead to a whole bunch of issues. This commit changes the msgviewer and the commands to assume parts to already be decoded
2020-01-05models: add BodyStructure.PartAtIndexReto Brunner
2020-01-05msgviewer: decode headers prior to displaying themReto Brunner
2020-01-05msgviewer: bypass filter for headersReto Brunner
2020-01-05msgviewer: do not anchor ansi escape to start of lineReto Brunner
2020-01-05Reword aerc-tutorial with revised constraintsDrew DeVault
This document used to specify some constraints on the receipient address, but this has since been corrected in aerc.
2020-01-05Don't select completions until tab has been pressedBen Burwell
Before, pressing <Enter> when completions were visible would execute the selected completion. As soon as completions were provided, the first item would be selected. This could cause issues e.g. when changing folders: :cf <Enter> Previously, this would have selected the first folder in the list. Now, since <Tab>, <C-n>, etc have not been pressed to select the first completion, the command above simply executes `:cf `. To accomplish this, a "no-op completion" has been added at index -1.
2020-01-04Fix double >\n when quoting empty lineSrivathsan Murali
2019-12-30Handle MIME encoded addresses in address bookBen Burwell
When addresses contain special characters, net/mail MIME-encodes them to a valid RFC 5322 address for use in headers. However, these are not pleasant for human consumption, so we decode them for use in the completion list. Aerc properly encodes addresses when the message is sent. This patch also removes surrounding white space from contact names, if present.
2019-12-27msgviewer: Add Labels as a virtual headerReto Brunner
In order to accommodate for that, the headerlayout needed to be rewritten to pass the filter criteria back to the msgviewer, instead of just using the normal headers.
2019-12-27Add labels to index format (%g)Reto Brunner
Exposes the notmuch tags accordingly, stubs it for the maildir worker.
2019-12-24Add missing man pages to uninstall target in MakefileAriel Popper