* Re: Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, not the cursor position?)
@ 2005-06-29 8:47 LENNART BORGMAN
0 siblings, 0 replies; 5+ messages in thread
From: LENNART BORGMAN @ 2005-06-29 8:47 UTC (permalink / raw)
Cc: Drew Adams, emacs-devel
From: "Richard M. Stallman" <rms@gnu.org>
> To change more than one color component at the same
> time, it's better to have an interface that shows a color
> space, such as in
> the Word dialog box.
>
> That sounds plausible. I wonder if that could be programmed in Emacs
> Lisp. Also, some toolkits may have a widget for doing this job,
> and maybe Emacs could invoke it somehow.
There is code for this in GIMP of course. W32 has a common dialog for this (which is not as good as what GIMP offers).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Do Re Mi (was: Q on Text Properties popup menu - shouldn'titusethepointerposition, not the cursor position?)
2005-06-27 22:41 Do Re Mi (was: Q on Text Properties popup menu - shouldn'titusethepointerposition, " Drew Adams
@ 2005-06-28 18:47 Richard M. Stallman
2005-06-28 19:53 ` Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, " Drew Adams
0 siblings, 1 reply; 5+ messages in thread
From: Richard M. Stallman @ 2005-06-28 18:47 UTC (permalink / raw)
Cc: emacs-devel
Do Re Mi sounds very nice, but I think it might want to also use the mouse
as an alternative to the arrow keys. Also, in some cases it might be
good to map two dimensions of the color space at a time, not just one.
Can you email me a copy of the program, with the author's name and
email address?
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, not the cursor position?)
2005-06-28 18:47 Do Re Mi (was: Q on Text Properties popup menu - shouldn'titusethepointerposition, " Richard M. Stallman
@ 2005-06-28 19:53 ` Drew Adams
2005-06-28 20:33 ` Robert J. Chassell
2005-06-29 3:59 ` Richard M. Stallman
0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2005-06-28 19:53 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 2229 bytes --]
Do Re Mi sounds very nice, but I think it might want to also
use the mouse as an alternative to the arrow keys.
Not sure what you mean. You can currently use the mouse wheel as well as the
arrow keys. Were you perhaps thinking of using mouse gestures?
Also, in some cases it might be
good to map two dimensions of the color space at a time, not just one.
It could be done, I suppose. But, unless you would limit that to 45 degree
diagonals (equal changes in two dimensions), which is not that useful, I
think a different approach would be called for; that is, use a different,
more sophisticated interface, such as that provided by various other apps.
The Custom tab of the Colors dialog box of Word is a good (typical?)
example. It's difficult to describe, so I've attached an image. You can use
it to:
- Set color components absolutely, using RGB or HSV. You can change any of
these components incrementally.
- Pick a color from a spectrum display whose saturation changes in the
orthogonal axis (that is, hue x saturation). After picking a spot in this
color plane, you can use the arrow keys to change the saturation (up, down)
or hue (left, right) incrementally. You can also drag the pointer around the
display to change the color.
- Change only the value, using an associated scale. That is, the third,
value axis is shown separately, next to the hue x saturation plane. You can
use the arrow keys to move the slider along this scale, incrementally
changing the value.
The current color is shown, along with the new color (the one you are
changing). The new color is updated in all displays (RGB, HSV, hue x
saturation plane, value scale) as you change it.
The only disadvantage of such a dialog box wrt doremi is that you don't see
the result reflected immediately in the context of your Emacs buffers - you
see it only in the dialog-box color swatches (New, Current). But we could
choose to also show the changes simultaneously in Emacs buffers.
I'm only suggesting that doremi is rudimentary, compared to something like
the Word dialog box. To change more than one color component at the same
time, it's better to have an interface that shows a color space, such as in
the Word dialog box.
[-- Attachment #2: color-db.jpg --]
[-- Type: image/jpeg, Size: 62256 bytes --]
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, not the cursor position?)
2005-06-28 19:53 ` Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, " Drew Adams
@ 2005-06-28 20:33 ` Robert J. Chassell
2005-06-29 3:59 ` Richard M. Stallman
1 sibling, 0 replies; 5+ messages in thread
From: Robert J. Chassell @ 2005-06-28 20:33 UTC (permalink / raw)
Perhaps you could simply adapt the four color selectors available in
the GIMP; the first is what you describe. The other three do the same
thing, but with different interfaces. Obviously, one wants to change
more than one color component at the same time, so the four interfaces
may need some adaption.
--
Robert J. Chassell
bob@rattlesnake.com GnuPG Key ID: 004B4AC8
http://www.rattlesnake.com http://www.teak.cc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, not the cursor position?)
2005-06-28 19:53 ` Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, " Drew Adams
2005-06-28 20:33 ` Robert J. Chassell
@ 2005-06-29 3:59 ` Richard M. Stallman
1 sibling, 0 replies; 5+ messages in thread
From: Richard M. Stallman @ 2005-06-29 3:59 UTC (permalink / raw)
Cc: emacs-devel
Also, in some cases it might be
good to map two dimensions of the color space at a time, not just one.
It could be done, I suppose. But, unless you would limit that to 45 degree
diagonals (equal changes in two dimensions), which is not that useful,
I think we are miscommunicating. I'm thinking that horizontal arrows
could alter one dimension in color space, while vertical arrows
could alter another dimension.
Since it doesn't have to be limited to arrows, another pair of keys
could move in the third dimension of color space.
To change more than one color component at the same
time, it's better to have an interface that shows a color space, such as in
the Word dialog box.
That sounds plausible. I wonder if that could be programmed in Emacs
Lisp. Also, some toolkits may have a widget for doing this job,
and maybe Emacs could invoke it somehow.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Do Re Mi (was: Q on Text Properties popup menu - shouldn'titusethepointerposition, not the cursor position?)
@ 2005-06-27 22:41 Drew Adams
2005-06-28 18:43 ` Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, " Drew Adams
0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2005-06-27 22:41 UTC (permalink / raw)
I also added items "Change Face Foreground", "Change Face
Background", and "Change Face Attribute" to the menu. The
first two let you change a face incrementally (using the
arrow keys or mouse wheel). Using the C-mouse-2 popup menu,
you can just point to some text that has a face and change the
face's colors incrementally. No need to know the face name or color
names/values beforehand: just point and tweak.
That is completely unrelated to changing the text properties of some
text, but it could be a useful feature, if it makes face customization
really easy. Can you describe the interface? How do you use the
mouse to change a color? Colors are in a 3-dimensional space,
and the mouse moves only in two dimensions.
Right; it is unrelated, except that it is a way to change the foreground and
background properties of a face or a frame.
I mentioned the incremental-change behavior previously (search for "doremi"
in archive for Nov or Dec 2004). A writeup is here:
http://www.emacswiki.org/cgi-bin/wiki/DoReMi. The same technique is used for
resizing and moving frames, zooming frames (font size), and cycling through
buffers, bookmarks, marks, or color themes, and other incremental or cyclic
changes. The idea is to (re)use the arrow keys for different commands.
Here's what the user experiences (it's easier to try it than to explain it,
however):
1. C-mouse-2 on text in, say, face `font-lock-comment'.
Choose "Change Face Foreground" in the popup "Text Properties" menu.
Alternatively, use `M-x doremi-face-fg'; that command prompts you for the
face to change.
2. Prompt appears in minibuffer:
"Change foreground of `font-lock-comment'. Adjust red, green, blue, hue,
saturation, or value? [rgbhsv]"
3. Enter one of the characters [rgbhsv]. Let's say you enter `r', for
incrementing/decrementing the red color component.
Note 1: You can do this (change color component) at any time during
incremental color change (step 4). For example, if you are incrementing the
red color component and you hit `v', then you switch immediatly to
incrementing the value color component. This is very useful; in effect, it
means that you need not reason in terms of RGB or HSV. A combination of
value changes and RGB changes, for instance, is often handy. You need not
think at all, in fact: just adjust a component to see what it does -
WYSIWYG. You can quickly obtain the color you want.
Note 2: The increment is set by default so as to give you a reasonable
change with each incrementation. You can change the increment, however, to
give you as fine control of the color as you need.
Note 3: Color models RGB, HSV, and CMY are handled. Color components cyan,
magenta, and yellow are just the opposite of components red, green, and
blue, respectively. Incrementing one is the same as decrementing the other.
So, for instance, if you want to increment magenta, just decrement (down
arrow) green.
4. Prompt appears in minibuffer:
"Use up, down, or mouse wheel to adjust value (modifier key: faster). Value
now: Firebrick"
or whatever your current foreground value of `font-lock-comment' is - mine
is Firebrick.
5. Use the up or down key, or the mouse wheel, to increment or decrement the
current red value. The foreground property of the face is changed - you can
see the result immediately on any buffers showing that face.
After each up/down/wheel action, the prompt echoes the (new) current value.
Color values are from now on expressed in the hex form #RRRRGGGGBBBB (red,
green, blue). For example, the prompt looks like this after hitting the up
arrow once:
"Use up, down, or mouse wheel to adjust value (modifier key: faster). Value
now: #B3B222222222"
After hitting the up arrow again, this is the prompt:
"Use up, down, or mouse wheel to adjust value (modifier key: faster). Value
now: #B4B222222222"
You can just hold down an arrow key to repeat its action and keep
incrementing. The echoed value is updated accordingly - just watch it spin
like an odometer. You can go back and forth with the up and down keys, until
you get just what you want.
If you hold down a modifier key (by default, `Meta') while using the arrow
keys or mouse wheel, then the incrementation is boosted: the increment is
larger. Use it to get quickly in the neighborhood of the color you want. The
prompt text "(modifier key: faster)" indicates this possibility. Do Re Mi
commands (such as `doremi-bookmarks') that cycle through enumerations,
instead of incrementing numerical values, do not have this modifier
behavior, with its prompt.
Note: Other Do Re Mi commands use all four arrows, if appropriate. For
instance, a command for resizing frames lets you use all four to grow/shrink
both width and height. This is actually accomplished by having two Do Re Mi
commands, one for each dimension, bound to up/down and left/right arrows
respectively. Each command calls the other at the end, if the other's arrows
are used. The user just seamlessly uses any of the four arrows, without
exiting from the initial command.
6. When you finally get the color you want, just do anything other than
[rgbhsv], up, down, or mouse-wheel, to exit. This message then appears in
the echo area:
"Use `customize-customized' to revisit changes."
The updated value is communicated to Customize, so it will show that the
face foreground was "set" in Customize (i.e. it cheats) and it can be saved
there.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, not the cursor position?)
2005-06-27 22:41 Do Re Mi (was: Q on Text Properties popup menu - shouldn'titusethepointerposition, " Drew Adams
@ 2005-06-28 18:43 ` Drew Adams
0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2005-06-28 18:43 UTC (permalink / raw)
1. C-mouse-2 on text in, say, face `font-lock-comment'.
Choose "Change Face Foreground" in the popup "Text Properties" menu.
Alternatively, use `M-x doremi-face-fg'; that command prompts
you for the face to change.
2. Prompt appears in minibuffer: Change foreground of
`font-lock-comment'. Adjust red, green, blue, hue, saturation...
3. Enter one of the characters [rgbhsv].
I neglected to mention that at the end of step 3 a "*Face Sample*" buffer is
popped up showing sample text in the face. This is more important for `M-x
doremi-face-fg', where you might choose a face that is not currently
displayed. In the case of "Change Face Foreground" (which calls
`doremi-face-fg'), the current buffer shows the face.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-06-29 8:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 8:47 Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, not the cursor position?) LENNART BORGMAN
-- strict thread matches above, loose matches on Subject: below --
2005-06-28 18:47 Do Re Mi (was: Q on Text Properties popup menu - shouldn'titusethepointerposition, " Richard M. Stallman
2005-06-28 19:53 ` Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, " Drew Adams
2005-06-28 20:33 ` Robert J. Chassell
2005-06-29 3:59 ` Richard M. Stallman
2005-06-27 22:41 Do Re Mi (was: Q on Text Properties popup menu - shouldn'titusethepointerposition, " Drew Adams
2005-06-28 18:43 ` Do Re Mi (was: Q on Text Properties popup menu -shouldn'titusethepointerposition, " Drew Adams
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).