unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Whitespace cleanup, tab-width and religion.
@ 2006-12-20 14:11 Michaël Cadilhac
  2006-12-20 15:00 ` Kim F. Storm
  0 siblings, 1 reply; 8+ messages in thread
From: Michaël Cadilhac @ 2006-12-20 14:11 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 813 bytes --]

Well, this discussion has probably been made a few times, but I can't
find a thread.

First, some facts:
- Whitespace cleanup considers 8 (and only 8) spaces to be
a tabulation, and discards the fact that `tab-width' could have been
changed.
- On the contrary, `tabify' uses `tab-width'.

And  this is  inconsistent, as  I  see whitespace-cleanup  as a  super
tabify.delete-trailing-whitespace.do-some-magic function.

Second, a « mylife » part:
My company uses « tab » as indentation char. Not two spaces, not
whatever, but tabs. And it looks, well, IMHO, awful. For MY (very own)
eyes, I wish I could see tabs as 2 spaces, and this is hopefully
possible in the Mighty Editor by setting `tab-width' to 2.

Is it completely politically incorrect (or simply wrong) to consider
such a patch :


[-- Attachment #1.1.2: whitespace.patch --]
[-- Type: text/x-patch, Size: 10031 bytes --]

Index: lisp/whitespace.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/whitespace.el,v
retrieving revision 1.50
diff -c -r1.50 whitespace.el
*** lisp/whitespace.el	5 Dec 2006 06:55:48 -0000	1.50
--- lisp/whitespace.el	20 Dec 2006 13:50:35 -0000
***************
*** 32,39 ****
  ;;
  ;; 1. Leading space (empty lines at the top of a file).
  ;; 2. Trailing space (empty lines at the end of a file).
! ;; 3. Indentation space (8 or more spaces at beginning of line, that should be
! ;;		      replaced with TABS).
  ;; 4. Spaces followed by a TAB.  (Almost always, we never want that).
  ;; 5. Spaces or TABS at the end of a line.
  ;;
--- 32,39 ----
  ;;
  ;; 1. Leading space (empty lines at the top of a file).
  ;; 2. Trailing space (empty lines at the end of a file).
! ;; 3. Indentation space (`tab-width' or more spaces at beginning of
! ;;                       line, that should be replaced with TABS).
  ;; 4. Spaces followed by a TAB.  (Almost always, we never want that).
  ;; 5. Spaces or TABS at the end of a line.
  ;;
***************
*** 51,60 ****
  ;; If any of the whitespace checks is turned off, the modeline will display a
  ;; !<y>.
  ;;
