~rjarry/aerc#92: 
chaining multiple commands in key binds

In the notmuch client, I want to tag and move messages with a single keystroke:

A = :modify-labels -inbox +Archive<Enter>move Archive<Enter>

However, modify-labels only removes the tag inbox and does not apply the tag Archive. I've tried with single quotes and it still doesn't do what it should.

Status
REPORTED
Submitter
~inwit
Assigned to
No-one
Submitted
a month ago
Updated
17 days ago
Labels
feature ui

~inwit a month ago

I also tried with a colon before the second command:

A = :modify-labels -inbox +Archive<Enter>:move Archive<Enter>

~rjarry 17 days ago

The issue here is that most commands are executed in the background. The main thread that handles keyboard inputs simply runs the command function which often posts a message to the worker thread and returns without waiting for a result (to avoid blocking the UI). That means that :modify-labels is still pending/running when :move is executed which results in undefined behavior.

We would need a way to properly chain commands.

Register here or Log in to comment, or comment via email.