[Geany-devel] Per-filetype indentation settings

Lex Trotman elextr at xxxxx
Mon Aug 22 01:28:01 UTC 2011

>> If the indentation setting is set on open, it is not possible to have
>> a file open without indentation settings.  After opening the only time
>> it should change is if the user sets it, and then it should go to what
>> the user specifies.
> But when creating a new file.  The user will set the filetype, but will
> also probably want her filetypes indentation settings to be set since
> she didn't chose any at this point -- well, assuming she didn't chose
> indentation settings first, so checking this too.

Sorry, you are right, I didn't read it properly and confused setting
filetype and setting indentation.

>>> [1] does assuming None filetype means "no user choice" OK, or should we
>>> track whether the user chosen None?
>> There is always some setting, even if its a default coded in Geany.
>> IIUC thats what happens now if you create a new file.
> What I meant is that we need to track whether the user set a fietype if
> we don't assume "filetype None" == "the use did not choice".  Both are
> possible, assumption is cheaper, the other probably a little better.

As above.

>> Well in the new scheme its the only time the user can tell Geany to
>> use detect when its not the usual preference, unless we add it to the
>> set indent menu, which is probably the better option.
> Well, if the user haven't chosen auto-detection in the setting it's
> probably she don't want it.

Well if uses autodetect which is in preferences only, it isn't
convenient to change it for an occasional document (and then go back
to preferences and change it back), thats what I meant for opening a
document that wasn't the "usual" setting.

But I agree that we probably should have a
> "reset indentation settings" or something in the document menu, which
> would basically call document_apply_indent_settings().

No because that still depends on the preference, so the user still has
to go change the preference menu->reset it then go change the
preference back.  IMHO the menu should offer the user explicit
control, set spaces, set tabs, detect, set width, not depend on a
preference that the user has probably forgotten about :-)


More information about the Devel mailing list