! ;;     (since (3) is the most controversial one, here is the rationale: Most
! ;;     terminal drivers and printer drivers have TAB configured or even
! ;;     hardcoded to be 8 spaces.  (Some of them allow configuration, but almost
! ;;     always they default to 8.)
  ;;
  ;;     Changing `tab-width' to other than 8 and editing will cause your code to
  ;;     look different from within Emacs, and say, if you cat it or more it, or
--- 51,57 ----
  ;; If any of the whitespace checks is turned off, the modeline will display a
  ;; !<y>.
  ;;
! ;;     (For (3), here is a warning:
  ;;
  ;;     Changing `tab-width' to other than 8 and editing will cause your code to
  ;;     look different from within Emacs, and say, if you cat it or more it, or
***************
*** 62,68 ****
  ;;
  ;;     Almost all the popular programming modes let you define an offset (like
  ;;     c-basic-offset or perl-indent-level) to configure the offset, so you
! ;;     should never have to set your `tab-width' to be other than 8 in all
  ;;     these modes.  In fact, with an indent level of say, 4, 2 TABS will cause
  ;;     Emacs to replace your 8 spaces with one \t (try it).  If vi users in
  ;;     your office complain, tell them to use vim, which distinguishes between
--- 59,65 ----
  ;;
  ;;     Almost all the popular programming modes let you define an offset (like
  ;;     c-basic-offset or perl-indent-level) to configure the offset, so you
! ;;     probably never have to set your `tab-width' to be other than 8 in all
  ;;     these modes.  In fact, with an indent level of say, 4, 2 TABS will cause
  ;;     Emacs to replace your 8 spaces with one \t (try it).  If vi users in
  ;;     your office complain, tell them to use vim, which distinguishes between
***************
*** 205,213 ****
    :type 'boolean
    :group 'whitespace)
  
! (defcustom whitespace-indent-regexp "^\t*\\(        \\)+"
!   "Regexp to match multiples of eight spaces near line beginnings.
! The default value ignores leading TABs."
    :type 'regexp
    :group 'whitespace)
  
--- 202,211 ----
    :type 'boolean
    :group 'whitespace)
  
! (defcustom whitespace-indent-regexp "^\t*\\( \\{%d\\}\\)+"
!   "Regexp to match multiples of an amount of spaces near line beginnings.
! The default value ignores leading TABs.
! If a `%d' is in the string, it is replaced by the value of `tab-width'."
    :type 'regexp
    :group 'whitespace)
  
***************
*** 378,384 ****
      (message "Will%s check for indentation space in buffer."
  	     (if whitespace-check-buffer-indent "" " not"))
      (if whitespace-check-buffer-indent
! 	(whitespace-buffer-search whitespace-indent-regexp))))
  
  ;;;###autoload
  (defun whitespace-toggle-spacetab-check ()
--- 376,382 ----
      (message "Will%s check for indentation space in buffer."
  	     (if whitespace-check-buffer-indent "" " not"))
      (if whitespace-check-buffer-indent
! 	(whitespace-buffer-search (whitespace-indent-regexp)))))
  
  ;;;###autoload
  (defun whitespace-toggle-spacetab-check ()
***************
*** 410,416 ****
  These are:
  1. Leading space \(empty lines at the top of a file\).
  2. Trailing space \(empty lines at the end of a file\).
! 3. Indentation space \(8 or more spaces, that should be replaced with TABS\).
  4. Spaces followed by a TAB. \(Almost always, we never want that\).
  5. Spaces or TABS at the end of a line.
  
--- 408,415 ----
  These are:
  1. Leading space \(empty lines at the top of a file\).
  2. Trailing space \(empty lines at the end of a file\).
! 3. Indentation space \(`tab-width' or more spaces, that should be replaced
! 			with TABS\).
  4. Spaces followed by a TAB. \(Almost always, we never want that\).
  5. Spaces or TABS at the end of a line.
  
***************
*** 440,446 ****
  					 nil))
  		  (whitespace-indent (if whitespace-check-buffer-indent
  					 (whitespace-buffer-search
! 					  whitespace-indent-regexp)
  				       nil))
  		  (whitespace-spacetab (if whitespace-check-buffer-spacetab
  					   (whitespace-buffer-search
--- 439,445 ----
  					 nil))
  		  (whitespace-indent (if whitespace-check-buffer-indent
  					 (whitespace-buffer-search
! 					  (whitespace-indent-regexp))
  				       nil))
  		  (whitespace-spacetab (if whitespace-check-buffer-spacetab
  					   (whitespace-buffer-search
***************
*** 531,543 ****
    ;; If this buffer really contains a file, then run, else quit.
    (whitespace-check-whitespace-mode current-prefix-arg)
    (if (and buffer-file-name whitespace-mode)
!       (let ((whitespace-any nil)
! 	    (whitespace-tabwith 8)
! 	    (whitespace-tabwith-saved tab-width))
! 
! 	;; since all printable TABS should be 8, irrespective of how
! 	;; they are displayed.
! 	(setq tab-width whitespace-tabwith)
  
  	(if (and whitespace-check-buffer-leading
  		 (whitespace-buffer-leading))
--- 530,536 ----
    ;; If this buffer really contains a file, then run, else quit.
    (whitespace-check-whitespace-mode current-prefix-arg)
    (if (and buffer-file-name whitespace-mode)
!       (let ((whitespace-any nil))
  
  	(if (and whitespace-check-buffer-leading
  		 (whitespace-buffer-leading))
***************
*** 552,558 ****
  	      (setq whitespace-any t)))
  
  	(if (and whitespace-check-buffer-indent
! 		 (whitespace-buffer-search whitespace-indent-regexp))
  	    (progn
  	      (whitespace-indent-cleanup)
  	      (setq whitespace-any t)))
--- 545,551 ----
  	      (setq whitespace-any t)))
  
  	(if (and whitespace-check-buffer-indent
! 		 (whitespace-buffer-search (whitespace-indent-regexp)))
  	    (progn
  	      (whitespace-indent-cleanup)
  	      (setq whitespace-any t)))
***************
*** 578,585 ****
  	      (if region-only
  		  (message "The region is now clean")
  		(message "%s is now clean" buffer-file-name)))
! 	    (whitespace-update-modeline)))
! 	(setq tab-width whitespace-tabwith-saved))))
  
  ;;;###autoload
  (defun whitespace-cleanup-region (s e)
--- 571,578 ----
  	      (if region-only
  		  (message "The region is now clean")
  		(message "%s is now clean" buffer-file-name)))
! 	    (whitespace-update-modeline))))))
! 
  
  ;;;###autoload
  (defun whitespace-cleanup-region (s e)
***************
*** 647,661 ****
      (while (re-search-forward regexp nil t)
        (replace-match newregexp))))
  
  (defun whitespace-indent-cleanup ()
!   "Search for 8/more spaces at the start of a line and replace it with tabs."
    (save-excursion
      (goto-char (point-min))
!     (while (re-search-forward whitespace-indent-regexp nil t)
!       (let ((column (current-column))
! 	    (indent-tabs-mode t))
! 	(delete-region (match-beginning 0) (point))
! 	(indent-to column)))))
  
  (defun whitespace-unchecked-whitespaces ()
    "Return the list of whitespaces whose testing has been suppressed."
--- 640,660 ----
      (while (re-search-forward regexp nil t)
        (replace-match newregexp))))
  
+ (defun whitespace-indent-regexp ()
+   "Give the actual regexp that matches spaces to be replaced by tabs."
+   (format whitespace-indent-regexp tab-width))
+ 
  (defun whitespace-indent-cleanup ()
!   "Search for `tab-width'/more spaces at line starts and replace it with tabs.
! See `whitespace-indent-regexp' for how these spaces are searched."
    (save-excursion
      (goto-char (point-min))
!     (let ((indent-regexp (whitespace-indent-regexp)))
!       (while (re-search-forward indent-regexp nil t)
! 	(let ((column (current-column))
! 	      (indent-tabs-mode t))
! 	  (delete-region (match-beginning 0) (point))
! 	  (indent-to column))))))
  
  (defun whitespace-unchecked-whitespaces ()
    "Return the list of whitespaces whose testing has been suppressed."
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10462
diff -C0 -r1.10462 ChangeLog
*** lisp/ChangeLog	20 Dec 2006 05:57:40 -0000	1.10462
--- lisp/ChangeLog	20 Dec 2006 13:50:44 -0000
***************
*** 0 ****
--- 1,12 ----
+ 2006-12-20  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* whitespace.el: Change comments to say that `tab-width' is used
+ 	instead of 8.
+ 	(whitespace-indent-regexp): (Variable) Use a `%d' that will be
+ 	replaced by `tab-width'.
+ 	(whitespace-indent-regexp): (Function) New.  Compute the actual
+ 	value of `whitespace-indent-regexp' and return it.
+ 	(whitespace-toggle-indent-check, whitespace-buffer)
+ 	(whitespace-cleanup-internal, whitespace-indent-cleanup): Use it.
+ 	(whitespace-buffer): Doc change.
+ 

[-- Attachment #1.1.3: Type: text/plain, Size: 411 bytes --]


TIA!

-- 
/!\ My mail address has changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac     |  ... KVim is cited in the talk.        |
 |         Epita/LRDE Promo 2007     |   "I can't tell if I am more sorry     |
 |  http://michael.cadilhac.name     |        for vim or for KDE."            |
 `--JID: michael.cadilhac@gmail.com--'          -- RMS                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Whitespace cleanup, tab-width and religion.
  2006-12-20 14:11 Whitespace cleanup, tab-width and religion Michaël Cadilhac
@ 2006-12-20 15:00 ` Kim F. Storm
  2006-12-20 15:11   ` Michaël Cadilhac
  0 siblings, 1 reply; 8+ messages in thread
From: Kim F. Storm @ 2006-12-20 15:00 UTC (permalink / raw)
  Cc: emacs-devel

michael@cadilhac.name (Michaël Cadilhac) writes:

> First, some facts:
> - Whitespace cleanup considers 8 (and only 8) spaces to be
> a tabulation, and discards the fact that `tab-width' could have been
> changed.
> - On the contrary, `tabify' uses `tab-width'.

That doesn't look right indeed.

Since whitespace-indent-regexp is already a defcustom, what's the
problem for you modifying that explicitly when you modify tab-width?

That's not a clean solution, so we should reconsider this after the
release.  Will you remind us then?

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Whitespace cleanup, tab-width and religion.
  2006-12-20 15:00 ` Kim F. Storm
@ 2006-12-20 15:11   ` Michaël Cadilhac
  2006-12-20 16:04     ` Kim F. Storm
  0 siblings, 1 reply; 8+ messages in thread
From: Michaël Cadilhac @ 2006-12-20 15:11 UTC (permalink / raw)
  Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1298 bytes --]

storm@cua.dk (Kim F. Storm) writes:

> michael@cadilhac.name (Michaël Cadilhac) writes:
>
>> First, some facts:
>> - Whitespace cleanup considers 8 (and only 8) spaces to be
>> a tabulation, and discards the fact that `tab-width' could have been
>> changed.
>> - On the contrary, `tabify' uses `tab-width'.
>
> That doesn't look right indeed.
>
> Since whitespace-indent-regexp is already a defcustom, what's the
> problem for you modifying that explicitly when you modify tab-width?

Well, first because the contradiction between w-cleanup and tabify
would stay.

Also, putting w-i-regexp in a  Local Variable part produces a warning.
And I don't really want to  force a certain value of this variable but
just the amount of spaces it counts.

> That's not a clean solution, so we should reconsider this after the
> release.  Will you remind us then?

I will, thanks.

-- 
/!\ My mail address has changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac     |  (\(\  This is the cute bunny virus,   |
 |         Epita/LRDE Promo 2007     |  (^.^)  please copy this into your     |
 |  http://michael.cadilhac.name     |  (")")  sig so it can spread.          |
 `--JID: michael.cadilhac@gmail.com--'                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Whitespace cleanup, tab-width and religion.
  2006-12-20 15:11   ` Michaël Cadilhac
@ 2006-12-20 16:04     ` Kim F. Storm
  2007-01-01 18:55       ` Rajesh Vaidheeswarran
  0 siblings, 1 reply; 8+ messages in thread
From: Kim F. Storm @ 2006-12-20 16:04 UTC (permalink / raw)
  Cc: emacs-devel

michael@cadilhac.name (Michaël Cadilhac) writes:

>> Since whitespace-indent-regexp is already a defcustom, what's the
>> problem for you modifying that explicitly when you modify tab-width?
>
> Well, first because the contradiction between w-cleanup and tabify
> would stay.

I agreed to fixing that part (somehow) after the release.

>
> Also, putting w-i-regexp in a  Local Variable part produces a warning.
> And I don't really want to  force a certain value of this variable but
> just the amount of spaces it counts.
>

Sounds like whitespace-indent-regexp should be marked as a safe local
variable.  Unless it is risky somehow ... ??

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Whitespace cleanup, tab-width and religion.
  2006-12-20 16:04     ` Kim F. Storm
@ 2007-01-01 18:55       ` Rajesh Vaidheeswarran
  2007-01-01 20:24         ` Michaël Cadilhac
  2007-01-02  9:56         ` Kim F. Storm
  0 siblings, 2 replies; 8+ messages in thread
From: Rajesh Vaidheeswarran @ 2007-01-01 18:55 UTC (permalink / raw)
  Cc: Michaël Cadilhac, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1531 bytes --]

As the author of whitespace.el, it was my intent to keep tabs at 8
characters. Please do not make any changes to whitespace.el without my
explicit approval.

To be clear, from whitespace.el's point of view, it is not relevant what the
tab-width is set at. People set tab-widths to whatever they please on their
favorite editors. However, there is no way to portably move the definition
of TAB across people and platforms, other than the value of 8 spaces. That
is why this is a religious argument, and that is also why it is documented
as such.

rv

On 12/20/06, Kim F. Storm <storm@cua.dk> wrote:
>
> michael@cadilhac.name (Michaël Cadilhac) writes:
>
> >> Since whitespace-indent-regexp is already a defcustom, what's the
> >> problem for you modifying that explicitly when you modify tab-width?
> >
> > Well, first because the contradiction between w-cleanup and tabify
> > would stay.
>
> I agreed to fixing that part (somehow) after the release.
>
> >
> > Also, putting w-i-regexp in a  Local Variable part produces a warning.
> > And I don't really want to  force a certain value of this variable but
> > just the amount of spaces it counts.
> >
>
> Sounds like whitespace-indent-regexp should be marked as a safe local
> variable.  Unless it is risky somehow ... ??
>
> --
> Kim F. Storm <storm@cua.dk> http://www.cua.dk
>
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
>

[-- Attachment #1.2: Type: text/html, Size: 2110 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Whitespace cleanup, tab-width and religion.
  2007-01-01 18:55       ` Rajesh Vaidheeswarran
@ 2007-01-01 20:24         ` Michaël Cadilhac
  2007-01-02  9:56         ` Kim F. Storm
  1 sibling, 0 replies; 8+ messages in thread
From: Michaël Cadilhac @ 2007-01-01 20:24 UTC (permalink / raw)
  Cc: emacs-devel, Kim F. Storm


[-- Attachment #1.1: Type: text/plain, Size: 1601 bytes --]

"Rajesh Vaidheeswarran" <rv@gnu.org> writes:

> As the author of whitespace.el, it was my intent to keep tabs at 8
> characters.

Yep, it was clear enough :-)

> People set tab-widths to whatever they please on their favorite
> editors. However, there is no way to portably move the definition of
> TAB across people and platforms, other than the value of 8 spaces.

I do agree on the point.  But, again, isn't a misfeature that changing
tab-width and  using whitespace.el screws up the  formating (in Emacs,
only, here) ?

I mean the following. Tab-width is 2, spaces are ` ' and tabs `->'.
My document is :

int main ()
{
->printf("Hello !");
->/* Oh, I forgot the \n ! */
->if (true)
->->if (true)
->->->if (really(true))
        printf("\n");
}

If I use whitespace-cleanup here, the last printf will be indented
with the first if, because the 8 spaces will be replaced with a <TAB>.

We are OK: there's no way to have consistency between editors, but
maybe this would be an improvement on the self-consistency of Emacs,
nop ?

And  after  all, if  the  user,  with the  help  of  great tools  like
whitespace.el, keeps a  well formated use of TABs,  this would enhance
portability of these TABs (modulo their size), isn't it ?

-- 
 |      Michaël `Micha' Cadilhac     |    Le copillage-collage                |
 |         Epita/LRDE Promo 2007     |       tue le programmeur.              |
 |  http://michael.cadilhac.name     |           -- Dictons LRDE              |
 `--JID: michael.cadilhac@gmail.com--'                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Whitespace cleanup, tab-width and religion.
  2007-01-01 18:55       ` Rajesh Vaidheeswarran
  2007-01-01 20:24         ` Michaël Cadilhac
@ 2007-01-02  9:56         ` Kim F. Storm
  2007-01-05  1:55           ` Rajesh Vaidheeswarran
  1 sibling, 1 reply; 8+ messages in thread
From: Kim F. Storm @ 2007-01-02  9:56 UTC (permalink / raw)
  Cc: Michaël Cadilhac, emacs-devel

"Rajesh Vaidheeswarran" <rv@gnu.org> writes:

> As the author of whitespace.el, it was my intent to keep tabs at 8
> characters. 

I simply don't follow the logic of whitespace.el forcing tabs at a
fixed value if the value is customizable in Emacs.

If whitespace.el doesn't work correctly with basic Emacs' features,
we need to fix it.

BTW, after the release, we plan to make tabs even more dynamic than
given by tab-width, and in that case, a regexp is most likely
inadequate to detect tabs.  So a fix would probably make w-i-regexp
obsolete.

> To be clear, from whitespace.el's point of view, it is not relevant what the
> tab-width is set at. People set tab-widths to whatever they please on their
> favorite editors. 

favorite editor_s_ ?   Isn't this an Emacs package?

Shouldn't it _primarily_ work seamless with Emacs?

If people need code to interoperate with other editors, they probably
shouldn't change tab-width -- but in the specific case, Michaël actually
need to change tab-width because of interoperability issues!

So why make whitespace.el _enforce_ "standards" which are unnecessary at
best, and disruptive at worst.

>                   However, there is no way to portably move the definition
> of TAB across people and platforms, other than the value of 8 spaces. That
> is why this is a religious argument, and that is also why it is documented
> as such.

I don't see it as religious -- tab-width exists, so it's reality, and
there's no need to turn it into a religious issue.

>> >
>> > Also, putting w-i-regexp in a  Local Variable part produces a warning.
>> > And I don't really want to  force a certain value of this variable but
>> > just the amount of spaces it counts.
>> >
>>
>> Sounds like whitespace-indent-regexp should be marked as a safe local
>> variable.  Unless it is risky somehow ... ??

Do you object that that change?

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Whitespace cleanup, tab-width and religion.
  2007-01-02  9:56         ` Kim F. Storm
@ 2007-01-05  1:55           ` Rajesh Vaidheeswarran
  0 siblings, 0 replies; 8+ messages in thread
From: Rajesh Vaidheeswarran @ 2007-01-05  1:55 UTC (permalink / raw)
  Cc: Michaël Cadilhac, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1466 bytes --]

On 1/2/07, Kim F. Storm <storm@cua.dk> wrote:
>
> "Rajesh Vaidheeswarran" <rv@gnu.org> writes:
>
>
> > To be clear, from whitespace.el's point of view, it is not relevant what
> the
> > tab-width is set at. People set tab-widths to whatever they please on
> their
> > favorite editors.
>
> favorite editor_s_ ?   Isn't this an Emacs package?
>
> Shouldn't it _primarily_ work seamless with Emacs?


If people need code to interoperate with other editors, they probably
> shouldn't change tab-width -- but in the specific case, Michaël actually
> need to change tab-width because of interoperability issues!
>
> So why make whitespace.el _enforce_ "standards" which are unnecessary at
> best, and disruptive at worst.



> I don't see it as religious -- tab-width exists, so it's reality, and
> there's no need to turn it into a religious issue.



[all three answered below]

It is impractical to make statements like that. Every development
organization has people who use different editors, and who operate on the
same source files. Editing a file inside emacs, with whitespace enforcing
TABs at tab-width other than 8 and printing or viewing that file via another
mechanism will be inconsistent. This is why the library explains why this is
religious. If it were not religious, we wouldn't be exchanging these mails
in the first place.



> Do you object that that change?



yes. It works as designed and intended.

[-- Attachment #1.2: Type: text/html, Size: 2468 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2007-01-05  1:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-20 14:11 Whitespace cleanup, tab-width and religion Michaël Cadilhac
2006-12-20 15:00 ` Kim F. Storm
2006-12-20 15:11   ` Michaël Cadilhac
2006-12-20 16:04     ` Kim F. Storm
2007-01-01 18:55       ` Rajesh Vaidheeswarran
2007-01-01 20:24         ` Michaël Cadilhac
2007-01-02  9:56         ` Kim F. Storm
2007-01-05  1:55           ` Rajesh Vaidheeswarran

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