GNU bug report logs -
#5312
Why is ‘show-trailing-whitespace’ considered unsafe?
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Tue, 5 Jan 2010 14:09:07 UTC
Severity: minor
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5312 in the body.
You can then email your comments to 5312 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Tue, 05 Jan 2010 14:09:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 05 Jan 2010 14:09:08 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, and best wishes,
Why is ‘show-trailing-whitespace’ considered unsafe?
I find it inconvenient since adding it to a per-file or per-directory
local variable list will (by default) ask users whether they want to
apply the dreaded setting.
Thanks,
Ludo’.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Tue, 05 Jan 2010 18:57:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 5312 <at> debbugs.gnu.org (full text, mbox):
> Why is ‘show-trailing-whitespace’ considered unsafe?
Because all vars are unsafe by default (i.e. unless someone tells Emacs
explicitly that this var is safe).
> I find it inconvenient since adding it to a per-file or per-directory
> local variable list will (by default) ask users whether they want to
> apply the dreaded setting.
Arguably this var is more a personal user preference than a property of
a file, so maybe the lack of a `safe-local-variable' property is
actually a feature ;-0
Stefan
Severity set to 'minor' from 'normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 05 Jan 2010 23:37:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Wed, 06 Jan 2010 14:25:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 5312 <at> debbugs.gnu.org (full text, mbox):
>>> I find it inconvenient since adding it to a per-file or per-directory
>>> local variable list will (by default) ask users whether they want to
>>> apply the dreaded setting.
>> Arguably this var is more a personal user preference than a property of
>> a file, so maybe the lack of a `safe-local-variable' property is
>> actually a feature ;-0
> Yeah, I see what you mean. OTOH the same could be said of, say,
> ‘indent-tabs-mode’, which /is/ safe. I don’t find
> ‘show-trailing-whitespace’ any different.
You might be right. But I do know of several file formats where TABs
are seriously problematic so you could argue that indent-tabs-mode in
those files is linked to the file's content rather than some mere
user preference.
Of course, maybe you can come up with file formats where trailing
whitespaces are seriously problematic as well. I just can't think of
any off the top of my head.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Wed, 06 Jan 2010 15:23:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 5312 <at> debbugs.gnu.org (full text, mbox):
Hi,
[There was a bug in the Cc: list.]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> I find it inconvenient since adding it to a per-file or per-directory
>> local variable list will (by default) ask users whether they want to
>> apply the dreaded setting.
>
> Arguably this var is more a personal user preference than a property of
> a file, so maybe the lack of a `safe-local-variable' property is
> actually a feature ;-0
Yeah, I see what you mean. OTOH the same could be said of, say,
‘indent-tabs-mode’, which /is/ safe. I don’t find
‘show-trailing-whitespace’ any different.
Thanks,
Ludo’.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Wed, 06 Jan 2010 15:23:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 5312 <at> debbugs.gnu.org (full text, mbox):
Hi,
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Of course, maybe you can come up with file formats where trailing
> whitespaces are seriously problematic as well. I just can't think of
> any off the top of my head.
Trailing whitespaces can lead to pointless conflicts when applying
patches. See, e.g.,
http://www.mail-archive.com/libvir-list <at> redhat.com/msg04896.html .
In this thread, the project’s policy is to get rid of them, and
‘show-trailing-whitespace’ in ‘.dir-locals.el’ or similar would
definitely help.
Thanks,
Ludo’.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Wed, 06 Jan 2010 19:39:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 5312 <at> debbugs.gnu.org (full text, mbox):
>>>>> "Stefan" == Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
Stefan> Of course, maybe you can come up with file formats where trailing
Stefan> whitespaces are seriously problematic as well. I just can't think
Stefan> of any off the top of my head.
One seen recently -- on the groff list, IIRC -- involved continuation
lines. <\><NL> works, <\><SP><NL> does not.
-JimC
--
James Cloos <cloos <at> jhcloos.com> OpenPGP: 1024D/ED7DAEA6
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Wed, 06 Jan 2010 20:26:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 5312 <at> debbugs.gnu.org (full text, mbox):
Stefan> Of course, maybe you can come up with file formats where trailing
Stefan> whitespaces are seriously problematic as well. I just can't think
Stefan> of any off the top of my head.
> One seen recently -- on the groff list, IIRC -- involved continuation
> lines. <\><NL> works, <\><SP><NL> does not.
That also affects C, C++, Elisp, and many other formats. The fact that we
haven't mentioned them indicates that it's not considered "seriously
problematic" enough.
Actually, font-lock can also be used in those modes to highlight such
suspicious forms: it's more useful than show-trailing-whitespace since
it can more specifically target those trailing whitespaces that are
semantically significant.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Thu, 07 Jan 2010 14:19:01 GMT)
Full text and
rfc822 format available.
Message #28 received at submit <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier wrote:
> Stefan> Of course, maybe you can come up with file formats where trailing
> Stefan> whitespaces are seriously problematic as well. I just can't think
> Stefan> of any off the top of my head.
>
>> One seen recently -- on the groff list, IIRC -- involved continuation
>> lines. <\><NL> works, <\><SP><NL> does not.
>
> That also affects C, C++, Elisp, and many other formats. The fact that we
> haven't mentioned them indicates that it's not considered "seriously
> problematic" enough.
> Actually, font-lock can also be used in those modes to highlight such
> suspicious forms: it's more useful than show-trailing-whitespace since
> it can more specifically target those trailing whitespaces that are
> semantically significant.
Regardless, show-trailing-whitespace is safe.
--
Kevin Rodgers
Denver, Colorado, USA
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5312
; Package
emacs
.
(Thu, 07 Jan 2010 19:41:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 5312 <at> debbugs.gnu.org (full text, mbox):
> Regardless, show-trailing-whitespace is safe.
Agreed,
Stefan
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Thu, 14 Jan 2010 06:16:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
bug acknowledged by developer.
(Thu, 14 Jan 2010 06:16:01 GMT)
Full text and
rfc822 format available.
Message #36 received at 5312-done <at> debbugs.gnu.org (full text, mbox):
* frame.el (show-trailing-whitespace): Safe if boolean.
bug archived.
Request was from
Debbugs Internal Request <bug-gnu-emacs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 11 Feb 2010 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.