all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* replacement for whitespace-tab
@ 2017-10-23 23:45 Will Parsons
  2017-10-23 23:52 ` Mario Castelán Castro
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Will Parsons @ 2017-10-23 23:45 UTC (permalink / raw)
  To: help-gnu-emacs

I noticed that in one of my Emacs configurations I had customized the value
of whitespace-tab to better distinguish visually tabs from spaces.  When I
did a C-h v on the variable (under Emacs 25.2) I got the message:

  This variable is obsolete since 24.4;
  use the face instead.

Unfortunately, this extremely terse message gives me no useful information on
how to actually *replace* whitespace-tab.  I have looked under the
customization buffer under Faces and see no obvious candidates for
highlighting tabs, looked under Emacs News in vain, and searched the web
(which frustratingly tends to yield a lot of obsolete information).  So what
*is* the officially approved way nowadays of highlighting tabs?

-- 
Will


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-23 23:45 replacement for whitespace-tab Will Parsons
@ 2017-10-23 23:52 ` Mario Castelán Castro
  2017-10-24  0:12   ` Emanuel Berg
       [not found]   ` <mailman.2087.1508804123.27995.help-gnu-emacs@gnu.org>
  2017-10-24  0:08 ` Emanuel Berg
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 26+ messages in thread
From: Mario Castelán Castro @ 2017-10-23 23:52 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

> (which frustratingly tends to yield a lot of obsolete information).  So what
> *is* the officially approved way nowadays of highlighting tabs?

Probably it is whitespace-mode. That is what I use in 24.5 and comes
built-in. Read its entry in the official Emacs manual for customization
options.

-- 
Do not eat animals; respect them as you respect people.
https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-23 23:45 replacement for whitespace-tab Will Parsons
  2017-10-23 23:52 ` Mario Castelán Castro
@ 2017-10-24  0:08 ` Emanuel Berg
  2017-10-24  0:09 ` Emanuel Berg
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  0:08 UTC (permalink / raw)
  To: help-gnu-emacs

Will Parsons wrote:

> I noticed that in one of my Emacs
> configurations I had customized the value of
> whitespace-tab to better distinguish visually
> tabs from spaces. When I did a C-h v on the
> variable (under Emacs 25.2) I got the message:
>
> This variable is obsolete since 24.4; use the
> face instead.

Use the face! :) ???

Just about the only use case where tabs are
around, for some arcane reason, is in the
makefiles. There, you can use the face
`makefile-space' so not to be fooled
by whitespaces.

However even that is not really necessary as
you can have that fixed when you save the file.
Which one should do before compile - right?

You can automate deleting tabs (converting them
to spaces) on save with the below stuff.
The function "untab-all" doesn't seem to be
needed anymore (or ever?) tho...

;; (setq before-save-hook nil)
(defun before-save-hook-f ()
  (delete-trailing-whitespace) )
(add-hook 'before-save-hook #'before-save-hook-f)

(setq-default indent-tabs-mode nil)

(setq-default tab-width 3)

(defun untab-all ()
  (unless (member major-mode '(makefile-gmake-mode
                               makefile-mode) ) ; exceptions
    (untabify (point-min) (point-max)))
  nil) ; tell "did not write buffer to disk"

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-23 23:45 replacement for whitespace-tab Will Parsons
  2017-10-23 23:52 ` Mario Castelán Castro
  2017-10-24  0:08 ` Emanuel Berg
@ 2017-10-24  0:09 ` Emanuel Berg
  2017-10-24  0:12   ` Mario Castelán Castro
       [not found] ` <mailman.2081.1508802776.27995.help-gnu-emacs@gnu.org>
       [not found] ` <mailman.2084.1508803714.27995.help-gnu-emacs@gnu.org>
  4 siblings, 1 reply; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  0:09 UTC (permalink / raw)
  To: help-gnu-emacs

Will Parsons wrote:

> I noticed that in one of my Emacs
> configurations I had customized the value of
> whitespace-tab to better distinguish visually
> tabs from spaces. When I did a C-h v on the
> variable (under Emacs 25.2) I got the
> message:
>
> This variable is obsolete since 24.4; use the
> face instead.

By the way, I don't have that variable at all
in

    GNU Emacs 24.4.1
    (arm-unknown-linux-gnueabihf, GTK+ Version
    3.14.5) of 2015-03-10 on bm-wb-01, modified
    by Debian

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:09 ` Emanuel Berg
@ 2017-10-24  0:12   ` Mario Castelán Castro
  2017-10-24  0:26     ` Emanuel Berg
  0 siblings, 1 reply; 26+ messages in thread
