all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4069: 23.1.50; whitespace.el
@ 2009-08-06 20:31 ` Craig Falls
  2009-08-16  1:35   ` bug#4069: marked as done (23.1.50; whitespace.el) Emacs bug Tracking System
  0 siblings, 1 reply; 4+ messages in thread
From: Craig Falls @ 2009-08-06 20:31 UTC (permalink / raw)
  To: emacs-pretest-bug


There is a problem with whitespace-cleanup, when called before
whitespace-turn-on.  The buffer-local variable
whitespace-indentation-regexp doesn't get updated to correspond to the
buffer-local value of indent-tabs-mode.  This means that even if
indent-tabs-mode is nil, a line with text following a single tab
character will not be converted into a line of text following 8 space
characters when whitespace-cleanup is called.  There is a simple
work-around -- just turn whitespace on and off again to set the
buffer-local variables:

(defun my-whitespace-cleanup ()
  "Fixes a bug in whitespace-cleanup in which buffer-local
indent-tabs-mode is not respected."
  (interactive)
  (whitespace-turn-on) ;; sets buffer-local variables
  (whitespace-turn-off) ;; don't actually want the mode to be on
  (whitespace-cleanup))

Here are instructions to replicate the problem:

Start up with no .emacs.  Set indent-tabs-mode to nil.  Make sure
'indentation is in whitespace-style.  Insert a tab character into a
buffer with no spaces after it, e.g. the line could be "\tfoo".  Run
whitespace-cleanup in the buffer.  Note that the tab character is still
there.  Now run my-whitespace-cleanup.  Note that the tab character has
been replaced by spaces.

The fact that indent-tabs-mode is buffer-local is important.  For
example, makefile-mode sets it to true since tabs are a necessary part
of the syntax of make files.

In GNU Emacs 23.1.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
 of 2009-08-03 on nyc-qws-005
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: GNUmakefile

Minor modes in effect:
  shell-dirtrack-mode: t
  flyspell-mode: t
  desktop-save-mode: t
  diff-auto-refine-mode: t
  partial-completion-mode: t
  dynamic-completion-mode: t
  show-paren-mode: t
  recentf-mode: t
  iswitchb-mode: t
  global-auto-revert-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/mnt/global/dev/lib/elisp/inf-caml hides /mnt/global/dev/lib/elisp/caml-mode/inf-caml
/mnt/global/dev/lib/elisp/tuareg-mode/camldebug hides /mnt/global/dev/lib/elisp/caml-mode/camldebug





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

* bug#4069: 23.1.50; whitespace.el
@ 2009-08-15 23:17 Chong Yidong
  2009-08-16  1:08 ` Vinicius Jose Latorre
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2009-08-15 23:17 UTC (permalink / raw)
  To: Vinicius Jose Latorre; +Cc: 4069, Craig Falls

Hi Vinicius,

Could you take a look at this bug report?  Thanks:


"Craig Falls" <cfalls@janestcapital.com> wrote:

> There is a problem with whitespace-cleanup, when called before
> whitespace-turn-on.  The buffer-local variable
> whitespace-indentation-regexp doesn't get updated to correspond to the
> buffer-local value of indent-tabs-mode.  This means that even if
> indent-tabs-mode is nil, a line with text following a single tab
> character will not be converted into a line of text following 8 space
> characters when whitespace-cleanup is called.  There is a simple
> work-around -- just turn whitespace on and off again to set the
> buffer-local variables:

> (defun my-whitespace-cleanup ()
>   "Fixes a bug in whitespace-cleanup in which buffer-local
> indent-tabs-mode is not respected."
>   (interactive)
>   (whitespace-turn-on) ;; sets buffer-local variables
>   (whitespace-turn-off) ;; don't actually want the mode to be on
>   (whitespace-cleanup))

> Here are instructions to replicate the problem:

> Start up with no .emacs.  Set indent-tabs-mode to nil.  Make sure
> 'indentation is in whitespace-style.  Insert a tab character into a
> buffer with no spaces after it, e.g. the line could be "\tfoo".  Run
> whitespace-cleanup in the buffer.  Note that the tab character is still
> there.  Now run my-whitespace-cleanup.  Note that the tab character has
> been replaced by spaces.

> The fact that indent-tabs-mode is buffer-local is important.  For
> example, makefile-mode sets it to true since tabs are a necessary part
> of the syntax of make files.





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

* bug#4069: 23.1.50; whitespace.el
  2009-08-15 23:17 bug#4069: 23.1.50; whitespace.el Chong Yidong
@ 2009-08-16  1:08 ` Vinicius Jose Latorre
  0 siblings, 0 replies; 4+ messages in thread
From: Vinicius Jose Latorre @ 2009-08-16  1:08 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 4069, Craig Falls

Hi Chong,


