unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* disable font color change in region
@ 2014-10-10 20:42 Bob Clark
  2014-10-10 20:51 ` Bob Clark
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Bob Clark @ 2014-10-10 20:42 UTC (permalink / raw)
  To: help-gnu-emacs

How can I direct emacs *not* to change the color of the *text* in a selected region? (It's okay to change the background color.)

I did a recent installation of Ubuntu 14.04. The new emacs version changes the color of the text in a region to white to accompany the background color change. I don't like this behavior and would like to revert to the previous behavior, which was to change the background color only and leave the text color alone.

The jpg image at https://drive.google.com/file/d/0B4BAQmmnJQ4HU1hCUUtGb3ZHdTQ shows what I mean much better than I can describe it. The emacs session on the left is the old behavior (where the colors of "selected" text remain unchanged). The emacs window on the right (partially hidden) shows that the the selected text has been changed to white. That's what I don't like and would like to disable.

Does anyone know how to do that? Thanks.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable font color change in region
  2014-10-10 20:42 disable font color change in region Bob Clark
@ 2014-10-10 20:51 ` Bob Clark
  2014-10-10 21:49 ` Drew Adams
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Bob Clark @ 2014-10-10 20:51 UTC (permalink / raw)
  To: help-gnu-emacs

I'd like to add this clarification. Adding

  (set-face-foreground 'region "black")

to .emacs makes the selected text black instead of white, but that's not what I want. I want the selected text to retain the color scheme that it has when it's unselected, which is what it did in the previous versino of emacs I was using.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: disable font color change in region
  2014-10-10 20:42 disable font color change in region Bob Clark
  2014-10-10 20:51 ` Bob Clark
@ 2014-10-10 21:49 ` Drew Adams
       [not found] ` <mailman.10952.1412977776.1147.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2014-10-10 21:49 UTC (permalink / raw)
  To: Bob Clark, help-gnu-emacs

> https://drive.google.com/file/d/0B4BAQmmnJQ4HU1hCUUtGb3ZHdTQ shows
> what I mean.... The emacs session on the left is the old behavior
> (where the colors of "selected" text remain unchanged). The emacs
> window on the right (partially hidden) shows that the the selected
> text has been changed to white. That's what I don't like...

FWIW, I don't see that (on MS Windows), with `emacs -Q'.

What does `M-x customize-face' tell you is the spec currently
defining your `region' face?  (Start from `emacs -Q'.)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable font color change in region
       [not found] ` <mailman.10952.1412977776.1147.help-gnu-emacs@gnu.org>
@ 2014-10-10 23:45   ` Bob Clark
  0 siblings, 0 replies; 6+ messages in thread
From: Bob Clark @ 2014-10-10 23:45 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks for your suggestion. I did it with the old version of emacs (version 23, left side of https://drive.google.com/file/d/0B4BAQmmnJQ4HWU15VjNOR3ZZUVE) and the new version (version 24, right side of image).

It looks like the foreground of the region face isn't set in the old emacs. That's probably why it retains the font colors. In the newer emacs, the foreground is set to gtk_selection_fg_color, which apparently is white.

I tried deselecting the foreground to see what that would do. It wouldn't let me save the changes unless I ran emacs without the -Q flag.

When I ran emacs without the flag, deselected the region foreground, and saved the changes, it modified my .emacs file and subsequently performed as I wanted it to. Thanks for your help.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable font color change in region
  2014-10-10 20:42 disable font color change in region Bob Clark
                   ` (2 preceding siblings ...)
       [not found] ` <mailman.10952.1412977776.1147.help-gnu-emacs@gnu.org>
@ 2014-10-11  0:04 ` Dan Espen
  2014-10-12  2:27 ` Stefan Monnier
  4 siblings, 0 replies; 6+ messages in thread
From: Dan Espen @ 2014-10-11  0:04 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Clark <parminidez@gmail.com> writes:

> How can I direct emacs *not* to change the color of the *text* in a
> selected region? (It's okay to change the background color.)

I think you are looking to turn off transient-mark-mode?

If so, it's somewhere in the customize jungle or you can just:

(setq transient-mark-mode nil)

( in your .emacs)

-- 
Dan Espen


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: disable font color change in region
  2014-10-10 20:42 disable font color change in region Bob Clark
                   ` (3 preceding siblings ...)
  2014-10-11  0:04 ` Dan Espen
@ 2014-10-12  2:27 ` Stefan Monnier
  4 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2014-10-12  2:27 UTC (permalink / raw)
  To: help-gnu-emacs

> How can I direct emacs *not* to change the color of the *text* in a selected
> region? (It's okay to change the background color.)

Install Emacs-24.4 (or more specifically the 24.3.94 pretest).


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-12  2:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 20:42 disable font color change in region Bob Clark
2014-10-10 20:51 ` Bob Clark
2014-10-10 21:49 ` Drew Adams
     [not found] ` <mailman.10952.1412977776.1147.help-gnu-emacs@gnu.org>
2014-10-10 23:45   ` Bob Clark
2014-10-11  0:04 ` Dan Espen
2014-10-12  2:27 ` Stefan Monnier

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).