aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add address book completion in composerBen Burwell2019-12-215-5/+204
| | | | | Complete email address fields in the message composer with an external address book command, compatible with mutt's query_cmd.
* Don't use current input as a possible completionBen Burwell2019-12-211-1/+0
| | | | | Now that completions are being shown in the popover, it doesn't make sense to show the unfinished command as a potential completion.
* Show textinput completions in popoversBen Burwell2019-12-216-71/+277
| | | | | | Rather than showing completions inline in the text input, show them in a popover which can be scrolled by repeatedly pressing the tab key. The selected completion can be executed by pressing enter.
* Add popoversBen Burwell2019-12-213-9/+102
| | | | | | | | | | | | A popover is a special UI element which can be layered over the rest of the UI (i.e. it is painted last) and can fall anywhere on the screen, not just with the bounds of its parent's viewport/context. With these special abilities comes the restriction that only one popover may be visible on screen at once. Popovers are requested from the UI context passed to Draw calls and specify the anchor point and the desired dimensions. The popover is then fit to the available space and placed relative to the anchor point.
* Use timestamp-format in msgviewerBen Burwell2019-12-191-3/+3
| | | | | This allows the time to be displayed in a user-configurable way. Also localize the time in the message viewer as it is in the message list.
* Update go-maildir to latestBen Burwell2019-12-192-1/+3
| | | | | | This fixes an upstream issue where improperly named maildir files could cause a panic. Now, we simply show an error and don't display the message if the backing file is not named according to the maildir spec.
* Break early when delete happens in outdated stateKiril Vladimiroff2019-12-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A panic could happen when multiple delete messages are sent one after another without waiting until there are no messages left to be deleted: panic: runtime error: makeslice: len out of range goroutine 1 [running]: git.sr.ht/~sircmpwn/aerc/lib.(*MessageStore).Update(0xc000592e00, 0xa8fe60, 0xc0003340f0) /go/src/git.sr.ht/~sircmpwn/aerc/lib/msgstore.go:222 +0x5b8 git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).onMessage(0xc0000a0460, 0xa8fe60, 0xc0003340f0) /go/src/git.sr.ht/~sircmpwn/aerc/widgets/account.go:251 +0x307 git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).Tick(0xc0000a0460, 0xc0001496b0) /go/src/git.sr.ht/~sircmpwn/aerc/widgets/account.go:90 +0xa1 git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Tick(0xc0000a9f40, 0xc000020501) /go/src/git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:123 +0x91 main.main() /go/src/git.sr.ht/~sircmpwn/aerc/aerc.go:182 +0x5bf The make that blows up is: uids := make([]uint32, len(store.uids)-len(msg.Uids)) This change simply checks whether the make is going to be valid before starting to work on the actual delete. If there are more messages queued to be deleted than what's left in the store, then we're obviously in an inconsistent state, ask for an update and break.
* Composer: fix EOF errorsDrew DeVault2019-12-121-6/+10
| | | | | PrepareHeaders generated a fresh message ID and Date header every time. This instead generates those headers in advance.
* Add custom sorting for foldersMichele Finotto2019-12-093-2/+41
| | | | | | | | | | | | | | A new config options for accounts.conf (folders-sort) was added to allow a user to choose which folders should be shown on top. My use case was to avoid stepping into heavy, but rarely viewed folders when cycling through other often accessed ones. To test add this to your account.conf: folders-sort = INBOX,Sent,Archive INBOX, Sent and Archive should then show at the top of your dirlist, and all other folders should come next in alphabetical order.
* remove garbage headers in reply messageLeszek Cimała2019-12-081-1/+2
| | | | | | Very important fix. Remove garbage from reply message headers. Till now all Original fields were send in reply, which we do not want and could lead to uncorrect email message.
* failback to Content-Type filename when encoded Content-Disposition is usedLeszek Cimała2019-12-072-0/+5
| | | | | | | | | | | | | | | | | | | | | Hi! This patch will fix missing filename if it is RFC2231 encoded with charset different then ASCII or UTF8. Example how it looks like in mail: Content-Type: application/pdf; name="=?UTF-8?Q?Opis_przedmiotu_zam=c3=b3wienia_-_za=c5=82=c4=85cznik_nr_1?= =?UTF-8?Q?=2epdf?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0*=iso-8859-2''%4F%70%69%73%20%70%72%7A%65%64%6D%69%6F%74%75%20; filename*1*=%7A%61%6D%F3%77%69%65%6E%69%61%20%2D%20%7A%61%B3%B1%63%7A%6E; filename*2*=%69%6B%20%6E%72%20%31%2E%70%64%66 Yes, this should be forbidden :-). Anyway, best solotion in such cases is to failback to Content-Type name. I am not sure if it is guaranted to be there, but probably it will. Leszek
* decode(RFC 2047) imap headers to fix encoding in subject & filenamesLeszek Cimała2019-12-071-5/+25
| | | | | | | | | | | | | | | | | | Me again, this time fixing encoding of subjects and attachments. It was problem in IMAP backend. While other backends user MessageInfo() function which generates MessageInfo decoded via go-message methodes, IMAP worker is creating MessageInfo directly, so all non-utf8 subjects and filenames were in raw form. This patch fixes it. Not sure if we should care about errors (if DecodeHeader fails it returns raw string back). >From what I see, this should solve all encoding problem (tested only IMAP). So, now I can focus on features. ;-) Have a great weekend! Leszek
* use correct headers for message partLeszek Cimała2019-12-071-4/+32
| | | | | | | | | | | | | | | | | | | | | Hello guys, on the hunt for bugs related to wrong encoding. This patch is fixing reply to non-utf8 messages. We were using global message headers instead of part specific. In practice header were often something like: multipart; boundry=... where there should be: text/plain; charset=... Fixed also missing SubType. Have great weekend! Leszek
* fix non-utf8 encoding in msgviewerernierasta2019-12-071-2/+2
| | | | | | | | This patch should fix encoding problem with non-utf8 text/plain mime. It is now correctly convert to utf8 before sending to pager. It will also solve quoting such mails. Leszek
* fix make install directiories permissionsLeszek Cimała2019-12-071-1/+1
| | | | | | | | | Hi everyone! On my system I have strict umask set, so make install creates them unreadable by non-root. This trivial fix ensures, that directories are created as expected. Leszek
* Parse headers from templateRobert Günzler2019-12-071-3/+50
| | | | | | | | | | | This patch parses the processed template for headers and populates matching header editors. Those are then stripped from the template body before prepending the template and remaining header fields to the composer content. The main motivation for this is keeping receiver, sender and subject lines in the template file and generating the message subject from the date.
* Initialize an empty message map in the message store on initializationRafael Castillo2019-12-071-2/+3
| | | | | This addresses occasional crashes when a `MessageInfo` event reached the message store before `DirectoryContents`, particularly on slower (imap) accounts.
* Revert "Parse headers from template"Drew DeVault2019-12-041-39/+3
| | | | This reverts commit 31e3e9f56e0b8123f0238537112496b407055aef.
* Fix crash when no message is selectedWiktor Kwapisiewicz2019-12-041-1/+4
| | | | | | | | | | | Pressing `Enter` on a view that has not yet loaded messages (e.g. at startup) would return `nil` from `Selected()`. Accessing `msg.Uid` on a `nil` reference crashes aerc. This patch moves the `msg == nil` check before accessing `msg.Uid` thus avoiding the crash. To test this patch repeatedly press `Enter` on startup.
* Parse headers from templateRobert Günzler2019-12-041-3/+39
| | | | | | | | | | | Parse the processed template for headers and populates matching header editors accordingly. Those are then stripped from the template body before prepending it and remaining header fields to the composer content. The motivation for this is keeping receiver, sender and subject lines in the template file and generating the message subject with the date functions.
* Fix crash if there is no to address for %FThorben Günther2019-11-251-1/+1
|
* widgets/terminal: Reap more zombiesKevin Kuehler2019-11-211-0/+1
| | | | | | | The editor and pager were not properly being reaped, causing resource leakage whenever a user replies to a message. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Update version to 0.3.00.3.0Drew DeVault2019-11-211-1/+1
|
* Install aerc-templatesSrivathsan Murali2019-11-191-0/+1
|
* Parse Reply-To header while parsing envelopeSrivathsan Murali2019-11-171-0/+5
|
* Allow fields in compose widget to be clickedGreg Anders2019-11-171-2/+32
| | | | | When the mouse is enabled, clicking on a header field switches focus to that field (likewise for the terminal).
* commands/account: Disable :view for deleted msgsKevin Kuehler2019-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Allowing the user to view deleted messages creates all sorts of race conditions. The most devious race condition is pv.source can be set to a nil while another PartViewer is still running a goroutine in attemptCopy. Here is a trace when this happens. goroutine 76 [running]: io.copyBuffer(0x7f8ad02641d0, 0xc00040f590, 0x0, 0x0, 0xc0007cc000, 0x8000, 0x8000, 0x0, 0x0, 0x8b3d60) /usr/lib/go/src/io/io.go:402 +0x101 io.Copy(...) /usr/lib/go/src/io/io.go:364 git.sr.ht/~sircmpwn/aerc/widgets.(*PartViewer).attemptCopy.func4(0xc00017efd0, 0xc0004da7c0) /home/keur/repos/aerc/widgets/msgviewer.go:576 +0x611 created by git.sr.ht/~sircmpwn/aerc/widgets.(*PartViewer).attemptCopy /home/keur/repos/aerc/widgets/msgviewer.go:544 +0x144 We could add a guard in store.FetchBodyPart to only call the callback when msg.Part.Reader != nil, but we still get a hanging pager. Therefore it seems more reasonable to disable this completely. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Complete the F rune.Srivathsan Murali2019-11-174-6/+27
| | | | | %F now shows the auth name or recepient name/address if the message is from you.
* Add UI options to save/pipe messages with unsupported mimetypesGreg Anders2019-11-177-123/+163
| | | | | | | | | | | | | | | Adds a message indicating the user's ability to :save or :pipe a message with an unsupported mimetype and also adds a selector widget (similar to the tutorial). The selector widget was previously defined in the account wizard module, so this commit breaks it out into its own module to allow for re-use. Further, modify the BeginExLine() function to take an argument that pre-populates the command line, allowing functions to initiate an ex command without executing it. Closes #95.
* Check for terminal before forwarding mouse eventGreg Anders2019-11-171-1/+1
| | | | | | | When viewing a message part with no available filter, clicking the UI would cause a nil pointer dereference because the MouseEvent was passed to the PartViewer's `term` field, which does not exist in the case of an absent filter.
* worker/imap: Fix seqMap race conditionKevin Kuehler2019-11-101-1/+3
| | | | | | | | | | When deleting a message, sometimes FetchDirectoryContents will fire. FetchDirectoryContents will return a smaller set of UIDs since messages have been deleted. This operation races with fetching from the seqMap in client.ExpungeUpdate. Only recreate the seqMap if it can grow so that messages will continue to be expunged. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Correct capitalization in quoted_replyDrew DeVault2019-11-103-16/+40
|
* Add some defaults for template optionsDrew DeVault2019-11-103-5/+15
|
* Add Templates with ParsingSrivathsan Murali2019-11-1014-143/+510
| | | | | | | | | | | | | | | + Changes NewComposer to return error. + Add lib to handle templates using "text/template". + Add -T option to following commands - compose. - reply - forward + Quoted replies using templates. + Forwards as body using templates + Default templates are installed similar to filters. + Templates Config in aerc.conf. - Required templates are parsed while loading config. + Add aerc-templates.7 manual for using template data.
* widgets/msgviewer: Don't crash if pager is nilKevin Kuehler2019-11-101-1/+1
| | | | Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Add support for AUTH LOGIN submissionLuke Drummond2019-11-014-1/+10
| | | | | | | | | | | `go-sasl` upstream added support [1] for the obsolete [2] AUTH LOGIN method which enables aerc to send email via servers which remain common in the wild. Fixes ~sircmpwn/aerc2#263 [1] https://github.com/emersion/go-sasl/commit/61afe53d [2] https://datatracker.ietf.org/doc/draft-murchison-sasl-login/
* Notmuch: be resilient to config errorsReto Brunner2019-11-011-3/+22
| | | | | | | | Right now notmuch panics if something goes wrong in the configure event. This patch checks for that and returns an error instead, so that we can at least get the UI up and running (and all the other accounts) The experience will be completely degraded until another configure event occurs.
* notmuch: ignore comments and blank lines when processing query-map fileMatt Snider2019-11-011-0/+4
| | | | | A segmentation fault occurs when using the notmuch backend and a `query-map` file that contains blank lines or comments.
* widgets/msgview: Reap the filter commandKevin Kuehler2019-10-161-0/+1
| | | | | | | | The filter command shells out and returns almost immediately. Call Wait() so the filter process gets reaped. Prior to this patch, aerc creates a zombie process for every email that is viewed. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Cleanup pager processes after closing a msgviewerKevin Kuehler2019-10-162-0/+18
| | | | | | | | | A pager is spawned every time an email is viewed but not killed off when quitting the msgviewer, thus leading to process leakage. This patch fixes this by adding a Close method to the msgview widget, which is called in the close command. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Fix: oauthbearer runtime errorFrode Aannevik2019-10-161-6/+7
| | | | | | | | | | | | Configure an oauthbearer source without a token_endpoint parameter would panic due to nil pointer dereference Example source=imaps+oauthbearer://frode.aa%40gmail.com@imap.gmail.com:993 source-cred-cmd=pass oatuh2 frode.aa@gmail.com token_endpoint is not required as it will use the provided password as access_token when it is not set
* lib/msgstore: fix invalid callback invocationReto Brunner2019-10-141-1/+1
| | | | | creating a directory must not invoke the callback, as this is meant for the completion of the move
* Fix tab refocus on removeJeffas2019-10-141-8/+14
| | | | | | | | Previously removing a tab would always pop from the history of tabs. This checks to see if the closing tab is the one selected, if it is then we use the history, otherwise we only need to change the selected tab if it was after (to the right of) the closing tab, in which case we just decrement the selected index.
* Fix pushing invalid tabs to historyJeffas2019-10-141-1/+4
| | | | A tab can now only be pushed onto the history if it is a selectable tab.
* Revert "Show spinner when fetching contents"Drew DeVault2019-10-092-9/+3
| | | | This reverts commit 1339faf7881f33762c6e0a4915404e362fc51de1.
* Preserve sorting order in search resultsJeffas2019-10-092-0/+18
| | | | | This ensures that the search results follow the order of the current sort so that cycling throught the results proceeds in displayed order.
* Show spinner when fetching contentsJeffas2019-10-092-3/+9
| | | | | The spinner should be shown when fetching the contents as we don't know at that point whether there are some messages or not.
* Fix selected account to return for messageviewerJeffas2019-10-021-4/+6
| | | | | | This ensures that the selectedaccount is returned if currently selected tab is a messageviewer. This also makes it more extensible for adding other ways of getting the selected account.
* Open mailto links in a new aerc instance if needed.Reto Brunner2019-09-291-2/+17
| | | | | | | | | | | | | Aerc tries to open mailto:// links via the socket of the already running aerc instance. If no socket exists this silently errored out. This commit starts up a new aerc instance if it can't connect to the socket (which I think is the most common error) and if not sets up a new aerc instance and retries to open the compositor. This fixes https://todo.sr.ht/~sircmpwn/aerc2/295 by implementing the desired behaviour.
* Print success to socket if no error was thrownHeiko Carrasco2019-09-291-1/+5
| | | | | | | When Reto Brunners patch is applied (which works really well for me), the user gets to see the message returned by AercServer. Since this is nil if no errors were thrown it prints "result: <nil>" to the cmd. This patch fixes that by just returning success instead of the error message when err != nil.