From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: a emacs mode to see newline, tabs, spaces Date: Fri, 21 Aug 2009 09:07:20 -0700 Message-ID: <97E11A45CB0242BBA29F888B96ADB698@us.oracle.com> References: <3b9893450908131210p15d4d610vfaad872b973c5768@mail.gmail.com> <87hbw43u32.fsf@mundaneum.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250871172 28702 80.91.229.12 (21 Aug 2009 16:12:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2009 16:12:52 +0000 (UTC) To: "=?iso-8859-1?Q?'S=E9bastien_Vauban'?=" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 21 18:12:45 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MeWjK-0006q8-M8 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 18:12:42 +0200 Original-Received: from localhost ([127.0.0.1]:39502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeWjJ-0000xT-Ux for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 12:12:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeWeQ-0005LW-Ow for help-gnu-emacs@gnu.org; Fri, 21 Aug 2009 12:07:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeWeL-0005JC-OG for help-gnu-emacs@gnu.org; Fri, 21 Aug 2009 12:07:38 -0400 Original-Received: from [199.232.76.173] (port=40703 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeWeL-0005J7-KF for help-gnu-emacs@gnu.org; Fri, 21 Aug 2009 12:07:33 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:58344) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MeWeL-0008F3-11 for help-gnu-emacs@gnu.org; Fri, 21 Aug 2009 12:07:33 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7LG8Ccl013843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Aug 2009 16:08:13 GMT Original-Received: from abhmt005.oracle.com (abhmt005.oracle.com [141.146.116.14]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7LG7Sio022251; Fri, 21 Aug 2009 16:07:28 GMT Original-Received: from dradamslap1 (/141.144.245.31) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Aug 2009 09:07:24 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87hbw43u32.fsf@mundaneum.com> Thread-Index: AcoiYdhT5Ax8IXrFSais4lc4DIHXxAAFlS9Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt005.oracle.com [141.146.116.14] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4A8EC63D.0255:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67362 Archived-At: > >> Is there any way to put emacs in a mode which I can > >> visualize newline, tab, space? > > > > http://www.emacswiki.org/emacs/ShowWhiteSpace > > When highlighting tab characters with the following snippet > of code, my Gnus Group buffer becomes black-and-white only. > > (require 'show-wspace) > (add-hook 'font-lock-mode-hook 'highlight-tabs) I know nothing about a function called `highlight-tabs'. The function defined in show-wspace.el is `show-ws-highlight-tabs'. Is that what you meant (what you used)? > Same happens with the following: > (add-hook 'font-lock-mode-hook > '(lambda () > (font-lock-add-keywords > nil > '(("\t" 0 'trailing-whitespace prepend))))) Again, I know nothing about `trailing-whitespace'. show-wspace.el defines this function: `show-ws-highlight-trailing-whitespace'. > Any idea why? I suspect you might be mixing things from two or more different whitespace-display packages. If you want to use show-wspace.el to show whitespace, follow the instructions in the file. For example: (require 'show-wspace) ;; Highlight tabs (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs) ;; Highlight trailing whitespace (add-hook 'font-lock-mode-hook 'show-ws-highlight-trailing-whitespace) ;; Highlight non-breaking spaces (add-hook 'font-lock-mode-hook `show-ws-highlight-hard-spaces') If that approach doesn't work for you, please send me a recipe to reproduce the problem, starting with `emacs -Q'. I don't use Gnus, so if you can provide a simpler recipe, that's good.