aboutsummaryrefslogtreecommitdiffstats
path: root/commands/account
Commit message (Collapse)AuthorAgeFilesLines
* recover: recover emails from tempdir after a crashKoni Marti2022-01-291-0/+110
| | | | | | | | | | | | | | | | | | | implements a recover command that searches the local temp dir for aerc emails. If a file is found and selected, a new composer tab will open with the file contents as the message body. No header data is stored in the temp file and thus this information cannot be recovered. Recover will not remove the temporary file unless the force flag (-f) is explicitly used. This recovery method only works when the editor buffer is saved to disk and the Close() function of the composer has not been called yet. Sending, postponing or quitting will call the Close() function which removes the temporary file completely. After Close() is called, no recovery is possible anymore. Signed-off-by: Koni Marti <koni.marti@gmail.com>
* compose: add default template for new messagesRobin Jarry2022-01-191-0/+3
| | | | | | | Allow defining a default template to use when composing new messages. Add an example to be used for new users. Signed-off-by: Robin Jarry <robin@jarry.cc>
* docs: mention missing -T options for compose and forwardRobin Jarry2022-01-191-1/+1
| | | | | | A template file may be specified for compose and forward as well. Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: add manual {dis,}connect supportRobin Jarry2021-11-051-0/+37
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* go.mod: change base git urlRobin Jarry2021-11-0513-19/+19
| | | | | | | I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
* Get rid of the aerc.PushError(" " + $string) idiomReto Brunner2021-01-302-2/+2
| | | | The individual callers should not be responsible for padding
* handle message unknown charset errorJeff Martin2020-08-311-0/+4
| | | | | | | | | | | | | | This change handles message parse errors by printing the error when the user tries to view the message. Specifically only handling unknown charset errors in this patch, but there are many types of invalid messages that can be handled in this way. aerc currently leaves certain messages in the msglist in the pending (spinner) state, and I'm unable to view or modify the message. aerc also only prints parse errors with message when they are initially loaded. This UX is a little better, because you can still see the header info about the message, and if you try to view it, you will see the specific error.
* Add support for :rmdirARaspiK2020-08-191-0/+96
| | | | | | | | | | | | | | | | | | | | | The `:rmdir` command removes the current directory (`-f` is required if the directory is not empty). This is not supported on the notmuch backend. An issue with the maildir backend is that some sync programs (e.g. offlineimap) may recover the directory after it is deleted. They need to specifically be configured to accept deletions, or special commands need to be executed (e.g. `offlineimap --delete-folder`) to properly delete folders. A danger of using this on the IMAP backend is that it is possible for a new message to be added to the directory and for aerc to not show it immediately (due to a slow connection) - using `:rmdir` at this moment (with `-f` if the directory already contains messages) would delete the directory and the new message that just arrived (and all other contents). This is documented in aerc(1) so that users are aware of possible risks.
* run go fmtReto Brunner2020-07-171-1/+1
|
* Use PushStatus instead of SetStatus where it makes senseHeiko Carrasco2020-07-091-1/+2
|
* Rework msglist scrollingJeffas2020-06-093-5/+5
| | | | | | | | | | | | This changes the scrolling to be done on the draw, when the height is updated, ensuring that the selected item is kept on screen during resizing. Also, this ensures that messages will fill the screen when resizing the window, for instance, shrinking and then growing drags down more messages if possible. This is a transplant of the dirlist scrolling logic.
* Revert "Add Style configuration"Drew DeVault2020-05-282-3/+2
| | | | This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
* Revert "Remove duration from the status methods"Drew DeVault2020-05-282-3/+5
| | | | This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
* Remove duration from the status methodsReto Brunner2020-05-272-5/+3
| | | | We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
* Add Style configurationReto Brunner2020-05-272-2/+3
| | | | | | | | | | 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
* pgp: fail gracefully from email decryptionRay Ganardi2020-05-251-1/+5
| | | | | Aerc panics when there's an error on email decryption. Instead, an error message should be shown.
* gofmt fixesDrew DeVault2020-04-241-1/+1
|
* Add recall commandJeffas2020-04-241-1/+1
| | | | | | This command allows recalling the selected postponed email to edit in the composer. The command only allows recalling from the postpone directory.
* Add postpone commandJeffas2020-04-241-1/+1
| | | | | | | This command uses the Postpone folder from the account config to save messages to. Messages are saved as though they were sent so have a valid 'to' recipient address and should be able to be read back in for later editing.
* Remove ability to specify headers in the editorReto Brunner2020-04-241-1/+1
| | | | | | | | | | 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
* Use aerc.PushError where appropriateBen Fiedler2020-04-231-4/+1
| | | | Forgot an unused import, to save you the hassle here is v2.
* Initial support for PGP decryption & signaturesDrew DeVault2020-03-031-2/+6
|
* create OriginalMail structLeszek CimaƂa2020-01-091-1/+3
|
* 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.
* 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>
* Add Templates with ParsingSrivathsan Murali2019-11-101-9/+15
| | | | | | | | | | | | | | | + 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.
* Make commands join args with spacesJeffas2019-09-202-8/+7
| | | | | | | | | | | | | | | 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
* Add sorting functionalityJeffas2019-09-201-0/+85
| | | | | | | | 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.
* Add signaturesJeffas2019-09-121-2/+2
| | | | | | | | | | | | | This adds the ability for per-account signatures in the accounts.conf config file. The signature is added to emails in the editor at the bottom of the email. This includes when forwarding, replying to, and composing emails. There are two config options: signature-file and signature-cmd. The former allows a signature to be read from a file and the latter allows an arbitrary command to be executed to return the signature. The config options have been documented in aerc-config
* commands: move ParseNextPrevMessage error value to its last return valueWagner Riffel2019-09-041-5/+5
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* all: rewrite references to strings.Index to strings.ContainsWagner Riffel2019-09-041-1/+1
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* all: use fmt.Errorf for fomartting errorsWagner Riffel2019-09-043-3/+3
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* all: purge redundant underscoresWagner Riffel2019-09-0410-30/+30
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* extract search criteria parsing into the backendsReto Brunner2019-08-291-26/+1
|
* Add optional body argument to compose commandDaniel Bridges2019-08-131-3/+14
|
* Joining the args in cf for folders with spacesBen Cohen2019-08-121-1/+5
|
* Ignore scroll command when msgstore is nilJelle Besseling2019-08-121-2/+2
| | | | | | | | | Fixes ~sircmpwn/aerc2#205. Many functions do a nil check on the store, so this changes Store() so it returns nil when msglist is nil. It also places the Scroll() behind the nil check in the next-message command. https://todo.sr.ht/~sircmpwn/aerc2/205
* Let user edit arbitrary headers in composerDaniel Bridges2019-08-121-4/+32
|
* Implement next-message in msgview using accountJelle Besseling2019-08-071-19/+29
| | | | | This makes sure that the next-message command accepts the same arguments in the account view and the msgview
* Implement next-folder using NextPrev with amountJelle Besseling2019-08-071-6/+4
| | | | | | This fixes ~sircmpwn/aerc2#182 https://todo.sr.ht/~sircmpwn/aerc2/182
* ChangeFolder: do not depend on the msgstoreReto Brunner2019-08-021-6/+6
| | | | | We need to clear the filtering etc upon folder switch. Not having a valid msgstore is however no reason not to switch directories.
* Support configurable header layout in compose widgetDaniel Bridges2019-07-261-2/+2
|
* Implement :filter, :clearKevin Kuehler2019-07-193-9/+61
| | | | Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* commands: Don't crash when store is nilKevin Kuehler2019-07-151-0/+3
| | | | | | | On a slow network connection, running these commands without this guard will cause aerc to panic. Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Make :pipe command more genericDrew DeVault2019-07-051-42/+0
|
* Add IMAP folder tab completionGregory Mullen2019-07-041-1/+2
| | | | | Credit for this fix goes to Reto; I guess if we're not gonna be mutt we should probabaly do things correctly.
* Implement basic tab completion supportGregory Mullen2019-06-2911-36/+128
| | | | | Tab completion currently only works on commands. Contextual completion will be added in the future.
* Implement :search, :next-result, :prev-resultDrew DeVault2019-06-262-0/+95
|
* Insert nil check before handling prev/next messageMartin Hafskjold Thoresen2019-06-181-2/+8
| | | | | If these are called before the store is setup, `acct.Store()` returns `nil`, and we SEGFAULT in `MessageStore.nextPrev`.
* commands/msgview: Add next/prev commandsKevin Kuehler2019-06-111-2/+4
| | | | Signed-off-by: Kevin Kuehler <kkuehler@brave.com>