* bug#22874: 25.0.91; whitespace.el documentation looks incorrect
@ 2016-03-01 19:04 David Caldwell
2019-07-29 13:34 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: David Caldwell @ 2016-03-01 19:04 UTC (permalink / raw)
To: 22874
[-- Attachment #1.1: Type: text/plain, Size: 648 bytes --]
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’.
[snip]
That looks backward to me. Attached is a patch that fixes it.
-David
[-- Attachment #1.2: whitespace.doc-fix.patch --]
[-- Type: text/plain, Size: 724 bytes --]
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 53bf363..c4d74cb 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -440,12 +440,12 @@ whitespace-style
It has effect only if `face' (see above)
is present in `whitespace-style'.
- indentation::tab 8 or more SPACEs at beginning of line are
+ indentation::space 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
+ indentation::tab TABs at beginning of line are visualized via
faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3819 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#22874: 25.0.91; whitespace.el documentation looks incorrect
2016-03-01 19:04 bug#22874: 25.0.91; whitespace.el documentation looks incorrect David Caldwell
@ 2019-07-29 13:34 ` Lars Ingebrigtsen
2020-08-15 4:32 ` Stefan Kangas
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-29 13:34 UTC (permalink / raw)
To: David Caldwell; +Cc: 22874
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
David Caldwell <david@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:
[-- Attachment #2: white.bin --]
[-- Type: application/octet-stream, Size: 54 bytes --]
Foo Space
Foo Tab
Zot Tab
Yes Space
[-- Attachment #3: Type: text/plain, Size: 379 bytes --]
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.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#22874: 25.0.91; whitespace.el documentation looks incorrect
2019-07-29 13:34 ` Lars Ingebrigtsen
@ 2020-08-15 4:32 ` Stefan Kangas
2020-08-15 18:40 ` David Caldwell
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2020-08-15 4:32 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 22874, David Caldwell
tags 22874 + moreinfo
thanks
Hi David,
Lars Ingebrigtsen <larsi@gnus.org> writes:
> David Caldwell <david@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?
If I don't hear back from you within a couple of weeks, I'll just
close this bug as unreproducible.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#22874: 25.0.91; whitespace.el documentation looks incorrect
2020-08-15 4:32 ` Stefan Kangas
@ 2020-08-15 18:40 ` David Caldwell
2020-08-15 19:52 ` Bhavin Gandhi
0 siblings, 1 reply; 5+ messages in thread
From: David Caldwell @ 2020-08-15 18:40 UTC (permalink / raw)
To: Stefan Kangas, Lars Ingebrigtsen; +Cc: 22874
Hi,
On 8/14/20 9:32 PM, Stefan Kangas wrote:
> tags 22874 + moreinfo
> thanks
>
> Hi David,
>
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> David Caldwell <david@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#22874: 25.0.91; whitespace.el documentation looks incorrect
2020-08-15 18:40 ` David Caldwell
@ 2020-08-15 19:52 ` Bhavin Gandhi
0 siblings, 0 replies; 5+ messages in thread
From: Bhavin Gandhi @ 2020-08-15 19:52 UTC (permalink / raw)
To: David Caldwell; +Cc: Lars Ingebrigtsen, Stefan Kangas, 22874
tags 22874 + notabug
close 22874
thanks
On Sun, 16 Aug 2020 at 00:11, David Caldwell <david@porkrind.org> wrote:
> >
> > 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.
Thank you, closing this.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-15 19:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 19:04 bug#22874: 25.0.91; whitespace.el documentation looks incorrect David Caldwell
2019-07-29 13:34 ` Lars Ingebrigtsen
2020-08-15 4:32 ` Stefan Kangas
2020-08-15 18:40 ` David Caldwell
2020-08-15 19:52 ` Bhavin Gandhi
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.