Commit Graph

399 Commits

Author SHA1 Message Date
Reto Brunner 1fbce012ed msg/archive: complete the possible options 2020-04-11 10:46:46 -04:00
Galen Abell 95fb35b701 Try to open attachments with correct extension
The temporary file created when opening an attachment is currently saved
without an extension, which prevents matching on file ending with
xdg-open.
2020-04-06 13:15:56 +02:00
Jeffas 3156d481fe Add pinned tabs
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.
2020-03-09 09:31:02 -04:00
Drew DeVault df20f1cd03 Refactoring: remove store from PartInfo 2020-03-09 09:12:32 -04:00
Drew DeVault f3158b36f1 Initial support for PGP decryption & signatures 2020-03-03 16:49:52 -05:00
Simon Ser 89f1684ea4 Update dependencies
This brings in some bug fixes.
2020-03-03 16:48:35 -05:00
Galen Abell 6ff3c7a1ba Mark sent messages as "seen" in maildir
- Add maildir flags to complement a messages imap flags
- Set the "seen" flag on sent messages when using the maildir backend
- Cleanup AppendMessage interface to use models.Flag for both IMAP and
  maildir
2020-03-03 20:08:37 +01:00
Jeffas 68f179021d Add move-tab command 2020-03-03 20:08:29 +01:00
Reto Brunner 841655a98e msg/delete: remove redundant err check 2020-02-29 14:17:26 +01:00
Reto Brunner bcab8de072 msg/reply: simplify string comparison 2020-02-19 08:34:43 +01:00
Reto Brunner 37fc4d9423 msg/reply: fix address comparison
Compare self address in lowercase, to avoid self-replying when people
put in uppercase versions of the mail.

Reported-By: helby on Freenode
2020-02-16 21:16:49 +01:00
Reto Brunner 6b0483dd92 msgview/open: remove manual decoding 2020-01-20 09:21:29 -05:00
Reto Brunner 5b3acb8034 msgview/save: Adapt to already decoded reader
The functionality was broken since the decoding changes.
This commit also simplifies the code (in my view) to make the application logic
easier to follow.
The docs are updated accordingly (the feature was poorly documented).

