From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#8925: 23.2; all syntax highlighting disappears from ERC mode when I M-x toggle-show-tabs-show-ws Date: Sat, 25 Jun 2011 10:34:53 -0700 Message-ID: <4E061C3D.4080109@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1309023391 29655 80.91.229.12 (25 Jun 2011 17:36:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Jun 2011 17:36:31 +0000 (UTC) Cc: zooko@zooko.com To: 8925@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 25 19:36:27 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QaWmQ-00036F-7O for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jun 2011 19:36:26 +0200 Original-Received: from localhost ([::1]:50811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaWmP-0005ql-AU for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jun 2011 13:36:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaWm5-0005qF-1u for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2011 13:36:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaWm2-0007LW-UI for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2011 13:36:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaWm2-0007LD-Ha for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2011 13:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QaWm1-0003s5-NL; Sat, 25 Jun 2011 13:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jun 2011 17:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8925 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Cc: 8925@debbugs.gnu.org, Zooko O'Whielacronx Original-Received: via spool by submit@debbugs.gnu.org id=B.130902332114835 (code B ref -1); Sat, 25 Jun 2011 17:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jun 2011 17:35:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QaWlM-0003rD-9Z for submit@debbugs.gnu.org; Sat, 25 Jun 2011 13:35:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QaWlK-0003r1-3M for submit@debbugs.gnu.org; Sat, 25 Jun 2011 13:35:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaWlD-0007HY-Lx for submit@debbugs.gnu.org; Sat, 25 Jun 2011 13:35:12 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:44781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaWlD-0007HU-KU for submit@debbugs.gnu.org; Sat, 25 Jun 2011 13:35:11 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaWlC-0005kG-61 for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2011 13:35:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaWlB-0007H0-Aj for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2011 13:35:10 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:58538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaWlB-0007GX-0j for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2011 13:35:09 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QaWl8-0002W3-Sw for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2011 19:35:06 +0200 Original-Received: from c-24-18-179-193.hsd1.wa.comcast.net ([24.18.179.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jun 2011 19:35:06 +0200 Original-Received: from dan.colascione by c-24-18-179-193.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jun 2011 19:35:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-24-18-179-193.hsd1.wa.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 In-Reply-To: X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 25 Jun 2011 13:36:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47464 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 6/24/11 6:23 PM, Glenn Morris wrote: > "Zooko O'Whielacronx" wrote: > >> ERC normally shows all sorts of useful information by changing the >> fonts, for example, nicks are in different colors. However recently I >> ran M-x toggle-show-tabs-show-ws, and now when I start an ERC buffer >> (for example by joining a new IRC channel), it shows the normal >> syntax-highlighted view, but then whenever I hit a key (or maybe >> whenever someone else posts a message to the channel? I'm not sure) all >> the syntax highlighting disappears, and it becomes a very boring black >> and white rendering of the channel. > > Probably you should report this to the authors of whatever package > provides the function `toggle-show-tabs-show-ws' (it's not part of Emacs). The problem is more general. ERC inserts strings with face properties into its buffer. When _anything_ that uses font-lock also runs in this buffer, font-lock will clear all face attributes and undo ERC's highlighting. This highlighting can't be easily reconstructed because it depends on information no longer present in the buffer, such as the membership list of a channel at the time a particular message was received. There are two approaches to solving the issue: 1) Have ERC use overlays instead of text properties for its highlighting, or 2) Transform ERC face properties to another property (e.g., erc-face), and create a custom font-lock matcher that applies the highlights stored in these erc-face properties to face, allowing the highlighting scheme to be reconstructed on demand. The first is arguably cleaner, but without setting face, text yanked to another buffer from an ERC buffer will be unhighlighted. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEUEARECAAYFAk4GHDsACgkQ17c2LVA10VuN3QCVEPDiJxaS9d5q2nBtIzzLL31I zACg126suj9jFjrv9hgOXvf1SfqCiBs= =pfdM -----END PGP SIGNATURE-----