From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Wells Newsgroups: gmane.emacs.devel Subject: Re: no good way to highlight rectangle while region is highlighted Date: Fri, 27 Jul 2007 14:27:49 +0100 Message-ID: <86odhyvuwa.fsf@macs.hw.ac.uk> References: <200707261659.l6QGx4id013794@beta.mvs.co.il> <86sl7awafj.fsf@macs.hw.ac.uk> <200707270810.l6R8AF90032324@beta.mvs.co.il> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1185542859 1770 80.91.229.12 (27 Jul 2007 13:27:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Jul 2007 13:27:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: ehud@unix.mvs.co.il Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 27 15:27:29 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IEPqq-00038d-Sv for ged-emacs-devel@m.gmane.org; Fri, 27 Jul 2007 15:27:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IEPqo-0006B8-6o for ged-emacs-devel@m.gmane.org; Fri, 27 Jul 2007 09:27:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IEPql-0006Aw-UT for emacs-devel@gnu.org; Fri, 27 Jul 2007 09:27:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IEPql-0006Ak-Fp for emacs-devel@gnu.org; Fri, 27 Jul 2007 09:27:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IEPql-0006Ah-CG for emacs-devel@gnu.org; Fri, 27 Jul 2007 09:27:23 -0400 Original-Received: from izanami.macs.hw.ac.uk ([137.195.13.6]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IEPqk-0004xE-PP for emacs-devel@gnu.org; Fri, 27 Jul 2007 09:27:23 -0400 Original-Received: from lxultra1.macs.hw.ac.uk ([137.195.27.173]:53350 helo=127.0.0.1) by izanami.macs.hw.ac.uk with smtp (Exim 4.51) id 1IEPqj-0000mX-BN; Fri, 27 Jul 2007 14:27:21 +0100 Original-Received: (nullmailer pid 12164 invoked by uid 1001); Fri, 27 Jul 2007 13:27:49 -0000 In-Reply-To: <200707270810.l6R8AF90032324@beta.mvs.co.il> (Ehud Karni's message of "Fri\, 27 Jul 2007 11\:10\:15 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75681 Archived-At: "Ehud Karni" writes: > On Fri, 27 Jul 2007 08:52:16, Joe Wells wrote: >> >> "Ehud Karni" writes: >> >> How does your code work in combination with the Emacs C code that >> highlights the region using the "region" face? I think your code will >> have the same problems that I have already described. > > The overlay is set to priority 99 and I sure see it OVER the region. Hi, Ehud, How is this possible? From (info "(elisp)Displaying Faces"): =E2=80=9CIf these various sources together specify more than one face = for a particular character, Emacs merges the attributes of the various faces specified. For each attribute, Emacs tries first the face of any special glyph; then the face for region highlighting, if appropriate; then the faces specified by overlays, followed by those specified by text properties, then the `mode-line' or `mode-line-inactive' or `header-line' face (if in a mode line or a header line), and last the `default' face.=E2=80=9D So the only faces which can override the =E2=80=9Cregion=E2=80=9D face are = the faces for glyphs set with display tables. Overlays can't do that. Because the default =E2=80=9Cregion=E2=80=9D face sets a background color, there is= no way an overlay can override the background color of the region. >> I notice that your code modifies the buffer. This is very undesirable >> for the purpose I have in mind (which is constantly showing the >> current rectangle). > > The code does NOT modify the buffer (you can check it on read only > buffer), please try it before you state such observation. Your goto-col function contains code to modify the buffer. I assumed that this code was used (because otherwise why would it be there?). (By the way (just curious), but why aren't you using Emacs's standard move-to-column function instead?) Anyway, I couldn't try your code because it is incomplete. As far as I can tell, the entry point in what you supplied is mark-set-face and this merely raises an error because there is no code to assign values to the variables mark-1st and mark-2nd that it depends on. >> > I think a strong background color (I use red) is much better because >> > it can not be missed. A frame only (box) can be overlooked, especially >> > when the rectangle is greater than the screen size. >> >> A frame ("box") can be seen fairly easily if its borders are in a >> strong color. > > Not if the area border is not on the screen (which can happen when the > rectangle is greater than a screen, e.g. 150 lines by 120 chars). When one uses the =E2=80=9Cbox=E2=80=9D face feature, every _individual_ li= ne shows a top and bottom border. So there is no possibility of not seeing the frame. --=20 Joe