- Subject: Re: Looking for Python programmers for testing.
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Mon, 11 Sep 2006 19:31:51 +0000 (UTC)
Hello G.,
"G. Milde" <g.milde@xxxxxx> wrote:
> On 7.09.06, Jörg Sommer wrote:
>
>> this patch tries to address the problem that python forbids mixing up
>> spaces and tabs as indention characters. It should select the right
>> character for each file. Please test it and report all problems and
>> success.
>
>> - if (Py_Indent_Level == 8)
>
> use Tabs, else use Spaces.
The old version set TAB to zero if Py_Indent_Level != 8. If you open a
file with tabs then, I see tons of ^I at the begin of line. That was my
problem. Mangling the variable TAB is not a good idea.
> The proposed patch continues to mix these two (to keep consistency?)
No.
>> + set_blocal_var(Py_Indent_Level == TAB, "py_use_tab");
This is the default if no indented line is in the file, e.g. an empty
file. Otherwise the type of indention in the file overwrites this setting.
> My suggestion would be a separation of these two settings by introducing a
>
> with the three possible settings:
>
> -1 guess from file
> 0 never use Tabs
> 1 always use Tabs
IMO the only correct setting is -1. All other settings lead to
tab‐space‐mixture.
> The default would depend on the global variable USE_TABS, assuming that if a
> user sets USE_TABS = 0 in his/her jed.rc, tabs should not be used in pymode
> either.
No, excacly this was my problem. I've set USE_TABS = 0 and opened a file
with tabs. I've got a mixture of tabs and spaces; ugly.
> The Tab-detecting in the proposed patch makes sure it only looks for
> code-indenting but skips other places (strings, comments).
>
> However, it favours Tabs in the case of an unconsistent file:
> one single Tab will turn "py_use_tab" on.
Sorry, but anywhere you must make a break. Don't try to be more
intelligent then the user. Inconsistent cases must be fixed by the user.
Bye, Jörg.
--
Je planmäßiger ein Mensch vorgeht,
desto stärker mag ihn der Zufall treffen.
Erich Krunau "Die Physiker"
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]