Attached is my full solution for this problem. Anyone is welcome to integrate any parts useful directly into Emacs. For now, it works as a loadable Lisp library. Bob