خرید بک لینک

Vote count: 0

I have created a major-mode for emacs that I use for data analysis. This mode works great for me but it's drab and I don't take advantage of color the way I should. The data being analyzed is in a CSV format and I'd like to colorize the rows within based on values in the columns.

Let's say I have the following file in CSV format:

one,1,2,3
two,4,5,6
three,7,8,9

The rows in this CSV should be colored with red based on the value in the 4th column and the intensity of the red should increase with that same value. So in this case the last column should be the most intense red and the first should be the least red.

I've read over Search Based Fontification and I'm a bit confused as to how I would write a (matcher . facespec) that sets the facespec properly. facespec is an expression that evaluates to

(face face prop1 val1 prop2 val2…)

but how do I make this depend on the values in the fourth column of my CSV? I guess the value in the fourth column is what gets matched but how do I tie the face used to the magnitude of the value matched? I suppose I need to generate a face on the fly based on the value matched but not sure how to do so.

Any ideas? A simple example would be best.

asked 30 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 8 شهريور 1395 ساعت: 9:56

صفحه بندی