From: Mario Castelán Castro @ 2017-10-24  0:12 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

On 23/10/17 19:09, Emanuel Berg wrote:
> By the way, I don't have that variable at all
> in
> 
>     GNU Emacs 24.4.1
>     (arm-unknown-linux-gnueabihf, GTK+ Version
>     3.14.5) of 2015-03-10 on bm-wb-01, modified
>     by Debian
> 

Just for curiosity, what is the ARM machine that you are using?

-- 
Do not eat animals; respect them as you respect people.
https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-23 23:52 ` Mario Castelán Castro
@ 2017-10-24  0:12   ` Emanuel Berg
       [not found]   ` <mailman.2087.1508804123.27995.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  0:12 UTC (permalink / raw)
  To: help-gnu-emacs

Mario Castelán Castro wrote:

>> (which frustratingly tends to yield a lot of
>> obsolete information). So what *is* the
>> officially approved way nowadays of
>> highlighting tabs?
>
> Probably it is whitespace-mode. That is what
> I use in 24.5 and comes built-in.

OK, now I get it as well. Then the face should
be `whitespace-space'! 

> Read its entry in the official Emacs manual
> for customization options.

...

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:12   ` Mario Castelán Castro
@ 2017-10-24  0:26     ` Emanuel Berg
  2017-10-24  0:28       ` Mario Castelán Castro
  0 siblings, 1 reply; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  0:26 UTC (permalink / raw)
  To: help-gnu-emacs

Mario Castelán Castro wrote:

>> By the way, I don't have that variable at
>> all in
>> 
>>   GNU Emacs 24.4.1
>>   (arm-unknown-linux-gnueabihf, GTK+ Version
>>   3.14.5) of 2015-03-10 on bm-wb-01,
>>   modified by Debian
>
> Just for curiosity, what is the ARM machine
> that you are using?

ARM = Array of Redundant Machines

$ uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun
30 14:47:43 BST 2017 armv7l GNU/Linux

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:26     ` Emanuel Berg
@ 2017-10-24  0:28       ` Mario Castelán Castro
  2017-10-24  0:41         ` Alexis
  0 siblings, 1 reply; 26+ messages in thread
From: Mario Castelán Castro @ 2017-10-24  0:28 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

On 23/10/17 19:26, Emanuel Berg wrote:
>> Just for curiosity, what is the ARM machine
>> that you are using?
> 
> ARM = Array of Redundant Machines

Thanks for answering.

-- 
Do not eat animals; respect them as you respect people.
https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:28       ` Mario Castelán Castro
@ 2017-10-24  0:41         ` Alexis
  2017-10-24  0:51           ` Emanuel Berg
  2017-10-24  0:51           ` Mario Castelán Castro
  0 siblings, 2 replies; 26+ messages in thread
From: Alexis @ 2017-10-24  0:41 UTC (permalink / raw)
  To: Mario Castelán Castro; +Cc: help-gnu-emacs


Mario Castelán Castro <marioxcc.MT@yandex.com> writes:

> On 23/10/17 19:26, Emanuel Berg wrote:
>>> Just for curiosity, what is the ARM machine
>>> that you are using?
>>
>> ARM = Array of Redundant Machines
>
> Thanks for answering.

Fairly sure that ARM in this context is actually referring to 
Acorn RISC
Machine / Advanced RISC Machine:

https://en.wikipedia.org/wiki/ARM_architecture


Alexis.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
       [not found] ` <mailman.2081.1508802776.27995.help-gnu-emacs@gnu.org>
@ 2017-10-24  0:49   ` Will Parsons
  2017-10-24  0:55     ` Emanuel Berg
  2017-10-24  1:14     ` Alexis
  0 siblings, 2 replies; 26+ messages in thread
From: Will Parsons @ 2017-10-24  0:49 UTC (permalink / raw)
  To: help-gnu-emacs

