Difference between revisions of "Haskell mode for Emacs/Color chords"

From HaskellWiki
Jump to navigation Jump to search
m (Color chords moved to Haskell mode for Emacs/Color chords)
(format and categorize)
Line 1: Line 1:
  +
[[Category:Art]]
Tags: color haskell creative
 
   
 
(Please see screenshot below) and, In an emacs buffer, type (M-x list-colors-display)
 
(Please see screenshot below) and, In an emacs buffer, type (M-x list-colors-display)
   
  +
==The thought==
 
I have to remind myself now and then that there are lots and lots of creative thinkers out there who just can't be bothered with a text editor.
 
I have to remind myself now and then that there are lots and lots of creative thinkers out there who just can't be bothered with a text editor.
 
So I think a lot about how to get people of various backgrounds involved in the creative process of building software. It is very rewarding on an immediate and personal level, but it will also certainly help us make better software.
 
So I think a lot about how to get people of various backgrounds involved in the creative process of building software. It is very rewarding on an immediate and personal level, but it will also certainly help us make better software.
Line 14: Line 15:
 
The sooner we have this much code written, the sooner we can play with colors and think about what we want them to tell us about our haskell code!
 
The sooner we have this much code written, the sooner we can play with colors and think about what we want them to tell us about our haskell code!
   
  +
==The screenshot==
 
(Scroll down for a sort-of-not-working code fragment)
 
(Scroll down for a sort-of-not-working code fragment)
   
 
http://syntaxthug.syntaxpolice.org/emacscolors/coloredcode.jpg
 
http://syntaxthug.syntaxpolice.org/emacscolors/coloredcode.jpg
   
  +
==The (not yet working) code==
   
  +
<pre-lisp>
<elisp>
 
   
 
(defun highlight8 ()
 
(defun highlight8 ()
Line 28: Line 31:
 
(facemenu-set-background "steelblue" start (point)))))
 
(facemenu-set-background "steelblue" start (point)))))
   
</elisp>
+
</pre-lisp>

Revision as of 21:31, 15 June 2007


(Please see screenshot below) and, In an emacs buffer, type (M-x list-colors-display)

The thought

I have to remind myself now and then that there are lots and lots of creative thinkers out there who just can't be bothered with a text editor. So I think a lot about how to get people of various backgrounds involved in the creative process of building software. It is very rewarding on an immediate and personal level, but it will also certainly help us make better software.

Why not shout out to the artists in internet land (and in person) who are able to create a feeling of movement in color?

My concrete project to explore this abstract exploration is to write some elisp which will tag my haskell code with "color chords."

I'm looking to modify haskell-mode in emacs so that each type decleration has the first eight characters highlighted with a certain color. If the following definition is short, blank lines should be inserted as necessary so that three or four lines following the type declaration can also be highlighted in the first eight characters.

The sooner we have this much code written, the sooner we can play with colors and think about what we want them to tell us about our haskell code!

The screenshot

(Scroll down for a sort-of-not-working code fragment)

coloredcode.jpg

The (not yet working) code

<pre-lisp>

(defun highlight8 ()

 "highlight eight characters"
 (progn 
   (let ((start (point)))
     (forward-char-command 8)
     (facemenu-set-background "steelblue" start (point)))))

</pre-lisp>