From: "Ehud Karni" <ehud@unix.mvs.co.il>
To: jbw@macs.hw.ac.uk
Cc: emacs-devel@gnu.org
Subject: Re: no good way to highlight rectangle while region is highlighted
Date: Sat, 28 Jul 2007 13:33:02 +0300 [thread overview]
Message-ID: <200707281033.l6SAX2Vf002064@beta.mvs.co.il> (raw)
In-Reply-To: <86k5slwfpp.fsf@macs.hw.ac.uk> (message from Joe Wells on Sat, 28 Jul 2007 01:10:26 +0100)
On Sat, 28 Jul 2007 01:10:26, Joe Wells wrote:
>
> "Ehud Karni" <ehud@unix.mvs.co.il> writes:
>
> My reading of the documentation (supplemented by my perusal of the
> Emacs C source code) for "merging" of face F1 and face F2 is that it
> is not a symmetric operation and one of the faces takes priority. In
> the case of distinct face attributes, both are used; this means if
> face F1 has value V1 for attribute A1 and face F2 has value V2 for
> attribute A2, then you get a new face with V1 for A1 and V2 for A2.
======================================
> In the case of assignments for the same face attribute, only one is
> used; assuming face F1 has priority, if face F1 has value V1 for
> attribute A0 and face F2 has value V2 for the same attribute A0, then
> value V1 is used.
>
> Note that there is no notion of merging of colors. One of the two
> colors is always used, unchanged.
I checked it and this is true. Your only hope is to use merging of
attributes not used in "region" face.
> I have done testing that agrees with this. Although I had no reason
> to believe they would make any difference, I just now tried overlay
> priorities anyway and verified that overlay priorities make no
> difference whatsoever in this matter. No matter how high the overlay
> priority, the background color of the overlay's face can not override
> the background color of the "region" face (and no attempt at color
> combination occurs). I even tried most-positive-fixnum as the overlay
> priority (and you can't get any higher than that).
I also rechecked the overlay priority issue and found it is not needed.
I think I added it a long time ago when font-lock used overlays.
I checked both X and tty and found the following:
1. When `transient-mark-mode' is enabled the "region" face attributes
overrides any other, but when it is disabled and you use the mouse
to mark a region (the `mouse-drag-region' function) it uses an overlay
and so the overlay priority may have an influence.
2. All the X only face attributes (like box, width, strike-through)
should not be used because they does not work on tty (and some of them
like box and overline also change the display by adding 1 extra pixel
between text lines).
3. If you use attributes not set by the "region" face, most notably
the inverse-video attribute, you can see it through the rest of the
region.
Ehud.
--
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry
next prev parent reply other threads:[~2007-07-28 10:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-21 21:59 no good way to highlight rectangle while region is highlighted Joe Wells
2007-07-23 4:28 ` Richard Stallman
2007-07-23 7:46 ` Joe Wells
2007-07-23 22:30 ` Richard Stallman
2007-07-23 22:52 ` Joe Wells
2007-07-30 16:44 ` Richard Stallman
2007-07-30 17:04 ` Joe Wells
2008-01-23 21:25 ` overlays with higher priority than region [was: no good way to highlight rectangle while region is highlighted] Drew Adams
2007-07-23 17:55 ` no good way to highlight rectangle while region is highlighted Johan Bockgård
2007-07-26 16:59 ` Ehud Karni
2007-07-27 7:52 ` Joe Wells
2007-07-27 8:10 ` Ehud Karni
2007-07-27 13:27 ` Joe Wells
2007-07-27 19:43 ` Ehud Karni
2007-07-28 0:10 ` Joe Wells
2007-07-28 10:33 ` Ehud Karni [this message]
2007-07-27 13:36 ` Dan Nicolaescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200707281033.l6SAX2Vf002064@beta.mvs.co.il \
--to=ehud@unix.mvs.co.il \
--cc=emacs-devel@gnu.org \
--cc=jbw@macs.hw.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).