unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
@ 2010-01-04 13:11 ` Ludovic =?UTF-8?Q?Court=C3=A8s
  2010-01-05 18:56   ` Stefan Monnier
  2010-01-14  6:16   ` bug#5312: marked as done (Why is ‘show-trailing-whitespace’ considered unsafe?) Emacs bug Tracking System
  0 siblings, 2 replies; 10+ messages in thread
From: Ludovic =?UTF-8?Q?Court=C3=A8s @ 2010-01-04 13:11 UTC (permalink / raw)
  To: bug-emacs

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’.







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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-04 13:11 ` bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe? Ludovic =?UTF-8?Q?Court=C3=A8s
@ 2010-01-05 18:56   ` Stefan Monnier
  2010-01-06  8:31     ` Ludovic =?UTF-8?Q?Court=C3=A8s
  2010-01-14  6:16   ` bug#5312: marked as done (Why is ‘show-trailing-whitespace’ considered unsafe?) Emacs bug Tracking System
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2010-01-05 18:56 UTC (permalink / raw)
  To: Ludovic =?UTF-8?Q?Court=C3=A8s; +Cc: ?=, 5312

> 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






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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-05 18:56   ` Stefan Monnier
@ 2010-01-06  8:31     ` Ludovic =?UTF-8?Q?Court=C3=A8s
  2010-01-06 14:24       ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic =?UTF-8?Q?Court=C3=A8s @ 2010-01-06  8:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5312

Hi,

[There was a bug in the Cc: list.]

Stefan Monnier <monnier@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’.






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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-06  8:31     ` Ludovic =?UTF-8?Q?Court=C3=A8s
@ 2010-01-06 14:24       ` Stefan Monnier
  2010-01-06 15:13         ` Ludovic =?UTF-8?Q?Court=C3=A8s
  2010-01-06 19:33         ` James Cloos
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2010-01-06 14:24 UTC (permalink / raw)
  To: Ludovic =?UTF-8?Q?Court=C3=A8s; +Cc: 5312

>>> 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






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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-06 14:24       ` Stefan Monnier
@ 2010-01-06 15:13         ` Ludovic =?UTF-8?Q?Court=C3=A8s
  2010-01-06 19:33         ` James Cloos
  1 sibling, 0 replies; 10+ messages in thread
From: Ludovic =?UTF-8?Q?Court=C3=A8s @ 2010-01-06 15:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5312

Hi,

Stefan Monnier <monnier@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@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’.






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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-06 14:24       ` Stefan Monnier
  2010-01-06 15:13         ` Ludovic =?UTF-8?Q?Court=C3=A8s
@ 2010-01-06 19:33         ` James Cloos
  2010-01-06 20:25           ` Stefan Monnier
  1 sibling, 1 reply; 10+ messages in thread
From: James Cloos @ 2010-01-06 19:33 UTC (permalink / raw)
  To: 5312

>>>>> "Stefan" == Stefan Monnier <monnier@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@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6







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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-06 19:33         ` James Cloos
@ 2010-01-06 20:25           ` Stefan Monnier
  2010-01-07 14:17             ` Kevin Rodgers
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2010-01-06 20:25 UTC (permalink / raw)
  To: James Cloos; +Cc: 5312

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






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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-06 20:25           ` Stefan Monnier
@ 2010-01-07 14:17             ` Kevin Rodgers
  2010-01-07 19:40               ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2010-01-07 14:17 UTC (permalink / raw)
  To: bug-gnu-emacs

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








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

* bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
  2010-01-07 14:17             ` Kevin Rodgers
@ 2010-01-07 19:40               ` Stefan Monnier
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2010-01-07 19:40 UTC (permalink / raw)
  To: Kevin Rodgers; +Cc: 5312

> Regardless, show-trailing-whitespace is safe.

Agreed,


        Stefan






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

* bug#5312: marked as done (Why is ‘show-trailing-whitespace’  considered unsafe?)
  2010-01-04 13:11 ` bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe? Ludovic =?UTF-8?Q?Court=C3=A8s
  2010-01-05 18:56   ` Stefan Monnier
@ 2010-01-14  6:16   ` Emacs bug Tracking System
  1 sibling, 0 replies; 10+ messages in thread
From: Emacs bug Tracking System @ 2010-01-14  6:16 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-bug-tracker

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

Your message dated Thu, 14 Jan 2010 01:15:33 -0500
with message-id <117hrlp5yy.fsf@fencepost.gnu.org>
and subject line Re: bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
has caused the Emacs bug report #5312,
regarding Why is ‘show-trailing-whitespace’ considered unsafe?
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)


-- 
5312: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5312
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems

[-- Attachment #2: Type: message/rfc822, Size: 5094 bytes --]

From: ludo@gnu.org (Ludovic Courtès)
To: bug-emacs@gnu.org
Subject: Why is ‘show-trailing-whitespace’ considered unsafe?
Date: Mon, 04 Jan 2010 14:11:29 +0100
Message-ID: <87vdfiqake.fsf@gnu.org>

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’.




[-- Attachment #3: Type: message/rfc822, Size: 2536 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 5312-done@debbugs.gnu.org
Subject: Re: bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe?
Date: Thu, 14 Jan 2010 01:15:33 -0500
Message-ID: <117hrlp5yy.fsf@fencepost.gnu.org>


  * frame.el (show-trailing-whitespace): Safe if boolean.


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

end of thread, other threads:[~2010-01-14  6:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <117hrlp5yy.fsf@fencepost.gnu.org>
2010-01-04 13:11 ` bug#5312: Why is ‘show-trailing-whitespace’ considered unsafe? Ludovic =?UTF-8?Q?Court=C3=A8s
2010-01-05 18:56   ` Stefan Monnier
2010-01-06  8:31     ` Ludovic =?UTF-8?Q?Court=C3=A8s
2010-01-06 14:24       ` Stefan Monnier
2010-01-06 15:13         ` Ludovic =?UTF-8?Q?Court=C3=A8s
2010-01-06 19:33         ` James Cloos
2010-01-06 20:25           ` Stefan Monnier
2010-01-07 14:17             ` Kevin Rodgers
2010-01-07 19:40               ` Stefan Monnier
2010-01-14  6:16   ` bug#5312: marked as done (Why is ‘show-trailing-whitespace’ considered unsafe?) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).