Mario Castelán Castro wrote:
> This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
> --95hjorXhoS4JWopja6U1m3nnEaXH62L84
> From: =?UTF-8?Q?Mario_Castel=c3=a1n_Castro?= <marioxcc.MT@yandex.com>
> To: help-gnu-emacs@gnu.org
> Message-ID: <48503753-c2a9-33ce-d2f2-bce82d1001ee@yandex.com>
> Subject: Re: replacement for whitespace-tab
> References: <f57d8dF5f11U1@mid.individual.net>
> In-Reply-To: <f57d8dF5f11U1@mid.individual.net>
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: quoted-printable
>
>> (which frustratingly tends to yield a lot of obsolete information).  So=
>  what
>> *is* the officially approved way nowadays of highlighting tabs?
>
> Probably it is whitespace-mode. That is what I use in 24.5 and comes
> built-in. Read its entry in the official Emacs manual for customization
> options.

@#$%^&*!
*What* entry in "the official Emacs manual for customization options"???
This may be quite obvious to you, but it certainly isn't to me!

-- 
Will


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:41         ` Alexis
@ 2017-10-24  0:51           ` Emanuel Berg
  2017-10-24  0:53             ` Mario Castelán Castro
  2017-10-24  0:51           ` Mario Castelán Castro
  1 sibling, 1 reply; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  0:51 UTC (permalink / raw)
  To: help-gnu-emacs

Alexis wrote:

>>> ARM = Array of Redundant Machines
>>
>> Thanks for answering.
>
> Fairly sure that ARM in this context is
> actually referring to Acorn RISC Machine /
> Advanced RISC Machine

It is a Raspberry Pi 3 Model B. Here is how it
looked a couple of minutes ago:

    http://user.it.uu.se/~embe8573/work-photos/rpi.jpg

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:41         ` Alexis
  2017-10-24  0:51           ` Emanuel Berg
@ 2017-10-24  0:51           ` Mario Castelán Castro
  2017-10-24  0:58             ` Emanuel Berg
  2017-10-24  1:11             ` Alexis
  1 sibling, 2 replies; 26+ messages in thread
From: Mario Castelán Castro @ 2017-10-24  0:51 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

On 23/10/17 19:41, Alexis wrote:
> Fairly sure that ARM in this context is actually referring to Acorn RISC
> Machine / Advanced RISC Machine:
> 
> https://en.wikipedia.org/wiki/ARM_architecture

I know. It is just that I elided the rest of the message I was replying
to. Anyway, Wikipedia is of inconsistent quality. I do not recommend it.
Consult specialized texts instead.

-- 
Do not eat animals; respect them as you respect people.
https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:51           ` Emanuel Berg
@ 2017-10-24  0:53             ` Mario Castelán Castro
  0 siblings, 0 replies; 26+ messages in thread
From: Mario Castelán Castro @ 2017-10-24  0:53 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]

On 23/10/17 19:51, Emanuel Berg wrote:
> It is a Raspberry Pi 3 Model B. Here is how it
> looked a couple of minutes ago:
> 
>     http://user.it.uu.se/~embe8573/work-photos/rpi.jpg

It looks like it may fall and the case can then break. Beware.

-- 
Do not eat animals; respect them as you respect people.
https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
       [not found] ` <mailman.2084.1508803714.27995.help-gnu-emacs@gnu.org>
@ 2017-10-24  0:55   ` Will Parsons
  2017-10-24  7:47     ` Stephen Berman
                       ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Will Parsons @ 2017-10-24  0:55 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg wrote:
> Will Parsons wrote:
>
>> I noticed that in one of my Emacs
>> configurations I had customized the value of
>> whitespace-tab to better distinguish visually
>> tabs from spaces. When I did a C-h v on the
>> variable (under Emacs 25.2) I got the message:
>>
>> This variable is obsolete since 24.4; use the
>> face instead.
>
> Use the face! :) ???

Um, how?  That is the question.

> Just about the only use case where tabs are
> around, for some arcane reason, is in the
> makefiles. There, you can use the face
> `makefile-space' so not to be fooled
> by whitespaces.
>
> However even that is not really necessary as
> you can have that fixed when you save the file.
> Which one should do before compile - right?
>
> You can automate deleting tabs (converting them
> to spaces) on save with the below stuff.
> The function "untab-all" doesn't seem to be
> needed anymore (or ever?) tho...
...

Yes, yes - I basically agree with you about the use of tabs, but for various
reasons (including that the code may not be one's own) one doesn't
necessarily want just replace them, but actually know where they are - and
that is the purpose of the question.

-- 
Will


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:49   ` Will Parsons
@ 2017-10-24  0:55     ` Emanuel Berg
  2017-10-24  1:14     ` Alexis
  1 sibling, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  0:55 UTC (permalink / raw)
  To: help-gnu-emacs

