purebred-mua / purebred

A terminal based mail user agent based on notmuch
GNU Affero General Public License v3.0
139 stars 19 forks source link

Query edit: ^W delete-word #280

Open frasertweedale opened 5 years ago

frasertweedale commented 5 years ago

Is your feature request related to a problem? Please describe. Query editing is a bit of a pain. Would be handy if ^W would delete-word, make it a bit faster to use.

BlackCapCoder commented 5 years ago

Rather than re-implementing all the common terminal shortcuts, it might be better to use Haskeline. This is the library that ghci uses for line editing. It has a global config file that the user can tune to his or her own preferences, and has both emacs and vi keybinds!

frasertweedale commented 5 years ago

@BlackCapCoder yeah it would be nice to combine brick and haskeline...

romanofski commented 5 years ago

I've found work done here: https://github.com/rootmos/haskeline but the haskeline API is pretty closed at the moment. Therefore I've filed an issue https://github.com/judah/haskeline/issues/118 to ask what's the better way to get brick support into haskeline.

romanofski commented 5 years ago

I think we should remove the easyfix tag for this card, since incorporating haskeline is not really an easy fix.

frasertweedale commented 4 years ago

@romanofski agree. Removed tag; changed description to reflect what task has become.

romanofski commented 3 years ago

So I've hacked on this for a bit using prior work from https://www.rootmos.io/2017-08-31-combining-brick-and-haskeline.html and https://github.com/judah/haskeline/pull/121. The branch is https://github.com/purebred-mua/purebred/commit/f2e56a9d89fae499f143df29cfe4d89a06f41430 but I'm inclined to wait until https://github.com/judah/haskeline/pull/121 is merged, because without exposed internals in Haskeline, no Brick widget using Haskeline.

romanofski commented 3 years ago

@frasertweedale maybe more people would ask for https://github.com/judah/haskeline/pull/121 to be merged? Otherwise we can't really progess with this :)