views:

121

answers:

2

I accidentally managed to get colour names, #HEX, and a colour preview in Emacs. Don't have a bloody idea how, must've pressed some keybinding or menu item... But, now I can't seem to find where's that feature... I'm quite sure I wasn't hallucinating, so it's gotta be there, under some keystroke that I can't reproduce!!! =)

+3  A: 

So, what is your question? :)

What you've described can be reproduced by M-x list-colors-display (or Control-click with middle mouse button, then select display colors from the pop-up menu) -- and it's an Emacs feature, nothing to do with R or ESS. Is that what you are looking for?

Leo Alekseyev
Yes, that was just the thing I've been looking for. As far as I know, R has 657 preset colours (`http://research.stowers−institute.org/efg/R/Color/Chart`), and Emacs displays 546. I hope they are R-compatible... quick glance at colour names made me think so... =)Thanks lad!
aL3xa
+2  A: 

If/when you find yourself in that situation, where something happened in Emacs, but you don't know how. You can ask Emacs what the last 300 keys you pressed were with C-h l (which is bound to 'view-lossage, and that might give you enough information as to what you did.

Trey Jackson
Too bad I can't mark +2 for this one! Thanks a lot! =)
aL3xa
A couple of related tips: C-h a gives you an apropos help search (e.g. if you just did C-h a "colors" you would've found the function). Also, an M-x enhancement like that provided by ido mode or smex (possibly also anything.el or icicles) (look for any/all of the above on emacswiki) allows you to do M-x "stuff" and lists commands that contain the word "stuff" -- very handy.
Leo Alekseyev