about summary refs log tree commit diff stats
path: root/commands/account
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Implement :mkdir commandDrew DeVault2019-06-091-0/+39
|
* widget: Add ProvidesMessage interfaceKevin Kuehler2019-06-025-370/+1
| | | | | | | | | | | Consists of 3 functions * Store: Access to MessageStore type * SelectedAccount: Access to Account widget that the target widget belongs to * SelectedMessage: Current message (selected in msglist or the one we are viewing) Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Fix infinite recursion in reply.go:findPlaintextDrew DeVault2019-06-021-1/+1
|
* Fetch plaintext part when replyingDrew DeVault2019-06-011-6/+34
|
* Add :save and :pipe commands to viewerGalen Abell2019-05-271-37/+3
| | | | | | | | | * :save takes a path and saves the current message part to that location * :pipe is the same as pipe on the account page, but uses the current message part rather than the whole email (ie :pipe gzip -d) * Refactored account:pipe and extracted common pipe code to commands.util.QuickTerm * Added helper command aerc.PushError
* Implement :forwardDrew DeVault2019-05-251-31/+81
|
* Fix special characters in address.PersonalNameDrew DeVault2019-05-251-16/+24
|
* Flesh out multipart switcherDrew DeVault2019-05-201-2/+2
|
* pipe.go: let tab widget handle ellipsisDrew DeVault2019-05-201-2/+1
|
* Missed a spotDrew DeVault2019-05-191-0/+1
|
* Rename :delete-message et al to :delete et alDrew DeVault2019-05-194-2/+6
|
* Advance cursor after :delete and :moveDrew DeVault2019-05-192-0/+2
| | | | So that you can repeat the action on the next message if appropriate
* Fix scdoc & gofmt issuesDrew DeVault2019-05-183-12/+7
|
* s/aerc2/aerc/gDrew DeVault2019-05-1712-15/+15
|
* Improve reply-all recipient enumeration strategyDrew DeVault2019-05-161-0/+16
|
* Decode email when reading it for quotingDrew DeVault2019-05-161-2/+25
|
* Don't prefix Re: if prefix already presentDrew DeVault2019-05-161-1/+6
|
* Implement :reply -q and :reply -aDrew DeVault2019-05-161-19/+61
|
* Implement (basic form) of :replyDrew DeVault2019-05-161-0/+83
|
* Copy sent emails to the Sent folderDrew DeVault2019-05-151-1/+2
| | | | Or rather, to a user-specified folder
* Implement move, mv commandsDrew DeVault2019-05-141-0/+38
|
* Implement :copy (aka :cp)Drew DeVault2019-05-142-1/+51
|
* Update tab name as subject changesDrew DeVault2019-05-142-9/+10
| | | | Also moves truncation to the tab widget