I was feeling pleasantly wistful this morning when I was startled by the realisation that I had no idea what wist was, or why I was so full of it.
The answer appears to be that nobody else is sure either. It's one of those words where dictionaries seem to cough, shuffle their feet and try to change the subject. It certainly didn't always mean melancholy and yearning. Once upon a time it meant with rapt attention, but as people only really attend to the things for which they yearn, the meaning shifted and drifted to its sorrowful modern form.
The OED tries to take it all back to whistly, which meant silently once. This means that there may just perhaps maybe a connection to the card game. Originally, there was a game of whisk, but whisk became whist for no reason that anybody can really work out. It may have been that it was a game where you were meant to keep quiet about the cards you had, and play whistly.
We need a word like wistful, there's a very particular human emotion and it doesn't really matter whether we know what wist is, we're all brimming with it now and then.
And here is some unrelated wisteria.