about summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* FindFirstNonMultipart: return the proper pathReto Brunner2021-03-071-1/+1
| | | | There was a bug that lead to the wrong path being returned by the function.
* Fix linter warningsReto Brunner2021-02-261-1/+1
| | | | | | * Remove redundant return (code was never reached) * Remove redundant type information * Rename unused function parameters to "_"
* Refactor lib/open to accept user provided argumentsReto Brunner2021-01-302-33/+51
| | | | | | | | | | | | * Get rid of open_darwin It just lead to code duplication for a simple one string change. Instead we query it during initialization * Accept user provided arguments "open" on MacOS accepts things like -A to use a specific application Pass trough arguments the user provided in order to facilitate this * Refactor the function to a struct This makes it more convenient for the caller and avoids signatures like lib.OpenFile(nil, u.String(), nil) which are fairly unreadable
* update tcell to v2 and enable TrueColor supporty0ast2020-12-1811-12/+12
| | | | | | | | | Also update to the tcell v2 PaletteColor api, which should keep the chosen theme of the user intact. Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop clipping the value to one of the theme colors. Generally this is desired behaviour though.
* format: remove parse methods, use the one from go-messageReto Brunner2020-11-141-32/+1
|
* compose: use a proper header instead of a string mapReto Brunner2020-11-142-33/+50
| | | | | | | | | | | | | Prior to this commit, the composer was based on a map[string]string. While this approach was very versatile, it lead to a constant encoding / decoding of addresses and other headers. This commit switches to a different model, where the composer is based on a header. Commands which want to interact with it can simply set some defaults they would like to have. Users can overwrite them however they like. In order to get access to the functions generating / getting the msgid go-message was upgraded.
* templates: Remove ParseTemplate as it's unusedReto Brunner2020-11-141-14/+0
|
* remove models.Address in favor of go-message AddressReto Brunner2020-11-141-9/+30
| | | | | | | We made a new type out of go-message/mail.Address without any real reason. This suddenly made it necessary to convert from one to the other without actually having any benefit whatsoever. This commit gets rid of the additional type
* templates: better error messageReto Brunner2020-11-111-2/+3
|
* refactor ParseMessageFormat to use a ctx objectReto Brunner2020-10-141-54/+60
|
* Remove unused Simulator interfaceReto Brunner2020-09-101-5/+0
|
* fix comment in ParseAddressListReto Brunner2020-09-101-3/+1
| | | | | | | Go pre 1.15 parsed an empty string as an error, 1.15 did not but this was unintentional as per https://github.com/golang/go/issues/40803 Fix the comment accordingly
* ParseAddressList: return empty list if "" is providedReto Brunner2020-08-241-0/+6
| | | | | | | | | Go 1.15 handles "" in the address parser as a non error case, returning an empty list. Prior versions returned an error, which is not what we want. Reported-by: anianz <a.ziegler@cioplenu.de> Tested-by: anianz <a.ziegler@cioplenu.de>
* Localize timestamps in the message listReto Brunner2020-08-221-2/+2
| | | | | Not sure we need a flag for it, most people expect times to be in their local time anyhow.
* base models.Address on the mail.Address typeReto Brunner2020-08-201-16/+44
| | | | | | | | | | | | This allows us to hook into the std libs implementation of parsing related stuff. For this, we need to get rid of the distinction between a mailbox and a host to just a single "address" field. However this is already the common case. All but one users immediately concatenated the mbox/domain to a single address. So this in effects makes it simpler for most cases and we simply do the transformation in the special case.
* Add `oauthbearer` support for SMTPR Chowdhury2020-08-131-2/+2
| | | | | | | | | This piggybacks on the existing IMAP support, and uses the same configuration format (my local testing example has the IMAP and SMTP lines almost copy-pasted from one another). It's a little clumsy in that a new token is negotiated for every `Send()` command, but it's a start...
* improve date parsing for notmuch/maildirReto Brunner2020-08-101-2/+18
| | | | | | | | | | | | | | | | | | | | If a message date would fail to parse, the worker would never receive the MessageInfo it asked for, and so it wouldn't display the message. The problem is the spec for date formats is too lax, so trying to ensure we can parse every weird date format out there is not a strategy we want to pursue. On the other hand, preventing the user from reading and working with a message due to the error format is also not a solution. The maildir and notmuch workers will now fallback to the internal date, which is based on the received header if we can't parse the format of the Date header. The UI will also fallback to the received header whenever the date header can't be parsed. This patch is based on the work done by Lyudmil Angelov <lyudmilangelov@gmail.com> But tries to handle a parsing error a bit more gracefully instead of just returning the zero date.
* Implement style configuration.Kalyan Sriram2020-08-065-60/+48
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Revert "Implement style configuration."Reto Brunner2020-07-305-48/+60
| | | | This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
* Implement style configuration.Kalyan Sriram2020-07-305-60/+48
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Remove hard coded bodystruct path everywhereReto Brunner2020-07-271-0/+38
| | | | | | | Aerc usually used the path []int{1} if it didn't know what the proper path is. However this only works for multipart messages and breaks if it isn't one. This patch removes all the hard coding and extracts the necessary helpers to lib.
* run go fmtReto Brunner2020-07-171-2/+2
|
* Remove deleted messages from search/filter resultsAndrew Jeffery2020-07-101-0/+9
| | | | | This ensures that when moving/deleting messages with a filter active the view gets updated properly.
* Add additional flagging functionalityARaspiK2020-07-082-5/+6
| | | | | | | | | | | | | | More mail flags can now be set, unset, and toggled, not just the read/seen flag. This functionality is implemented with a new `:flag` and `:unflag` command, which are extensions to the matching `:read` and `:unread` commands, adding support for different flags. In fact, the `read`/`unread` commands are now recognized aliases to `flag`/`unflag`. The new commands are also well documented in aerc(1). The change mostly extends the previous read/unread setting functionality by adding a selection for the flag to change.
* Allow open to be asynchronousAndrew Jeffery2020-07-082-4/+26
| | | | | | This stops the ui being blocked while the resource is opened. The wait ensures that resources are reclaimed when the process finishes while aerc is still running.
* Fix a nil Envelope when getting the formatAndrew Jeffery2020-07-031-0/+48
| | | | | When getting the format for a message the envelope can be nil and this shouldn't crash the program.
* Fix dates in reply/forward commands.Reto Brunner2020-06-261-3/+2
| | | | | | The data was passed around as a string for some reason, which led to time precision loss and wrong dates being displayed. Simply pass the time as is to fix that.
* Make grid sizes dynamicJeffas2020-06-091-10/+16
| | | | | | | | | The grid used static sizes which meant that changing settings didn't have an effect on elements of the ui, notably the sidebar width. This patch makes the `Size` parameter of a cell a function which returns the `int`, allowing for dynamic sizes. A `Const` function is also included for ease of use for static sizes.
* Revert "Add Style configuration"Drew DeVault2020-05-285-48/+60
| | | | This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
* Add Style configurationReto Brunner2020-05-275-60/+48
| | | | | | | | | | The following functionalities are added to configure aerc ui styles. - Read stylesets from file with very basic fnmatch wildcard matching - Add default styleset - Support different stylesets as part of UiConfig allowing contextual styles. - Move widgets/ui elements to use the stylesets. - Add configuration manual for the styleset
* Set AnsweredFlag on successful replySrivathsan Murali2020-05-251-0/+9
|
* pgp: fail gracefully from email decryptionRay Ganardi2020-05-251-7/+11
| | | | | Aerc panics when there's an error on email decryption. Instead, an error message should be shown.
* FetchBodyPart doesn't need the parent body structureReto Brunner2020-05-172-7/+4
|
* imap: Remove FetchMessageBodyPart.{Encoding,Charset}Reto Brunner2020-05-161-13/+2
| | | | Fixes https://todo.sr.ht/~sircmpwn/aerc2/352 exactly as suggested by emersion.
* templates: add version funcReto Brunner2020-05-061-0/+8
| | | | Fixes #316
* lib/messageview: mark messages as readReto Brunner2020-05-061-0/+1
| | | | | | | | | Currently at least the notmuch and maildir worker only set messages as read if a body part is fetched. The gpg abstraction however fetches the full message. We can simply set the readstate when we create the messageview, avoiding the issue. Once this is merged, we can cleanup both workers.
* libui: don't require beeper for main contentDrew DeVault2020-05-051-2/+4
|
* Fix array out of bounds errorburrowing-owl2020-05-051-1/+1
|
* store.FetchFull: Change callback type to expose entire messageBen Fiedler2020-05-012-6/+8
| | | | | This is a prerequisite for allowing the FetchFull message to return both the message content and the message headers.
* Remove ability to specify headers in the editorReto Brunner2020-04-241-4/+5
| | | | | | | | | | Due to headers being essentially free text, we constantly run into issues with parts of the body being interpreted as headers. Remove the ability to overwrite headers to avoid that, while keeping the ability to specify headers in the template files. Fixes #383
* fix: Close unused MessageView when swapping viewRay Ganardi2020-04-201-0/+5
| | | | | | | Closes https://todo.sr.ht/~sircmpwn/aerc2/379 The old `MessageView` was not closed when replacing the tab content, which causes a memory leak.
* Add pinned tabsJeffas2020-03-091-5/+62
| | | | | | This adds the commands pin-tab and unpin-tab. Once pinned a tab lives on the left of the tabstrip and has a configurable marker, defaulting to ` before its name.
* Initial support for PGP decryption & signaturesDrew DeVault2020-03-034-0/+217
|
* Add move-tab commandJeffas2020-03-031-0/+41
|
* remove the dirInfoUpdateRequest functionalityReto Brunner2020-02-291-15/+0
| | | | | The notmuch worker followed suit in handling the dirInfo submission manually. That removes the last user so we might as well remove the functionality.
* Don't show empty message while sortingJeffas2020-02-281-4/+8
| | | | | | This changes the ui to show the spinner while we are sorting. It only shows one line of the spinner since there are an unknown number of messages at this time.
* toLocal template functionsqwishy2020-02-251-0/+5
| | | | | | | | | | Hi. This adds a template function to convert a time to the local time zone. And modifies the default quoted_reply template to use it and show the time zone when formatting the timestamp of the quoted message. Previously, the quoted message timestamp was UTC and it would format it without the time zone. And I thought it might be a little confusing or weird to some normal people when I email them and I don't want normal people to be confused or think that I'm weird.
* lib/msgstore: debounce directoryUpdateRequestsReto Brunner2020-02-251-3/+17
| | | | | | | | Apparently sending an event for every incoming messageInfo slows down the application significantly. Therefore this slows down the emmision rate, on the cost of being out of date in some cases.
* Revert "Only fetch the directory contents when we are switching directories"Reto Brunner2020-02-191-0/+8
| | | | | | | This reverts commit bd4df530095ee343778a59120a9e641c01010b0f. I did not properly untangle the opening / dirlist update of each other. This interferes with the imap worker, hence the revert
* Request DirInfo whenever the unread count may have changedReto Brunner2020-02-161-0/+9
| | | | | | | 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