Will Parsons wrote:

> @#$%^&*! *What* entry in "the official Emacs
> manual for customization options"??? This may
> be quite obvious to you, but it certainly
> isn't to me!

Reading the manual is always so complicated!
Here, you can just enter whitespace mode, move
cursor/point to where space is indicated by the
mid dot char, and then either do
`describe-char' or use this

    (defun what-face (pos)
      (interactive "d")
      (let((face (or (get-char-property pos 'face)
                     (get-char-property pos 'read-cf-name) )))
        (message " Face: %s" (or face "(no face!)")) ))

to get the face. Do the same and see if there
is a tab face as well!

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:51           ` Mario Castelán Castro
@ 2017-10-24  0:58             ` Emanuel Berg
  2017-10-24  1:11             ` Alexis
  1 sibling, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  0:58 UTC (permalink / raw)
  To: help-gnu-emacs

Mario Castelán Castro wrote:

>> Fairly sure that ARM in this context is
>> actually referring to Acorn RISC Machine /
>> Advanced RISC Machine:
>> 
>> https://en.wikipedia.org/wiki/ARM_architecture
>
> I know. It is just that I elided the rest of
> the message I was replying to. Anyway,
> Wikipedia is of inconsistent quality. I do
> not recommend it. Consult specialized
> texts instead.

Yeah, I heard the French put together a good
encyclopedia during their Enlightenment period.
Perhaps worth checking out if the mundane
Wikipedia fails yet again to deliver
esoteric knowledge?

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
       [not found]   ` <mailman.2087.1508804123.27995.help-gnu-emacs@gnu.org>
@ 2017-10-24  1:02     ` Will Parsons
  2017-10-24  1:08       ` Emanuel Berg
  0 siblings, 1 reply; 26+ messages in thread
From: Will Parsons @ 2017-10-24  1:02 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg wrote:
> Mario Castelán Castro wrote:
>
>>> (which frustratingly tends to yield a lot of
>>> obsolete information). So what *is* the
>>> officially approved way nowadays of
>>> highlighting tabs?
>>
>> Probably it is whitespace-mode. That is what
>> I use in 24.5 and comes built-in.
>
> OK, now I get it as well. Then the face should
> be `whitespace-space'! 

I'm glad *you* get it, but I certainly don't.  *What* in fact should I be
doing, either in my .emacs file, or via the customization interface?

-- 
Will


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  1:02     ` Will Parsons
@ 2017-10-24  1:08       ` Emanuel Berg
  0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  1:08 UTC (permalink / raw)
  To: help-gnu-emacs

Will Parsons wrote:

>> OK, now I get it as well. Then the face
>> should be `whitespace-space'!
>
> I'm glad *you* get it, but I certainly don't.
> *What* in fact should I be doing, either in
> my .emacs file, or via the
> customization interface?

(modify-face 'whitespace-space "red" nil nil t)

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:51           ` Mario Castelán Castro
  2017-10-24  0:58             ` Emanuel Berg
@ 2017-10-24  1:11             ` Alexis
  2017-10-24  1:39               ` Emanuel Berg
  1 sibling, 1 reply; 26+ messages in thread
From: Alexis @ 2017-10-24  1:11 UTC (permalink / raw)
  To: Mario Castelán Castro; +Cc: help-gnu-emacs


Mario Castelán Castro <marioxcc.MT@yandex.com> writes:

> On 23/10/17 19:41, Alexis wrote:
>> Fairly sure that ARM in this context is actually referring to 
>> Acorn RISC
>> Machine / Advanced RISC Machine:
>>
>> https://en.wikipedia.org/wiki/ARM_architecture
>
> I know. It is just that I elided the rest of the message I was
> replying to.

Okay. It's just that the message you replied to stated that:

"ARM = Array of Redundant Machines"

which at least in this context, does not seem to me to be 
correct. Since
you did not address this yourself, i wanted to clarify what the 
acronym
meant, if not for yourself, then for other readers of this list.

> Anyway, Wikipedia is of inconsistent quality. I do not recommend 
> it.
> Consult specialized texts instead.

Wikipedia is indeed of inconsistent quality. Otoh, i am not aware 
of any
specialised text that contradicts its description of what 'ARM' 
stands
for. (i've become interested in ARM of late due to my interest in 
the
RISC-V project.) If you know of one, i'd be happy for my 
understanding
of the 'ARM' acronym to be corrected.


Alexis.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:49   ` Will Parsons
  2017-10-24  0:55     ` Emanuel Berg
@ 2017-10-24  1:14     ` Alexis
  1 sibling, 0 replies; 26+ messages in thread
