GNU bug report logs - #22874
25.0.91; whitespace.el documentation looks incorrect

Previous Next

Package: emacs;

Reported by: David Caldwell <david <at> porkrind.org>

Date: Tue, 1 Mar 2016 19:06:01 UTC

Severity: minor

Tags: moreinfo, notabug

Found in version 25.0.91

Done: Bhavin Gandhi <bhavin7392 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 22874 <at> debbugs.gnu.org (full text, mbox):

From: David Caldwell <david <at> porkrind.org>
To: Stefan Kangas <stefan <at> marxist.se>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 22874 <at> debbugs.gnu.org
Subject: Re: bug#22874: 25.0.91; whitespace.el documentation looks incorrect
Date: Sat, 15 Aug 2020 11:40:13 -0700
Hi,

On 8/14/20 9:32 PM, Stefan Kangas wrote:
> tags 22874 + moreinfo
> thanks
> 
> Hi David,
> 
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> 
>> David Caldwell <david <at> porkrind.org> writes:
>>
>>> Hello,
>>>
>>> M-x describe-variable RET whitespace-style RET
>>>
>>> says:
>>>
>>> [snip]
>>>
>>>    indentation::tab     8 or more SPACEs at beginning of line are
>>>                         visualized via faces.
>>>                         It has effect only if ‘face’ (see above)
>>>                         is present in ‘whitespace-style’.
>>>
>>>    indentation::space   TABs at beginning of line are visualized via
>>>                         faces.
>>>                         It has effect only if ‘face’ (see above)
>>>                         is present in ‘whitespace-style’.
>>
>> I tried to reproduce this bug with the following file:
>>
>> But with either
>>
>> (setq whitespace-style '(face indentation::tab))
>> (setq whitespace-style '(face indentation::space))
>>
>> and then `M-x whitespace-mode'
>>
>> just the lines with leading spaces were fontified.
>>
>> So this either doesn't seem to work at all, or I'm just doing it wrong.
>
> We seem to be needing more info to make any progress here.  Could you
> take a look at the above and explain the issue you are seeing?

I just tested it in Emacs 27.1 and they both seem to work exactly as
documented.

I was initially confused because why would setting `indentation::tab`
show spaces at the beginning of a line and why would
`indentation::space` show tabs? I thought they just got switched around
in the docs, but I guess maybe it's supposed to act like an assertion?
`indentation::space` means "I expect my file to be indented with spaces
so please highlight any stray tab indents", and `indentation::tab` means
"I expect my file to be indented with tabs so highlight any `tab-width`
long runs of spaces".

Bottom line: I'm wrong, my patch is wrong, and the docs *are* correct.
Sorry to waste your time. :-)

-David




This bug report was last modified 5 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.