all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vinicius Jose Latorre <viniciusjl@ig.com.br>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 4069@emacsbugs.donarmstrong.com, Craig Falls <cfalls@janestcapital.com>
Subject: bug#4069: 23.1.50; whitespace.el
Date: Sat, 15 Aug 2009 22:08:52 -0300	[thread overview]
Message-ID: <4A875C24.4060504@ig.com.br> (raw)
In-Reply-To: <877hx4ll9n.fsf@cyd.mit.edu>

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






  reply	other threads:[~2009-08-16  1:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-15 23:17 bug#4069: 23.1.50; whitespace.el Chong Yidong
2009-08-16  1:08 ` Vinicius Jose Latorre [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-06 20:31 Craig Falls

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A875C24.4060504@ig.com.br \
    --to=viniciusjl@ig.com.br \
    --cc=4069@emacsbugs.donarmstrong.com \
    --cc=cfalls@janestcapital.com \
    --cc=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.