As far as I am aware there should be no breaking changes (and is certainly
still in the spec of the prior documentation)
2020-01-20 09:21:28 -05:00
Leszek Cimała d238272bdb add .OriginalMIMEType variable to reply template 2020-01-09 14:31:19 -05:00
Leszek Cimała bf28e23933 create OriginalMail struct 2020-01-09 14:31:19 -05:00
Reto Brunner 9096049f75 FetchBodyParts: decode source in the workers
Previously the workers returned a mixture of decoded / encoded parts.
This lead to a whole bunch of issues.
This commit changes the msgviewer and the commands to assume parts to already
be decoded
2020-01-05 16:02:45 -05:00
Reto Brunner ce42429cbf read: adapt to ProvidesMessages 2019-12-22 16:21:38 -05:00
Reto Brunner 00263bf866 modify-labels: add completion 2019-12-21 11:20:12 -05:00
Reto Brunner a744df724f modify-labels: adapt to ProvidesMessages 2019-12-21 09:27:53 -05:00
Reto Brunner 113de35961 move: adapt to ProvidesMessages 2019-12-21 09:27:52 -05:00
Reto Brunner 7b359be0cd delete: adapt to ProvidesMessages 2019-12-21 09:27:52 -05:00
Reto Brunner c2b31ed7c9 copy: adapt to ProvidesMessages 2019-12-21 09:27:51 -05:00
Reto Brunner 884784ac32 archive: adapt to ProvidesMessages 2019-12-21 09:27:51 -05:00
Reto Brunner 5da58c669c add mark command 2019-12-21 09:27:50 -05:00
Reto Brunner 881a9081a8 add command helpers 2019-12-21 09:27:50 -05:00
Leszek Cimała 4f2892695e failback to Content-Type filename when encoded Content-Disposition is used
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
2019-12-07 14:30:35 -05:00
Leszek Cimała 30aa77c1c9 use correct headers for message part
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
2019-12-07 14:30:20 -05:00
Wiktor Kwapisiewicz abd9e78f02 Fix crash when no message is selected
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-04 09:45:07 -05:00
Kevin Kuehler 4966b912c6 commands/account: Disable :view for deleted msgs
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-17 13:19:42 -05:00
Srivathsan Murali 3ba69edab5 Add Templates with Parsing
+ 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-10 10:15:49 -05:00
Luke Drummond 331b915139 Add support for AUTH LOGIN submission
`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-01 11:02:01 -04:00
Kevin Kuehler be4ea0d96b Cleanup pager processes after closing a msgviewer
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-16 11:13:53 -04:00
Srivathsan Murali 1bedb8fe06 Config for deleting message from message viewer
As suggested in #268, this adds a behaviour setting for
deleting message from message viewer.
2019-09-20 15:23:45 -04:00
Jeffas 043a02d99d Sort path completions 2019-09-20 15:07:05 -04:00
Jeffas 39307a6fa7 Make commands join args with spaces
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-20 15:06:34 -04:00
Jeffas 90d26da58a Add sorting functionality
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-20 14:56:02 -04:00
Jeffas ad0d6319dd Add completion for copy 2019-09-12 23:42:14 -04:00
Jeffas e2d5c456dc Add signatures
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
2019-09-12 16:18:34 -04:00
Reto Brunner a93b4de6f3 Add modify-labels command
This adds the event type as well as the command implementation, but no backend
supports it yet.
2019-09-12 16:17:24 -04:00
Jeffas 282dc44aa6 Check the subject line for lowercase re
This ensures that a message with e.g. "RE: " at the start won't get
another "Re: ".
2019-09-11 12:11:42 -04:00
Jeffas 3c3bc517b5 Ensure mimetype parts are converted to lower case
This ensures that the check for a text message to use in the reply is
performed (more) correctly and so uses the plaintext more often.
2019-09-11 12:11:27 -04:00
Wagner Riffel bdb5e3e658 commands: move ParseNextPrevMessage error value to its last return value
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04 16:30:57 -10:00
Wagner Riffel baa70469c3 all: rewrite references to strings.Index to strings.Contains
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04 16:30:57 -10:00
Wagner Riffel feacca3c5c all: use fmt.Errorf for fomartting errors
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04 16:30:57 -10:00
Wagner Riffel 6838c23478 all: purge redundant underscores
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04 16:30:57 -10:00
Reto Brunner 94b9d557de extract search criteria parsing into the backends 2019-08-29 08:44:10 +09:00
Christopher Vittal ecd803aae4 Add :prompt command
Usage:
    :prompt <prompt> <command...>

Displays the prompt on the status bar, waits for user input, then
appends that input as the last argument to the command and executes it.
The input is passed as one argument to the command, unless it is empty,
in which case no extra argument is added.
2019-08-26 09:48:39 +09:00
Jelle Besseling 1f5293931a Add forwarding as attachment feature
This allows a single message to be forward as attachment with the
:forward -a command
2019-08-20 10:05:51 +09:00
Jelle Besseling 36c6030e81 Add addresses argument to forward command 2019-08-20 10:04:29 +09:00
Jelle Besseling 217e8855f2 Move forward command to it's own file
The two commands did not have much code in common
2019-08-20 10:04:28 +09:00
Drew DeVault 4fc6fee734 Revert "add close command at global level"
This reverts commit f0a0c5aa73.
2019-08-13 10:55:50 +09:00
Aditya Srivastava f0a0c5aa73 add close command at global level 2019-08-13 10:49:34 +09:00
Daniel Bridges 72204d1f24 Add optional body argument to compose command 2019-08-13 10:49:34 +09:00
Ben Cohen 4d95676274 Joining the args in cf for folders with spaces 2019-08-12 09:02:24 +09:00
Jelle Besseling 4478c6a4b7 Ignore scroll command when msgstore is nil
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
2019-08-12 08:58:57 +09:00
Daniel Bridges 5b523880b4 Let user edit arbitrary headers in composer 2019-08-12 08:57:04 +09:00
Art Wild d4416e74ac Fix `unread` command
This fixes ~sircmpwn/aerc2#195. While `read -t` works fine.
The `unread` command is not wired. This patch fixes it.

https://todo.sr.ht/~sircmpwn/aerc2/195
2019-08-08 10:12:17 +09:00
Jelle Besseling 507c90537c Implement next-message in msgview using account
This makes sure that the next-message command accepts the same arguments
in the account view and the msgview
2019-08-07 15:10:24 +09:00
Jelle Besseling 3650b72ca6 Implement next-folder using NextPrev with amount
This fixes ~sircmpwn/aerc2#182

https://todo.sr.ht/~sircmpwn/aerc2/182
2019-08-07 15:02:11 +09:00
Daniel Bridges 0a52124102 Allow cc/bcc command to receive no arguments 2019-08-07 14:07:48 +09:00
Kevin Kuehler 0ceea02720 cc/bcc: Append to existing headers if called twice
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-08-07 14:07:22 +09:00
Ben Burwell 63f934ee71 Fix directory completion case sensitivity
Before, lower_only was not being correctly set and was only considering
whether the string ended with a lowercase sequence. Refactored this with
some more explicit functions as the logic is a little confusing.
2019-08-03 10:48:47 -04:00
Daniel Bridges f4b7741463 Add cc and bcc commands 2019-08-03 10:43:55 -04:00
Aditya Srivastava b72bb27cb4 select next message when deleting from message viewer 2019-08-02 09:36:41 -04:00
Reto Brunner 3424c36d52 ChangeFolder: do not depend on the msgstore
We need to clear the filtering etc upon folder switch.
Not having a valid msgstore is however no reason not to switch directories.
2019-08-02 09:26:10 -04:00
Galen Abell bfefafff27 Add filesystem completions for :attach and :cd
Tab-completions now cycle through filesystem paths when using :attach or
:cd commands.
2019-08-02 09:22:40 -04:00
Galen Abell c4b57aaad8 Add CompletePath method
CompletePath takes an existing path and returns possible filesystem
completions based on that path.
2019-08-02 09:22:39 -04:00
Reto Brunner c81b3eb1cb Sendmail: allow for arbitrary parameters
Allows the outgoing command to contain arguments and flags
2019-07-29 14:51:12 -04:00
Jeffas 989730d470 Add index option to change-tab
This allows selection of a tab using its index. It attempts to parse the
given argument as a number, if it fails then it uses it as a name.

Also supports relative indexes using prefixed + or -.
2019-07-27 12:40:28 -04:00
Galen Abell 0ee7d30187 Add :detach command
Add a command for removing attachments from a composed message. Syntax
is :detach [path], with path being an optional argument specifying the
path of one existing attachment. If no path is specified, the first
attachment is removed.
2019-07-27 12:37:55 -04:00
Drew DeVault d931bbeff1 Add missing fallthrough 2019-07-27 12:36:30 -04:00
Drew DeVault 48758136c0 Implement sendmail support 2019-07-27 11:19:49 -04:00
Jeffas cded067bc3 Add tab completion to textinputs
This adds tab completion to textinput components. They can be configured
with a completion function. This function is called when the user
presses <tab>. The first completion is initially shown to the user
inserted into the text. Repeated presses of <tab> or <backtab> cycle
through the completions list. The completions list is invalidated when
any other non-tab-like key is pressed.

Also changed is some logic for current completion generation so that
all available commands are returned when <tab> is pressed with no
current text and similarly for arguments of commands.
2019-07-26 14:39:42 -04:00
Galen Abell 8635c70fda Add command history and cycling
Aerc will keep track of the previous 1000 commands, which the user can
cycle through using the arrow keys while in the ex-line. Pressing up
will move backwards in history while pressing down will move forward.
2019-07-26 14:29:34 -04:00
Daniel Bridges 67fb0938a6 Support configurable header layout in compose widget 2019-07-26 14:22:04 -04:00
Jeffas dc4c36adbf Add new-email trigger
This patch sets up the trigger config section of aerc.conf.

Each trigger has its own function which is called from the place where
it is triggered. Currently only the new-email trigger is implemented.

The triggers make use of format strings. For instance, in the new-email
trigger this allows the user to select the trigger command and also the
information extracted from the command and placed into their command.

To actually execute the trigger commands the keypresses are simulated.

Further triggers can be implemented in the future.

Formatting of the command is moved to a new package.
2019-07-26 14:00:24 -04:00
Jeffas ee5b537d53 Fix :close on terminal panic
Executing :close on a terminal would panic due to it already having been
removed.

This is also related to the fact that removing a tab doesn't check for
whether it actually found a tab to remove or not.
2019-07-25 18:12:08 -04:00
Jeffas 4541519225 Add space which was missing 2019-07-25 18:12:05 -04:00
Jeffas e42b95a617 Add change tab command
This command allows the user to change tab by giving the tab name. This
can be tab completed too. The previous tab is stored in the tabs module
so that when a new tab is created it is still possible to go to the
previous one.

Normal invocation is :ct folder
Previous tab is :ct -
2019-07-23 10:27:59 -04:00
Kevin Kuehler f81e4bd41c Implement :filter, :clear
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-19 11:30:32 -04:00
Galen Abell 7899d15d60 Add :attach command for compose
Allow users to add attachments to emails in the Compose view. Syntax is
:attach <path>, where path is a valid file. Attachments will show up in
the pre-send review screen.
2019-07-19 10:30:47 -04:00
Drew DeVault fe7230bb9a Add :cp alias for :copy 2019-07-17 18:42:03 -04:00
Nicolai Dagestad a1763bf207 Add an option to toggle between read and unread 2019-07-17 17:01:25 -04:00
Jeffas 715c9a4797 Update status message to include destination 2019-07-17 15:59:08 -04:00
Kevin Kuehler 8bb115dbae commands: Don't crash when store is nil
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>
2019-07-15 09:46:49 -04:00
Pedro L. Ramos d85f671bdf 71: Allow user to change config options at runtime
There is a LoadConf and a LoadConfFromFile.
LoadConfFromFile reads the iniFile into memory and and calls
LoadConf, which executes the old parsing commands from
LoadConf (old func).

The remaining of the LoadConfFromFile is the same as the old OldConf.
2019-07-15 09:42:03 -04:00
Daniel Bridges 217e85a55d Fix crashes when operating on empty folder (#216) 2019-07-10 13:21:38 -04:00
Drew DeVault 3f30c27bb3 Fix :pipe -b actually writing to stdin 2019-07-08 18:50:40 -04:00
Drew DeVault 133085b436 Fix re-opening of expired pipe tabs 2019-07-08 18:32:31 -04:00
Drew DeVault 6797f93476 :exec, :pipe: show exit status on completion 2019-07-08 18:22:41 -04:00
Drew DeVault 7ecc6f96de Add :exec and :pipe -b(ackground) 2019-07-08 18:19:08 -04:00
Ben Burwell c610c3cd9d Factor IMAP-specific structs out of UI models
Before, we were using several IMAP-specific concepts to represent
information being displayed in the UI. Factor these structures out of
the IMAP package to make it easier for other backends to provide the
required information.
2019-07-08 16:06:28 -04:00
Drew DeVault 363aab5cc1 Make :pipe command more generic 2019-07-05 12:21:12 -04:00
Drew DeVault f9f523ad59 Remove unused caps string 2019-07-04 12:33:19 -04:00
Gregory Mullen f9d26eef58 Add IMAP folder tab completion
Credit for this fix goes to Reto; I guess if we're not gonna be mutt
we should probabaly do things correctly.
2019-07-04 11:28:04 -04:00
Zach Sisco ddd0fa428f Crash on delete in empty folder (#213) 2019-07-04 11:08:08 -04:00
Ben Burwell 030f390436 Add unsubscribe command
The unsubscribe command, available when in a message viewer context,
enables users to easily unsubscribe from mailing lists.

When the command is executed, aerc looks for a List-Unsubscribe header
as defined in RFC 2369. If found, aerc will attempt to present the user
with a suitable interface for completing the request. Currently, mailto
and http(s) URLs are supported. In the case of a HTTP(S) URL, aerc will
open the link in a browser. For mailto links, a new composer tab will be
opened with a message filled out according to the URL. The message is
not sent automatically in order to provide the user a chance to review
it first.

Closes #101
2019-07-04 11:06:14 -04:00
Ben Burwell 1bb1a80156 Use "open" instead of "xdg-open" on Darwin systems 2019-07-04 10:58:33 -04:00
Gregory Mullen 2a0961701c Implement basic tab completion support
Tab completion currently only works on commands. Contextual completion
will be added in the future.
2019-06-29 14:24:19 -04:00
Drew DeVault 91a75cd98b Implement :search, :next-result, :prev-result 2019-06-26 20:50:54 -04:00
Reto Brunner ccf5c02c38 msgview/save: Use defaultSavePath if no path is provided 2019-06-25 10:38:55 -04:00
Drew DeVault ceeb30abeb Fix Cc & Bcc handling in replies 2019-06-21 14:33:09 -04:00
Martin Hafskjold Thoresen 53df15ae06 Insert nil check before handling prev/next message
If these are called before the store is setup, `acct.Store()` returns
`nil`, and we SEGFAULT in `MessageStore.nextPrev`.
2019-06-18 19:39:42 -04:00
Réouven Assouly ce475e4952 commands/msgview: add open command 2019-06-17 14:52:52 -04:00
Réouven Assouly dfe114b643 Make part encoding checks case insensitive
commands/msgview/save and commands/msgview/pipe now use case
insensitive comparisons to determine if the part is encoded as base64
or quoted-printable.
2019-06-16 11:24:42 -04:00
Clayton Craft e56ceb099e Support directories in path to :save
This adds new functionality to :save in the message view for specifying
directories in the path. A new flag, -p, is also added to :save for
automatically creating any directories in the path that do not exist.

If the path ends in a / (e.g. "Downloads/mail/") or if the path is an
existing directory, the part's file name is the filename from the mail
header for the part. Otherwise, it uses the last element in the path as
the filename (e.g. 'blah.jpg' is the filename if the path is
'Downloads/mail/blah.jpg')
2019-06-14 09:48:20 -04:00
Kevin Kuehler 9746f4858c commands/msgview: Add next/prev commands
Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
2019-06-11 09:34:48 -04:00
Kevin Kuehler 32f970e053 Move select functionality from msglist to msgstore
Remove msglist Next and Prev commands

Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
2019-06-11 09:34:36 -04:00
Kevin Kuehler d1df710328 commands/msg/archive: Work with msgviwer
Inside the generic msg command we cannot use aerc.SelectedAccount()
because the method naively assumes the current tab is an AccountView.
Use the ProvidesMessage interface instead.

Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
2019-06-11 09:18:51 -04:00
Drew DeVault d22a9140cd Implement :mkdir command 2019-06-09 19:21:26 -04:00
Drew DeVault a98824af75 Fix :new-account getopts 2019-06-09 19:14:56 -04:00
Drew DeVault 57471a0e67 Fix :copy arg handling 2019-06-09 19:14:04 -04:00
Drew DeVault c55223106d Fix :move command's arg parsing 2019-06-09 18:29:21 -04:00
Clayton Craft f5a4d935ef Update reply to use getopt posix optind format
This changes the handling of optind for the 'reply' command to match
recent changes to getopt.
2019-06-09 15:50:50 -04:00
Drew DeVault 6271d455eb Add :read and :unread commands 2019-06-09 14:55:42 -04:00
Drew DeVault d63653ecde commands/msg/copy: remove unnecessary code 2019-06-09 14:54:27 -04:00
Robert Günzler acfe7d7625 Add archive command
Adds an archive command that moves the current message into the folder
specified in the account config entry.

Supports three layouts at this point:

- flat: puts all messages next to each other
- year: creates a folder per year
- month: same as above, plus folders per month

This also adds a "-p" argument to "cp" and "mv" that works like
"--parents" on mkdir(1). We use this to auto-create the directories
for the archive layout.
2019-06-09 11:33:50 -04:00
Yash Srivastav 35f57321f8 Mark sent emails as read 2019-06-08 12:44:01 -04:00
Yash Srivastav fca7321639 Message list: implement index-format option 2019-06-07 16:22:01 -04:00
Yash Srivastav b83e7c9fa6 implements ability to view headers in message view 2019-06-07 09:20:24 -04:00
JanUlrich 0771eaf24c Introduce :new-account -t
Adding the [-t] temporary flag to the new-account command
- when using -t a newly created account will not be stored into the
accounts.conf

Issue #134
2019-06-05 09:32:43 -04:00
Tadeo Kondrak 023a2622f9 Allow no arguments to :cd
I often use the bare `cd` command to get back to my home directory.
2019-06-05 09:32:23 -04:00
Kevin Kuehler 753adb9069 widget: Add ProvidesMessage interface
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>
2019-06-02 10:16:29 -04:00
Drew DeVault 1894a7e91b Fix infinite recursion in reply.go:findPlaintext 2019-06-02 09:36:21 -04:00
Drew DeVault cf50b98768 Fetch plaintext part when replying 2019-06-01 19:47:09 -04:00
Galen Abell 28fc9fa53d Add :save and :pipe commands to viewer
* :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
2019-05-27 09:37:07 -04:00
Drew DeVault 887ff6550d Implement :edit in compose screen 2019-05-26 11:58:14 -04:00
Drew DeVault 38e71659ff Implement :forward 2019-05-25 14:52:57 -04:00
Drew DeVault cef784bf52 Fix special characters in address.PersonalName 2019-05-25 11:56:56 -04:00
Drew DeVault 1a45b793c7 Implement :help 2019-05-22 11:17:52 -04:00
Drew DeVault 937b33c850 Write new accounts to config and open tab 2019-05-22 10:40:08 -04:00
Drew DeVault 6811143925 New account wizard, part one 2019-05-21 16:53:50 -04:00
Drew DeVault cc90cd2161 Pass ServerName to tls.Config for SMTP 2019-05-20 17:25:12 -04:00
Drew DeVault 0897413a3e Implement :next-part, :prev-part 2019-05-20 16:49:39 -04:00
Drew DeVault 511fea3944 Flesh out multipart switcher 2019-05-20 16:43:08 -04:00
Drew DeVault a9aebe11d7 asdf 2019-05-20 14:01:59 -04:00
Drew DeVault 22cc40f4d4 pipe.go: let tab widget handle ellipsis 2019-05-20 14:01:13 -04:00
Drew DeVault ef57300faf Missed a spot 2019-05-19 18:25:38 -04:00
Drew DeVault 455c6f0b77 Rename :delete-message et al to :delete et al 2019-05-19 18:23:34 -04:00
Drew DeVault fa5d8d7a00 Advance cursor after :delete and :move
So that you can repeat the action on the next message if appropriate
2019-05-19 18:21:02 -04:00
Amin Bandali 588a6c785b Implement :pwd command 2019-05-19 14:36:11 -04:00
Drew DeVault ca2cd00fe7 Fix scdoc & gofmt issues 2019-05-18 15:34:16 -04:00
Drew DeVault 98da4c9509 s/aerc2/aerc/g 2019-05-17 20:57:10 -04:00
Drew DeVault 2ffbe7a6cd Remove debug logging 2019-05-17 11:28:32 -04:00
Drew DeVault eec2bacede Refactor STARTTLS to prevent downgrade attacks 2019-05-17 11:22:30 -04:00
Drew DeVault e436780b47 s/Sent/Message sent/ 2019-05-16 23:57:38 -04:00
Drew DeVault ce0d0e887c Improve reply-all recipient enumeration strategy 2019-05-16 14:16:45 -04:00
Drew DeVault 5701b6e949 Decode email when reading it for quoting 2019-05-16 14:09:57 -04:00
Drew DeVault 7f97e0b605 Don't prefix Re: if prefix already present 2019-05-16 12:42:46 -04:00
Drew DeVault 8be59cae6c Implement :reply -q and :reply -a 2019-05-16 12:39:22 -04:00
Drew DeVault 475b697bdf Implement (basic form) of :reply 2019-05-16 12:15:34 -04:00
Drew DeVault 2b3e123cb8 Let caller pass in custom headers to compose 2019-05-16 10:49:50 -04:00
Drew DeVault b0bf09b98f Copy sent emails to the Sent folder
Or rather, to a user-specified folder
2019-05-15 19:41:21 -04:00
Drew DeVault 2e5ae1946b Implement move, mv commands 2019-05-14 16:55:50 -04:00
Drew DeVault db213fd0ae Implement :copy (aka :cp) 2019-05-14 16:44:59 -04:00
Cole Helbling b0b3287bbd Implement abort command
This allows the user to close the compose tab without sending their
current composition.
2019-05-14 16:21:45 -04:00
Drew DeVault 2c486cb7f5 Update tab name as subject changes
Also moves truncation to the tab widget
2019-05-14 16:18:59 -04:00
Drew DeVault 065da5e372 Add $EDITOR, internal config for compose 2019-05-14 15:25:30 -04:00
Drew DeVault 254e6fe73f Remove tab before going async
To prevent repeated attempts to send
2019-05-14 14:29:50 -04:00
Drew DeVault f77d7c2c3d Add distinct keybindings for each compose view 2019-05-14 14:27:28 -04:00
Drew DeVault 928ac1bcd9 Send emails asyncronously 2019-05-14 14:18:01 -04:00
Drew DeVault 29de3297a1 Implement sending emails /o/ 2019-05-14 14:07:27 -04:00
Drew DeVault 6c36e04c1f Add :send-message, prepares & writes email to /tmp 2019-05-14 13:07:48 -04:00
Drew DeVault 17bd2dc4db Populate "From" header from config for new emails 2019-05-13 16:04:01 -04:00
Drew DeVault f37508a539 Implement :{next,prev}-field in compose view 2019-05-12 11:21:28 -04:00
Drew DeVault 577248f5e1 Add initial compose widget 2019-05-12 00:06:09 -04:00
Drew DeVault 71c13c9078 "Press any key to close" for completed processes 2019-05-11 14:15:29 -04:00
Tom Lebreux 6e11a020d4 Fix segfault on :select-message for unloaded messages
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-17 20:02:12 -04:00
Tom Lebreux 3cd0d5bc28 Fix segfault on :view-message for unloaded message
This also fixes segfault on :view-message on empty directory

Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-10 15:40:06 -04:00
Drew DeVault 1a4cc31d67 Make tab width of :pipe consistent 2019-03-31 15:13:47 -04:00
Drew DeVault bbdf9df75e Add basic filter implementation 2019-03-31 14:24:53 -04:00
Drew DeVault 95875b13f8 Rename FetchMessageBodies to FetchFullMessages 2019-03-31 12:19:30 -04:00
Drew DeVault 27b25174e2 Make the message viewer real, part one 2019-03-31 12:14:37 -04:00
Drew DeVault 143289bbd0 Don't parse mail in worker; send a reader instead 2019-03-31 11:29:57 -04:00
Drew DeVault 5d0402aeea Add message view commands, :close 2019-03-30 21:45:41 -04:00
Drew DeVault fa04a1e036 Add basic message viewer mockup 2019-03-30 14:12:04 -04:00
Drew DeVault 2958579ee7 Correct color of error messages 2019-03-30 13:05:00 -04:00
Drew DeVault 700dea23fa Implement :pipe 2019-03-30 11:58:24 -04:00
Drew DeVault 77ede6eb5a Add body fetching support code 2019-03-29 22:36:15 -04:00
Drew DeVault 10dd23f05d Add terminal command context 2019-03-21 16:32:22 -04:00
Drew DeVault 8126d82956 Add context-specific commands 2019-03-21 16:30:23 -04:00
Drew DeVault 312a53e5ff Implement :delete-message 2019-03-20 23:23:38 -04:00
Drew DeVault 9ff815bb13 s/:term-close/:close/g 2019-03-17 17:45:44 -04:00
Drew DeVault 60b17c473a Wrap Terminal in TermHost 2019-03-17 17:39:49 -04:00
Drew DeVault dee0f8938b Add :term-close 2019-03-17 17:23:53 -04:00
Drew DeVault 16c3f0a893 Handle terminal title, login shell 2019-03-17 17:08:54 -04:00
Drew DeVault 14cb8cb51f Implement :next-tab, :prev-tab 2019-03-17 16:24:17 -04:00
Drew DeVault 589db742cb Move exline handling up to aerc, add :term 2019-03-17 16:19:15 -04:00
Drew DeVault 9e28a02f6a commands: handle case where no account selected 2019-03-17 14:57:05 -04:00
Drew DeVault 13ba53c9d0 Implement :select-message 2019-03-15 22:01:20 -04:00
Drew DeVault db2146bc91 Fix usage message for :next-message 2019-03-15 21:56:57 -04:00
Drew DeVault e780c6ee96 Implement :next-message n% 2019-03-15 21:41:39 -04:00
Drew DeVault f406bf5a3b Add :quit command 2019-03-15 20:32:09 -04:00
Drew DeVault 22f453f56a Fix help string for :cd 2019-03-15 10:47:27 -04:00
Drew DeVault 513e8aa94b Rename :cd -> :cf, add :cd 2019-03-15 10:47:09 -04:00
Drew DeVault 24daef89e0 Implement :{next,prev}-message 2019-03-14 23:41:25 -04:00
Drew DeVault 62946ff6c5 Implement :cd command 2019-03-14 22:34:34 -04:00
Drew DeVault d394fd1f3b Flesh out command parsing & handling 2019-03-10 21:23:22 -04:00
Drew DeVault b60999c39e Start building out command subsystem 2019-03-10 21:15:24 -04:00