From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Darren Hoo Newsgroups: gmane.emacs.devel Subject: Re: About the :distant-foreground face attribute Date: Fri, 10 Jan 2014 04:58:57 +0800 Message-ID: References: <87bnzo9cja.fsf@gnu.org> <59B7E7FC-48D0-4737-B1BB-FFAC5BA9E07A@swipnet.se> <874n5f3162.fsf@gnu.org> <83fvozf86g.fsf@gnu.org> <87r48javwe.fsf@gnu.org> <83bnzmfjxe.fsf@gnu.org> <87bnzlyvwb.fsf@gnu.org> <83zjn5cch3.fsf@gnu.org> <87fvoxxe73.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389301165 8922 80.91.229.3 (9 Jan 2014 20:59:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2014 20:59:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 09 21:59:31 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W1MhO-0007BP-2V for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 21:59:30 +0100 Original-Received: from localhost ([::1]:54074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1MhN-00043w-P6 for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 15:59:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1MhF-0003tq-BT for emacs-devel@gnu.org; Thu, 09 Jan 2014 15:59:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1Mh9-0003pc-Bb for emacs-devel@gnu.org; Thu, 09 Jan 2014 15:59:21 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:59724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1Mh9-0003pQ-4N for emacs-devel@gnu.org; Thu, 09 Jan 2014 15:59:15 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W1Mh5-0006SB-3U for emacs-devel@gnu.org; Thu, 09 Jan 2014 21:59:11 +0100 Original-Received: from 111.196.171.36 ([111.196.171.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jan 2014 21:59:11 +0100 Original-Received: from darren.hoo by 111.196.171.36 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jan 2014 21:59:11 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 48 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.196.171.36 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (darwin) Cancel-Lock: sha1:UBFZIY9Sg1SnlXQ9UUM3f55tJ4w= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:167977 Archived-At: David Engster writes: > Eli Zaretskii writes: >> The solution should be able to cope with the need to dynamically >> decide which color is used as a foreground, based on the current >> background. It also needs to support the possibility that a face will >> want to force use of a specific fixed foreground color, regardless of >> the background. (Jan, did I miss some additional requirements?) If >> you can propose a cleaner solution that satisfies these requirements, >> please do, and let's discuss that. > > I still wonder why it is necessary in the first place. > > From my experience, editors usually simply drop font-lock when you mark > text (at least Eclipse does that, and in gvim it seems to be > configurable), and I think that is a good default. When you mark a > region, you want to apply some kind of operation on it, after which the > region will be gone and font lock is restored. > That's quite contrary to my experience. Even for old emacs like emacs22 font-lock is kept on marked text with transient-mark-mode enabled. As to other tools like Eclipse, Netbeans,Xcode selected text does not lose syntax highlight either. Especially for Eclipse I remembered that when I used it about a decade ago copying selected code from Eclipse to other WYSIWYG applications like MS PowerPoint the syntax highlight is also copied ie, rich formatted. > If you really really want font-lock on a marked region, then you will > have to choose a region background which will play well with your color > theme. Introducing a new face attribute for such a small annoyance looks > like overkill to me. I must say here that my experience with color theme is way much better and much less flaws than before it's integerated thanks to the work of all the developers especially cyd. I hope the feature be kept without introducing too much maitainabitly burden, with code both easier for user to understand and theme writers to customize. > However, I also don't feel very strong about this issue. I do. I find myself get an uneasy feeling when font-lock is lost on marked text.