From: Alexis @ 2017-10-24  1:14 UTC (permalink / raw)
  To: wbparsons; +Cc: help-gnu-emacs


Will Parsons <wbp@nodomain.invalid> writes:

> @#$%^&*!
> *What* entry in "the official Emacs manual for customization 
> options"???
> This may be quite obvious to you, but it certainly isn't to me!

C-h r i whitespace mode RET


Alexis.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  1:11             ` Alexis
@ 2017-10-24  1:39               ` Emanuel Berg
  0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24  1:39 UTC (permalink / raw)
  To: help-gnu-emacs

Alexis wrote:

> "ARM = Array of Redundant Machines"
>
> [...]
>
> i've become interested in ARM of late due to
> my interest in the RISC-V project.

Well, you know what they say, "You can fire
your arrows from the Tower of Babel, but you
can NEVER strike God!"

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:55   ` Will Parsons
@ 2017-10-24  7:47     ` Stephen Berman
  2017-10-24  9:31     ` Nick Helm
       [not found]     ` <mailman.2103.1508831239.27995.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 26+ messages in thread
From: Stephen Berman @ 2017-10-24  7:47 UTC (permalink / raw)
  To: wbparsons; +Cc: help-gnu-emacs

On 24 Oct 2017 00:55:23 GMT Will Parsons <wbp@nodomain.invalid> wrote:

> Emanuel Berg wrote:
>> Will Parsons wrote:
>>
>>> I noticed that in one of my Emacs
>>> configurations I had customized the value of
>>> whitespace-tab to better distinguish visually
>>> tabs from spaces. When I did a C-h v on the
>>> variable (under Emacs 25.2) I got the message:
>>>
>>> This variable is obsolete since 24.4; use the
>>> face instead.
>>
>> Use the face! :) ???
>
> Um, how?  That is the question.

By typing `M-x customize-face'.  The file whitespace.el defines both a
variable and a face named `whitespace-tab', and the former is now
obsolete.

Steve Berman



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  0:55   ` Will Parsons
  2017-10-24  7:47     ` Stephen Berman
@ 2017-10-24  9:31     ` Nick Helm
  2017-10-24 15:30       ` Emanuel Berg
       [not found]       ` <mailman.2114.1508859102.27995.help-gnu-emacs@gnu.org>
       [not found]     ` <mailman.2103.1508831239.27995.help-gnu-emacs@gnu.org>
  2 siblings, 2 replies; 26+ messages in thread
From: Nick Helm @ 2017-10-24  9:31 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, 24 Oct 2017, Will Parsons wrote:

