From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: About the :distant-foreground face attribute Date: Thu, 09 Jan 2014 22:17:32 +0100 Message-ID: <87bnzkyhw3.fsf@engster.org> 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 1389302278 21424 80.91.229.3 (9 Jan 2014 21:17:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jan 2014 21:17:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Darren Hoo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 09 22:18:03 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 1W1MzK-0007JX-7X for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 22:18:02 +0100 Original-Received: from localhost ([::1]:54163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1MzJ-0003EJ-KU for ged-emacs-devel@m.gmane.org; Thu, 09 Jan 2014 16:18:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1MzB-0003D2-81 for emacs-devel@gnu.org; Thu, 09 Jan 2014 16:17:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1Mz3-0001MJ-3U for emacs-devel@gnu.org; Thu, 09 Jan 2014 16:17:53 -0500 Original-Received: from randomsample.de ([5.45.97.173]:36812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1Mz2-0001LW-Pk for emacs-devel@gnu.org; Thu, 09 Jan 2014 16:17:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=hdhoLhc3Oj1nQA86cwKfdpkYAhJcRQdkKEgWhIoqMM4=; b=pBPRU9SS/mQdL4nPwo+Jmp3loRC8K3r2vH8rkb5ee9Sz2K89NfdMDDkOMMgSXAStmTp3inhtr+2e0ZNx6+utap+lO1HAXylUykGj7rAHkxnakcQ37rSd/Q9C1OqV4kuX; Original-Received: from dslc-082-083-043-217.pools.arcor-ip.net ([82.83.43.217] helo=spaten) by randomsample.de with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1W1Myv-0001Ei-NH; Thu, 09 Jan 2014 22:17:38 +0100 In-Reply-To: (Darren Hoo's message of "Fri, 10 Jan 2014 04:58:57 +0800") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Mail-Followup-To: Darren Hoo , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.45.97.173 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:167979 Archived-At: Darren Hoo writes: > 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. My Eclipse does that. I use the Zenburn color theme, though. Maybe it is configurable, I don't know. Anyway, I think that it is the right *default* behavior: making the region clearly visible and not caring about font lock. > 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. And what do those editors do when the highlight background color is very similar to one of the font-lock colors? > I find myself get an uneasy feeling when font-lock is lost on marked > text. Well, I don't. -David