From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#10181: 24.0.92; [wishlist] split `diff-refine-change' in several faces Date: Sat, 19 May 2012 02:07:14 +0300 Organization: JURTA Message-ID: <87d361w2ea.fsf@mail.jurta.org> References: <87txzftzn0.fsf@mail.jurta.org> <87396yxr9u.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1337382588 2211 80.91.229.3 (18 May 2012 23:09:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 May 2012 23:09:48 +0000 (UTC) Cc: 10181@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 19 01:09:47 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1SVWIs-0001qv-AV for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 May 2012 01:09:46 +0200 Original-Received: from localhost ([::1]:48648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVWIr-00069Z-AT for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 May 2012 19:09:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVWIo-00069J-IC for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 19:09:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVWIm-0008Li-Jg for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 19:09:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVWIm-0008LM-GG for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 19:09:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SVWJ8-0007Qn-Gx for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 19:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 May 2012 23:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10181 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10181-submit@debbugs.gnu.org id=B10181.133738254828494 (code B ref 10181); Fri, 18 May 2012 23:10:02 +0000 Original-Received: (at 10181) by debbugs.gnu.org; 18 May 2012 23:09:08 +0000 Original-Received: from localhost ([127.0.0.1]:33307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVWIF-0007PW-V8 for submit@debbugs.gnu.org; Fri, 18 May 2012 19:09:08 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:58354 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVWID-0007PO-Hz for 10181@debbugs.gnu.org; Fri, 18 May 2012 19:09:06 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 47540451C9B7; Fri, 18 May 2012 16:08:39 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 18 May 2012 14:12:05 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60200 Archived-At: > Thank Juri. The patch looks like a good idea. Checking the :inherit is > not sufficient, because I'd typically modify the added-face without > removing the inheritance. > Better to add a customization variable. > > This said, the OP's request is about the diff-refine-hook case, not > about the whole-line highlighting. The reason why I picked this report is because I found that I can't anymore use diff-mode without these improvements. I suppose everyone dealing with the UI of modern version control systems including our very own http://bzr.savannah.gnu.org/lh/emacs/trunk/changes that uses red to highlight diff deletions and green to highlight diff insertions might feel uncomfortable with the current default Emacs colored diff. AFAICS, some users might prefer an older color scheme with three colors (removed - red, changed - yellow, added - green) used in the UI of older version control systems like ViewVC for CVS and Subversion, but some users might prefer a color scheme used in newer VCS like Loggerhead for Bazaar with just two colors (removed - red, added - green). The diff-refine-hook case depends on this customization, i.e. when the user prefers the removed-changed-added scheme, then the face `diff-refine-change' should be used. When the user prefers the removed-added scheme, then only `diff-refine-removed' and `diff-refine-added' should be used. One solution would be to define `diff-changed-face' (currently defvar) with defcustom. Then users will be able to customize it to nil to use just two faces `diff-removed' and `diff-added'.