> Yes, yes - I basically agree with you about the use of tabs, but for
> various reasons (including that the code may not be one's own) one
> doesn't necessarily want just replace them, but actually know where
> they are - and that is the purpose of the question.

You can use the built-in whitespace library to change the way Emacs
displays characters, including tabs, on screen.

One of the faces defined in this library – whitespace-tab – determines
how tabs look when the mode is active. A variable by the same name used
to do the same job.

To change the way tabs look, put something like this in your .emacs and
restart:

  (require 'whitespace)
  (setq whitespace-style '(face tabs)) ;this enables faces for tabs
  (set-face-attribute 
    'whitespace-tab nil :inherit 'default     
                        :foreground "red"
                        :underline t)

Then turn the mode on with (repeat to turn it off again):

  M-x global-whitespace-mode RET 

This will add a red underline to tabs in all your buffers. You can also
remap tabs to another character, such as a right arrow, but this
involves more than just faces.

In both cases (faces and remapping) Emacs shows an on-screen
representation only – your buffers and the contents of your files retain
all their original tabs.

--
Nick



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
  2017-10-24  9:31     ` Nick Helm
@ 2017-10-24 15:30       ` Emanuel Berg
       [not found]       ` <mailman.2114.1508859102.27995.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2017-10-24 15:30 UTC (permalink / raw)
  To: help-gnu-emacs

Nick Helm wrote:

> One of the faces defined in this library –
> whitespace-tab – determines how tabs look
> when the mode is active. A variable by the
> same name used to do the same job.

Aha, so this is the reason for the strange
docstring "use the face instead"!
Perhaps change this into "Use the face with the
same name instead." or simply "Use the face
whitespace-tab instead."

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
       [not found]     ` <mailman.2103.1508831239.27995.help-gnu-emacs@gnu.org>
@ 2017-10-24 21:31       ` Will Parsons
  0 siblings, 0 replies; 26+ messages in thread
From: Will Parsons @ 2017-10-24 21:31 UTC (permalink / raw)
  To: help-gnu-emacs

Stephen Berman wrote:
> On 24 Oct 2017 00:55:23 GMT Will Parsons <wbp@nodomain.invalid> wrote:
>
>> Emanuel Berg wrote:
>>> Will Parsons wrote:
>>>
>>>> I noticed that in one of my Emacs
>>>> configurations I had customized the value of
>>>> whitespace-tab to better distinguish visually
>>>> tabs from spaces. When I did a C-h v on the
>>>> variable (under Emacs 25.2) I got the message:
>>>>
>>>> This variable is obsolete since 24.4; use the
>>>> face instead.
>>>
>>> Use the face! :) ???
>>
>> Um, how?  That is the question.
>
> By typing `M-x customize-face'.  The file whitespace.el defines both a
> variable and a face named `whitespace-tab', and the former is now
> obsolete.

Well that seems easy enough, but the result is confusing.

First, I hand-edited my custom.el to delete the old customization.
I then did as you say using customize-face, and saved the customization.

Comparing the new custom.el with the original, I found they were
identical (!), so I guess I never had a problem in the first place - I was
just confused by the message into *thinking* I had.

Anyway, thanks for clearing things up.

-- 
Will


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: replacement for whitespace-tab
       [not found]       ` <mailman.2114.1508859102.27995.help-gnu-emacs@gnu.org>
@ 2017-10-24 21:33         ` Will Parsons
  0 siblings, 0 replies; 26+ messages in thread
From: Will Parsons @ 2017-10-24 21:33 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg wrote:
> Nick Helm wrote:
>
>> One of the faces defined in this library –
>> whitespace-tab – determines how tabs look
>> when the mode is active. A variable by the
>> same name used to do the same job.
>
> Aha, so this is the reason for the strange
> docstring "use the face instead"!
> Perhaps change this into "Use the face with the
> same name instead." or simply "Use the face
> whitespace-tab instead."

As noted in another post in this thread, I was thoroughly confused by the
existing message.

-- 
Will


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-10-24 21:33 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-23 23:45 replacement for whitespace-tab Will Parsons
2017-10-23 23:52 ` Mario Castelán Castro
2017-10-24  0:12   ` Emanuel Berg
     [not found]   ` <mailman.2087.1508804123.27995.help-gnu-emacs@gnu.org>
2017-10-24  1:02     ` Will Parsons
2017-10-24  1:08       ` Emanuel Berg
2017-10-24  0:08 ` Emanuel Berg
2017-10-24  0:09 ` Emanuel Berg
2017-10-24  0:12   ` Mario Castelán Castro
2017-10-24  0:26     ` Emanuel Berg
2017-10-24  0:28       ` Mario Castelán Castro
2017-10-24  0:41         ` Alexis
2017-10-24  0:51           ` Emanuel Berg
2017-10-24  0:53             ` Mario Castelán Castro
2017-10-24  0:51           ` Mario Castelán Castro
2017-10-24  0:58             ` Emanuel Berg
2017-10-24  1:11             ` Alexis
2017-10-24  1:39               ` Emanuel Berg
     [not found] ` <mailman.2081.1508802776.27995.help-gnu-emacs@gnu.org>
2017-10-24  0:49   ` Will Parsons
2017-10-24  0:55     ` Emanuel Berg
2017-10-24  1:14     ` Alexis
     [not found] ` <mailman.2084.1508803714.27995.help-gnu-emacs@gnu.org>
2017-10-24  0:55   ` Will Parsons
2017-10-24  7:47     ` Stephen Berman
2017-10-24  9:31     ` Nick Helm
2017-10-24 15:30       ` Emanuel Berg
     [not found]       ` <mailman.2114.1508859102.27995.help-gnu-emacs@gnu.org>
2017-10-24 21:33         ` Will Parsons
     [not found]     ` <mailman.2103.1508831239.27995.help-gnu-emacs@gnu.org>
2017-10-24 21:31       ` Will Parsons

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.