From unknown Sun Jun 22 03:57:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7033: 23.2; M-n in diff mode causes unwanted face changes Resent-From: Martin Jambor Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Sep 2010 16:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 7033@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12844823227546 (code B ref -1); Tue, 14 Sep 2010 16:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Sep 2010 16:38:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvYWn-0001xf-FD for submit@debbugs.gnu.org; Tue, 14 Sep 2010 12:38:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvYUa-0001wY-0R for submit@debbugs.gnu.org; Tue, 14 Sep 2010 12:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvYWi-0004Ol-Bp for submit@debbugs.gnu.org; Tue, 14 Sep 2010 12:38:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:50034) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvYWV-0004Lb-Hc for submit@debbugs.gnu.org; Tue, 14 Sep 2010 12:38:36 -0400 Received: from [140.186.70.92] (port=53175 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvYWF-0000GM-4V for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 12:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvYW6-0004H5-Dw for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 12:38:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49185 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvYW6-0004GY-3n for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 12:37:58 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 2B44D4844E for ; Tue, 14 Sep 2010 18:37:54 +0200 (CEST) Date: Tue, 14 Sep 2010 18:42:40 +0200 From: Martin Jambor Message-ID: <20100914164240.GA3425@alvy.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.2 (----) X-Mailman-Approved-At: Tue, 14 Sep 2010 12:38:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) When I open almost any patch in the diff mode and press M-n to get to the next hunk, random portions of the text (just parts of a line) change their face from diff-added or diff-removed to diff-refine change. This causes the text to be displayed in a wrong background, causing it to be rather difficult to read (and is always unpleasant). I have not observed any pattern as to what text is changed but it is always exactly the same text in the given file. This does not happen with emacs 22, only with 23, I have observeed it on Suse and Debian linux distributions. I can reproduce the bug when I run emacs with the -Q switch like e.g. emacs -Q patch.diff Where patch.diff is downloaded from http://gcc.gnu.org/cgi-bin/get-raw-msg?listname=gcc-patches&date=2010-09&msgid=20100914130012.GB27066%40virgil.arch.suse.de (but it happens regularly with almost any patch) and then press M-n once. BTW, pressing M-p to get to the previous hunk has the same effect. Thanks for looking into this, Martin In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-08-14 on raven, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10707000 configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_COLLATE: nil value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Diff Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-n M-n M-x e m a r e p o r r e p o r t SPC e m a Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Loading vc-git...done Load-path shadows: /usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/23.2/site-lisp/crypt++ hides /usr/share/emacs/site-lisp/crypt++ /usr/share/emacs/23.2/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.2/lisp/textmodes/flyspell /usr/share/emacs/23.2/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.2/lisp/textmodes/ispell /usr/share/emacs/23.2/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/23.2/lisp/language/thai-word Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug smerge-mode vc-git diff-mode easymenu easy-mmode tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) From unknown Sun Jun 22 03:57:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7033: 23.2; M-n in diff mode causes unwanted face changes Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Sep 2010 08:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Martin Jambor Cc: 7033@debbugs.gnu.org Received: via spool by 7033-submit@debbugs.gnu.org id=B7033.128453771031052 (code B ref 7033); Wed, 15 Sep 2010 08:02:02 +0000 Received: (at 7033) by debbugs.gnu.org; 15 Sep 2010 08:01:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ovmw9-00084n-Uy for submit@debbugs.gnu.org; Wed, 15 Sep 2010 04:01:50 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ovmw7-00084g-I9 for 7033@debbugs.gnu.org; Wed, 15 Sep 2010 04:01:48 -0400 Received: from ceviche.home (vpn-132-204-232-22.acd.umontreal.ca [132.204.232.22]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o8F840dQ031399; Wed, 15 Sep 2010 04:04:01 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 4566D66303; Tue, 14 Sep 2010 23:15:30 +0200 (CEST) From: Stefan Monnier Message-ID: References: <20100914164240.GA3425@alvy.suse.cz> Date: Tue, 14 Sep 2010 23:15:30 +0200 In-Reply-To: <20100914164240.GA3425@alvy.suse.cz> (Martin Jambor's message of "Tue, 14 Sep 2010 18:42:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3622=0 X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.4 (-) > When I open almost any patch in the diff mode and press M-n to get to > the next hunk, random portions of the text (just parts of a line) change > their face from diff-added or diff-removed to diff-refine change. This > causes the text to be displayed in a wrong background, causing it to be > rather difficult to read (and is always unpleasant). I have not > observed any pattern as to what text is changed but it is always exactly > the same text in the given file. > This does not happen with emacs 22, only with 23, I have observeed it on > Suse and Debian linux distributions. I can reproduce the bug when I run > emacs with the -Q switch like e.g. It's not a bug, it's a feature (the diff-refine face is used to highlight the parts of a hunk that are changed, at a finer granularity than just lines). So when the hunk looks like: -foo bar baz +foo toto bar baz the "toto" word will be highlighted. When diffing refilled LaTeX paragraphs where a few words were added/removed, I find it to be invaluable. C-h f diff-auto-refine-mode RET C-h f diff-refine-hunk RET Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 20 14:51:15 2010 Received: (at control) by debbugs.gnu.org; 20 Sep 2010 18:51:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxlSM-0006ni-Rl for submit@debbugs.gnu.org; Mon, 20 Sep 2010 14:51:15 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxlSL-0006nZ-Cm for control@debbugs.gnu.org; Mon, 20 Sep 2010 14:51:13 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OxlUk-0000nS-EL; Mon, 20 Sep 2010 14:53:42 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19607.44470.157189.223640@fencepost.gnu.org> Date: Mon, 20 Sep 2010 14:53:42 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: blue X-Ran: Fa]3,* List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.2 (-----) close 7033 close 6869 24.1