> Could you take a look at this bug report?  Thanks:
>
>
> "Craig Falls" <cfalls@janestcapital.com> wrote:
>
>   
>> There is a problem with whitespace-cleanup, when called before
>> whitespace-turn-on.  The buffer-local variable
>> whitespace-indentation-regexp doesn't get updated to correspond to the
>> buffer-local value of indent-tabs-mode.  This means that even if
>> indent-tabs-mode is nil, a line with text following a single tab
>> character will not be converted into a line of text following 8 space
>> characters when whitespace-cleanup is called.  There is a simple
>> work-around -- just turn whitespace on and off again to set the
>> buffer-local variables:
>>     
>
>   
>> (defun my-whitespace-cleanup ()
>>   "Fixes a bug in whitespace-cleanup in which buffer-local
>> indent-tabs-mode is not respected."
>>   (interactive)
>>   (whitespace-turn-on) ;; sets buffer-local variables
>>   (whitespace-turn-off) ;; don't actually want the mode to be on
>>   (whitespace-cleanup))
>>     
>
>   
>> Here are instructions to replicate the problem:
>>     
>
>   
>> Start up with no .emacs.  Set indent-tabs-mode to nil.  Make sure
>> 'indentation is in whitespace-style.  Insert a tab character into a
>> buffer with no spaces after it, e.g. the line could be "\tfoo".  Run
>> whitespace-cleanup in the buffer.  Note that the tab character is still
>> there.  Now run my-whitespace-cleanup.  Note that the tab character has
>> been replaced by spaces.
>>     
>
>   
>> The fact that indent-tabs-mode is buffer-local is important.  For
>> example, makefile-mode sets it to true since tabs are a necessary part
>> of the syntax of make files.
>>     


I already sent back an answer to Craig.

This is neither a bug nor a problem, Craig had implemented a wrong 
function to do what he wanted.

Should I send to you and emacsbugs list all the emails about this 
conversation?


Regards,


Vinicius






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

* bug#4069: marked as done (23.1.50; whitespace.el)
  2009-08-06 20:31 ` bug#4069: 23.1.50; whitespace.el Craig Falls
@ 2009-08-16  1:35   ` Emacs bug Tracking System
  0 siblings, 0 replies; 4+ messages in thread
From: Emacs bug Tracking System @ 2009-08-16  1:35 UTC (permalink / raw)
  To: Chong Yidong

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


Your message dated Sat, 15 Aug 2009 21:28:22 -0400
with message-id <87prawo8cp.fsf@cyd.mit.edu>
and subject line Re: 23.1.50; whitespace.el
has caused the Emacs bug report #4069,
regarding 23.1.50; whitespace.el
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 owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4069: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4069
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

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

From: "Craig Falls" <cfalls@janestcapital.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.50; whitespace.el
Date: Thu,  6 Aug 2009 16:31:18 -0400
Message-ID: <E1MZ9cM-0006la-Td@qsmtp.delacy.com>


There is a problem with whitespace-cleanup, when called before
whitespace-turn-on.  The buffer-local variable
whitespace-indentation-regexp doesn't get updated to correspond to the
buffer-local value of indent-tabs-mode.  This means that even if
indent-tabs-mode is nil, a line with text following a single tab
character will not be converted into a line of text following 8 space
characters when whitespace-cleanup is called.  There is a simple
work-around -- just turn whitespace on and off again to set the
buffer-local variables:

(defun my-whitespace-cleanup ()
  "Fixes a bug in whitespace-cleanup in which buffer-local
indent-tabs-mode is not respected."
  (interactive)
  (whitespace-turn-on) ;; sets buffer-local variables
  (whitespace-turn-off) ;; don't actually want the mode to be on
  (whitespace-cleanup))

Here are instructions to replicate the problem:

Start up with no .emacs.  Set indent-tabs-mode to nil.  Make sure
'indentation is in whitespace-style.  Insert a tab character into a
buffer with no spaces after it, e.g. the line could be "\tfoo".  Run
whitespace-cleanup in the buffer.  Note that the tab character is still
there.  Now run my-whitespace-cleanup.  Note that the tab character has
been replaced by spaces.

The fact that indent-tabs-mode is buffer-local is important.  For
example, makefile-mode sets it to true since tabs are a necessary part
of the syntax of make files.

In GNU Emacs 23.1.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
 of 2009-08-03 on nyc-qws-005
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: GNUmakefile

Minor modes in effect:
  shell-dirtrack-mode: t
  flyspell-mode: t
  desktop-save-mode: t
  diff-auto-refine-mode: t
  partial-completion-mode: t
  dynamic-completion-mode: t
  show-paren-mode: t
  recentf-mode: t
  iswitchb-mode: t
  global-auto-revert-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/mnt/global/dev/lib/elisp/inf-caml hides /mnt/global/dev/lib/elisp/caml-mode/inf-caml
/mnt/global/dev/lib/elisp/tuareg-mode/camldebug hides /mnt/global/dev/lib/elisp/caml-mode/camldebug


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

From: Chong Yidong <cyd@stupidchicken.com>
To: Vinicius Jose Latorre <viniciusjl@ig.com.br>
Cc: 4069-done@emacsbugs.donarmstrong.com, Craig Falls <cfalls@janestcapital.com>
Subject: Re: 23.1.50; whitespace.el
Date: Sat, 15 Aug 2009 21:28:22 -0400
Message-ID: <87prawo8cp.fsf@cyd.mit.edu>

Vinicius Jose Latorre <viniciusjl@ig.com.br> writes:

> I already sent back an answer to Craig.
>
> This is neither a bug nor a problem, Craig had implemented a wrong
> function to do what he wanted.
>
> Should I send to you and emacsbugs list all the emails about this
> conversation?

No need.  Next time, please try to keep the bug list in the CC's, so
that I know whether to close the bug.  Thanks.

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

end of thread, other threads:[~2009-08-16  1:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87prawo8cp.fsf@cyd.mit.edu>
2009-08-06 20:31 ` bug#4069: 23.1.50; whitespace.el Craig Falls
2009-08-16  1:35   ` bug#4069: marked as done (23.1.50; whitespace.el) Emacs bug Tracking System
2009-08-15 23:17 bug#4069: 23.1.50; whitespace.el Chong Yidong
2009-08-16  1:08 ` Vinicius Jose Latorre

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.