This is useful for adding 'cursor-face or 'mouse-face to each row. I've been advising 'vtable--insert-line' with an after advice. This is better.
Example:
(make-vtable
:columns
'(( :name "Foo"
:primary ascending
))
:allow-other-keys t ; backward compatibility for :row-properties
:row-properties '( mouse-face highlight
cursor-face region)
Revised patch attached with the bug number and with 'keymap now applied to the whole row vs. just the row text. This ensures that keys (e.g., "q" to quit) operate correctly if point is at the newline.
While I have vtable cracked open, this revised patch now includes unsort. vtable is nice. Now, a bit nicer.
Now with a complete sentence in 'vtable-unsort' docstring.
I've expanded the scope of this bug to include additional enhancements, all intended to be backwardly compatible, yet provide some very nice customization features.
The biggest issues I wanted to address were that display-line-numbers was not correctly supported when using the header-line, and that text-scale-mode did not work well.
Along the way, I added custom faces for the header, column names, column-width computation optionally includes column name width, an unsort command, skipping the divider on the last column (this one was an outright bug), an option to make the divider intangible, an option to not produce dividers on the header, customizable sort indicators and faces.
As test jigs, I've been using some code I wrote for tab-bar that presents all open tabs from across all frames and in a useful way for frame/tab switching (discussed in a few open bugs with Juri), and a project-list tool (discussed in an open bug with Dmitry). vtable is great for these use cases. I will share those for feedback after the vtable work.
I have a couple more minor vtable things to do, and I figured if anyone is interested in vtable as the wonderful addition to Emacs it is (thanks Lars!), I wanted to share the work in process for feedback. I will update the documentation and I might go through flymake noise and add docstrings while I'm at it.
Patch attached.
-Stephane