aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-04Revert "Parse headers from template"Drew DeVault
This reverts commit 31e3e9f56e0b8123f0238537112496b407055aef.
2019-12-04Fix crash when no message is selectedWiktor Kwapisiewicz
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.
2019-12-04Parse headers from templateRobert Günzler
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.
2019-11-25Fix crash if there is no to address for %FThorben Günther
2019-11-21widgets/terminal: Reap more zombiesKevin Kuehler
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>
2019-11-21Update version to 0.3.00.3.0Drew DeVault
2019-11-19Install aerc-templatesSrivathsan Murali
2019-11-17Parse Reply-To header while parsing envelopeSrivathsan Murali
2019-11-17Allow fields in compose widget to be clickedGreg Anders
When the mouse is enabled, clicking on a header field switches focus to that field (likewise for the terminal).
2019-11-17commands/account: Disable :view for deleted msgsKevin Kuehler
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>
2019-11-17Complete the F rune.Srivathsan Murali
%F now shows the auth name or recepient name/address if the message is from you.
2019-11-17Add UI options to save/pipe messages with unsupported mimetypesGreg Anders
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.
2019-11-17Check for terminal before forwarding mouse eventGreg Anders
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.
2019-11-10worker/imap: Fix seqMap race conditionKevin Kuehler
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>
2019-11-10Correct capitalization in quoted_replyDrew DeVault
2019-11-10Add some defaults for template optionsDrew DeVault
2019-11-10Add Templates with ParsingSrivathsan Murali
+ 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.
2019-11-10widgets/msgviewer: Don't crash if pager is nilKevin Kuehler
Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-11-01Add support for AUTH LOGIN submissionLuke Drummond
`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/
2019-11-01Notmuch: be resilient to config errorsReto Brunner
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.
2019-11-01notmuch: ignore comments and blank lines when processing query-map fileMatt Snider
A segmentation fault occurs when using the notmuch backend and a `query-map` file that contains blank lines or comments.
2019-10-16widgets/msgview: Reap the filter commandKevin Kuehler
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>
2019-10-16Cleanup pager processes after closing a msgviewerKevin Kuehler
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>
2019-10-16Fix: oauthbearer runtime errorFrode Aannevik
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
2019-10-14lib/msgstore: fix invalid callback invocationReto Brunner
creating a directory must not invoke the callback, as this is meant for the completion of the move
2019-10-14Fix tab refocus on removeJeffas
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.
2019-10-14Fix pushing invalid tabs to historyJeffas
A tab can now only be pushed onto the history if it is a selectable tab.
2019-10-09Revert "Show spinner when fetching contents"Drew DeVault
This reverts commit 1339faf7881f33762c6e0a4915404e362fc51de1.
2019-10-09Preserve sorting order in search resultsJeffas
This ensures that the search results follow the order of the current sort so that cycling throught the results proceeds in displayed order.
2019-10-09Show spinner when fetching contentsJeffas
The spinner should be shown when fetching the contents as we don't know at that point whether there are some messages or not.
2019-10-02Fix selected account to return for messageviewerJeffas
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.
2019-09-29Open mailto links in a new aerc instance if needed.Reto Brunner
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.
2019-09-29Print success to socket if no error was thrownHeiko Carrasco
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.
2019-09-20Config for deleting message from message viewerSrivathsan Murali
As suggested in #268, this adds a behaviour setting for deleting message from message viewer.
2019-09-20Sort path completionsJeffas
2019-09-20Change search flagsJeffas
This changes the search flags for maildir and imap backends. They now no longer use -t for searching all text. This seems to make more sense as being the targeted recipient. I have similarly added Cc for -c. The text search now resides under -a for all text.
2019-09-20Make commands join args with spacesJeffas
This patch ensures the following commands join their arguments with spaces to make it easier to interact with: - cf - mkdir - cd - attach - detach - ct - copy - move - save
2019-09-20notmuch: add sort functionalityReto Brunner
2019-09-20Add documentation for sortJeffas
This adds documentation for the config option and the command.
2019-09-20Add sorting functionalityJeffas
There is a command and config option. The criteria are a list of the sort criterion and each can be individually reversed. This only includes support for sorting in the maildir backend currently. The other backends are not supported in this patch.
2019-09-18Add directory info messagesJeffas
This populates the directory info model properly when requested, allowing the fields to be relied upon elsewhere. This also sends the dirinfo when new messages come in.
2019-09-18Focus new tab after removeJeffas
After removing a tab we should focus the newly selected tab if it is Interactive. This ensures things like the terminal get drawn properly.
2019-09-18Revert "Fix out-of-order messages by sorting as we display"Drew DeVault
This reverts commit ac99d9ed62644cf0259bdd79481b28c3fbcef650.
2019-09-16Add search documentation for maildir backendJeffas
2019-09-16Add basic searching to the maildir backendJeffas
Basic searching is supported with the following: - read messages - unread messages - from addresses - text in body - text in subject - text in all The implementation loops through all messages in the selected directory. It tries to be smart by detecting which parts of each message the search query needs to use and only loads these from the filesystem.
2019-09-16notmuch: implement ModifyLabelsReto Brunner
2019-09-16notmuch: sync maildir flagsReto Brunner
Syncs back special notmuch tag like unread to the underlying maildir store
2019-09-16notmuch: extract all notmuch db operations.Reto Brunner
For some reason the current code frequently segfaults due to an invalid C memory address. This commit mediates that by never keeping an object alive longer than absolutely necessary.
2019-09-12Add completion for copyJeffas
2019-09-12widgets: remove duplicate importWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>