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: How to show all characters in a specific line Date: Wed, 31 Dec 2014 19:17:40 -0800 (PST) Message-ID: <767948ac-03d6-4203-b133-91fb8cb30757@default> References: <87a92334hb.fsf@reader.local.lan> <87wq571de9.fsf@reader.local.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420082287 3073 80.91.229.3 (1 Jan 2015 03:18:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Jan 2015 03:18:07 +0000 (UTC) To: Harry Putnam , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 01 04:17:59 2015 Return-path: Envelope-to: geh-help-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 1Y6WGs-0000ln-LP for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Jan 2015 04:17:58 +0100 Original-Received: from localhost ([::1]:41907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6WGr-0002JL-OX for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Dec 2014 22:17:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6WGg-0002JG-LO for help-gnu-emacs@gnu.org; Wed, 31 Dec 2014 22:17:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6WGd-0003fB-DW for help-gnu-emacs@gnu.org; Wed, 31 Dec 2014 22:17:46 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:35660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6WGd-0003ex-6V for help-gnu-emacs@gnu.org; Wed, 31 Dec 2014 22:17:43 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t013Hfhn010261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Jan 2015 03:17:42 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t013He6J028604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 1 Jan 2015 03:17:41 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t013HeYd028596; Thu, 1 Jan 2015 03:17:40 GMT In-Reply-To: <87wq571de9.fsf@reader.local.lan> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101819 Archived-At: > `whitespace-mode' seems to do all I wanted and compared to > `highlight-chars', it is much more readable since it doesn't just > put a fairly opaque blob of color where a tab is used. >=20 > (I realize the face is customizable... but by default its fairly > blotto looking to read) The default color for the TAB-highlighting face is a pale yellow or off-white background (`LemonChiffon'). > `whitespace-mode' puts an icon of sorts: >> but smaller, for tab and > . for space. All on a background color of a medium dark grey. >=20 > Mush easier on the eyes and easier to ascertain immediately what has > been put down. >=20 > But still (And no religious scrap intended) neither of those is > really as readable and handy as vim's :l Which puts only an icon > in the place of \t (^I). It collapses the whitespace and puts a > series of ^I for however many \t were used. To get that effect, all you need to do is to tell Emacs to treat TAB the same way it treats other control characters (except newline): (aset (window-display-table) 9 (vector (make-glyph-code ?^ 'escape-glyph) (make-glyph-code (+ 9 64) 'escape-glyph))) You can use whatever display table you like in place of `(window-display-table)' - for example, you can create your own or you can change `standard-display-table'. That code is taken from the Elisp manual, node `Display Tables'. 9 is the value of a TAB character (`C-i'). > I don't think a snippet of whitespace-mode or hightlight-chars will > survive mail incoding without creating some kind of image of it, but > the vim look is just common keyboard characters with no higlight: >=20 > This: > rsync_short_args -avlR > rsync_long_args --stats --delete --numeric-ids --delete- > excluded >=20 > Becomes: > rsync_short_args^I-avlR$ > rsync_long_args^I--stats^I--delete^I--numeric-ids^I--delete- > excluded$ See above. That is how Emacs treats control characters generally, except for newline and TAB, provided your option `ctl-arrow' is non-nil.