Commit Graph

1364 Commits

Author SHA1 Message Date
Drew DeVault 85bb0b1f98 aerc-tutorial(7): add searching and expand viewer 2019-07-29 17:07:31 -04:00
Drew DeVault 23444e6c78 Update version to 0.2.1 2019-07-29 16:24:09 -04:00
Drew DeVault 72e6802266 Change how VERSION is set in Makefile 2019-07-29 16:23:05 -04:00
Drew DeVault 3d578d376b Fix test failures 2019-07-29 15:44:28 -04:00
Ben Burwell 152f8c9519 Ring bell when new messages arrive
Add a "new-message-bell" option to the UI section of aerc.conf. A new
hook into the message store allows the msglist widget to detect new
messages being added to the displayed list. When new messages are
delivered, and the new-message-bell option is enabled (as it is by
default), the terminal will beep.
2019-07-29 15:01:49 -04:00
Kevin Kuehler 2804f00001 lib/msgstore: Fix Select, Next, Prev with filter
When filter is active we want to use store.results instead of
store.uids, since we are dealing with a subset of the uids. Otherwise
any methods involving len will have undefined behavior.

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-29 14:51:39 -04:00
Reto Brunner b812257ba9 Print errors from config load issues.
Currently we /dev/null stdout, if it is a tty.
The checkConfigPerms function, as well as the error print were incorrectly
writing to stdout and therefore weren't visible to most users.
2019-07-29 14:51:16 -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
Galen Abell a669233614 Fix review message not filling entire space
Adding an attachment, switching to a different tab, and switching back
to the review message caused the "filled space" in the review message to
disappear, since there was one too many rows in the layout.
2019-07-27 12:37:54 -04:00
Drew DeVault d931bbeff1 Add missing fallthrough 2019-07-27 12:36:30 -04:00
Drew DeVault 84f49e96ce Update tcell 2019-07-27 12:33:59 -04:00
Simon Ser 974b22c8f1 Update dependencies
A bug corrupting long In-Reply-To headers has been fixed upstream in
go-message:
https://github.com/emersion/go-message/issues/44
2019-07-27 12:11:42 -04:00
Drew DeVault 48758136c0 Implement sendmail support 2019-07-27 11:19:49 -04:00
Jeffas 7a3765a36b Fix tabstrip over-drawing when not enough space
Tabstrip didn't take into account the width of the context. Now, it just
shows as many tabs as can fit and truncates the last one if necessary.

In future it probably would be best to ensure that the selected tab is
rendered on the screen.
2019-07-26 15:12:24 -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
Drew DeVault aabe3d9b3a Fix invalid tab state when deselecting removed tab 2019-07-26 14:37:45 -04:00
Jeffas 6784ed3772 Add change-tab docs 2019-07-26 14:36:59 -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 1b673b5ea7 Move msgstore map to dirstore
This map represents a mapping from directory names to their associated
messagestores anyway so they should be under dirstore. This simply moves
them there and adds some methods required to interact with them.
2019-07-26 14:15:27 -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 0950e39f53 Show the directory being selected in gray 2019-07-25 18:15:49 -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 1cf90897f7 Fix grid creating too large subcontexts
The grid was not checking there was enough space for the cells so would
just attempt to create subcontexts that don't actually fit.

This attempts to use the remaining space and then if there is no space
then it just skips drawing this cell.
2019-07-25 18:12:00 -04:00
Drew DeVault 2f626ddd18 Fix panic when tabs.popHistory is nonexistent 2019-07-25 08:29:10 -04:00
Kevin Kuehler fe2fef4b75 Make :next-result :prev-result relative to cursor
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-25 08:26:43 -04:00
Kacper Kołodziej 6c0f228451 Makefile: Use GO variable to specify compiler path
It is useful when somebody has different Go versions across one system
and first go in $PATH points to version older than 1.12 (common in
stable distributions).

Signed-off-by: Kacper Kołodziej <kacper@kolodziej.it>
2019-07-23 10:41:15 -04:00
Daniel Bridges ec0e0f9d75 Discard stdout if not redirected to file
Commit 97bee661 Printf statement at widgets/msgviewer.go#188 introduced
bad formatting in the display if stdout was not being redirected.
2019-07-23 10:41:13 -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
Nicolai Dagestad d526786c93 Fix error handling in maildir worker 2019-07-19 17:33:33 -04:00
Ben Burwell 66d916aa7b Use latest go-maildir 2019-07-19 17:33:30 -04:00
Drew DeVault 97bee661b7 Fix alternatives config 2019-07-19 17:26:43 -04:00
Drew DeVault d8518909cc Add [a]ttach to the review message prompts 2019-07-19 16:12:26 -04:00
Reto Brunner 6fed04bb9f Register worker in init.
This allows backends which can't always be compiled due to missing
dependencies (say libnotmuch) to be compiled conditionally with buildflags.
2019-07-19 15:37:55 -04:00
Drew DeVault 66a9052f0f Forward mailto links to server via ./aerc <mailto> 2019-07-19 14:34:13 -04:00
Drew DeVault 7a489cb001 Add Unix socket for communicating with aerc 2019-07-19 14:15:48 -04:00
Drew DeVault b3a66866b9 aerc(1): fix scdoc syntax error 2019-07-19 12:46:52 -04:00
Drew DeVault 2d6338e27d aerc(1): document missing commands 2019-07-19 12:45:10 -04:00
Drew DeVault 7d37a89458 aerc(1): Fix fallback ex key documentation 2019-07-19 12:33:24 -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
Drew DeVault 8b2abcb02a Change default attach keybinding 2019-07-19 10:45:44 -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
Jeffas fb124139f3 Add option to always show mimetype in viewer
A user may want to be able to see what mimetype they are viewing, so
that they can determine what program it may be opened in or for some
other reason.

The config option is under the [viewer] section and is called
'always-show-mime'. It defaults to false to preserve the current
behaviour.
2019-07-17 17:34:43 -04:00
Jeffas 4a5aa7dc27 Remove passing of showHeaders explicitly
Where it is needed the configs are already available so just extract the
value from these.
2019-07-17 17:33:31 -04:00
Jeffas 1d1fe7c7ef Ensure new partswitcher doesn't start on multipart 2019-07-17 17:31:49 -04:00
Ben Burwell 6473848d87 maildir: Watch for new messages
When a directory is opened, start watching its "new" subdirectory for
incoming messages using the fsnotify library. When creation events are
detected, run the Unseen routine to move the message from new to cur and
add new UIDs to the store, updating the UI's list of directory contents
as we go.
2019-07-17 17:29:11 -04:00