[Geany] Indentation problems

Philipp Kalder pkalder at xxxxx
Sun Jan 23 13:23:53 UTC 2011


Hello,

sorry for the delay.

The indentation is not a problem anymore. As I stated in one of my previous
emails, there
seems to have been a problem with 'detecting from file'. Every indentation I
do now works
as I want it to.

Only thing that remains is the behavior for parenthesis.  But I guess I'll
just cope with it.
I can post the filetypes.python, as well as the filetypes.common if you
still like to see them.
As for the code I'm sorry to say that can't post even parts of it. I use
Geany at work and the
code is for our internal systems.

Thanks so far
Phil


On Thu, Jan 20, 2011 at 11:42 PM, Lex Trotman <elextr at gmail.com> wrote:

> Hi Phil,
>
> Indentation is a tricky subject, there are so many standards that we
> can each have one...
>
> ... so to summarize as much for my benefit as anyones.
>
> Document->indent type
>
> Shows and sets the indent type which is currently being used for the
> current file, this is per file and is not saved when the file is
> closed since there is nowhere to save it per file.  It is saved and
> restored with the session if Geany is closed with the file open.
>
> Edit->preferences->editor
>
> This sets the type to use with a new file or when opening a file if
> "detect from file" is not set.  If "detect from file" is set then
> Geany tries to decide from what it finds in the first part of the file
> when it is first opened.  This value becomes the Document->indent type
> for the new/opened file.  There is a menu item to apply this default
> to all open files under project.  I might suggest moving this under
> tools, its not really project related.
>
> AFAICT this seems to be working properly in 0.20 for Python.
>
> As for your other problems, can you post your magical mystery
> filetypes.python and examples of the files where other problems occur
> with step by step what to do, what you expect to happen and what
> happens I've kind of lost the plot :-)
>
> Cheers
> Lex
>
>
> On 21 January 2011 02:31, Philipp Kalder <pkalder at googlemail.com> wrote:
> > Another note:
> > I just discovered that I have another file open in which adding ) works.
> But
> > not adding ] . . .
> > Just another python script. Maybe If I . . .
> > (away, checking something . . . .)
> > Ok, not so. I thought closing all open files, then closing geany.
> Restarting
> > it and then reopen
> > the files would do the trick.
> > But this remains a mystery, sorry. I don't think any system settings
> result
> > in a behavior like this.
> > One script has closing parenthesis not auto added, though set, the other
> > has, but the other misses this for square brackets.
> > Regards
> > Phil
> >
> > On Thu, Jan 20, 2011 at 2:47 PM, Philipp Kalder <pkalder at googlemail.com>
> > wrote:
> >>
> >> Same thing with version 0.20.
> >> But I guess this might be related to the fact that it uses the same
> >> preferences.
> >> Regards
> >> Phil
> >>
> >> On Thu, Jan 20, 2011 at 2:40 PM, Philipp Kalder <pkalder at googlemail.com
> >
> >> wrote:
> >>>
> >>> Hello,
> >>> thanks for the quick reply:
> >>>
> >>> On Thu, Jan 20, 2011 at 12:21 PM, Lex Trotman <elextr at gmail.com>
> wrote:
> >>>>
> >>>> On 20 January 2011 21:36, Philipp Kalder <pkalder at googlemail.com>
> wrote:
> >>>> > Hello list,
> >>>> > I think I found a bug or two othree . . ., but am not sure. So I
> first
> >>>> > write
> >>>> > to the list.
> >>>> > I hope this is the right place.
> >>>> > I have an apt-get install of Geany 0.19.1 and installed a theme from
> >>>> > here:
> >>>> >
> http://www.barryvan.com.au/2009/01/geany-ide-tango-dark-colour-scheme/
> >>>> > I did this more or less before I really used geany. But I think some
> >>>> > of the
> >>>> > issues started
> >>>> > first after the theme was applied. I also created a filetype.common
> as
> >>>> > mentioned
> >>>> > in the comments of the link above.
> >>>> > I installed a Virtual Machine Ubuntu 10.10 (same as my workstation)
> >>>> > and
> >>>> > tested the 'fresh' version against the one I use:
> >>>> > 1. Issue
> >>>> > In an Editor such as gedit or Editra as well as in Geany you can
> mark
> >>>> > a text
> >>>> > and replace it with anything you have in your clipboard.
> >>>> > The usual linux behavior would be to copy the marked text to the
> >>>> > clipboard,
> >>>> > so ctrl+v-ing would simply replace the marked text with itself.
> >>>> > After installing the above theme however, the behavior changes from
> >>>> > Editor
> >>>> > like to usual. Which is quite inconvenient.
> >>>>
> >>>> Don't know how the theme affects this?? What does a fresh version on
> >>>> the actual workstation do? After all a VM may not have tweaks you
> >>>> added to your normal environment and certainly does not have same GUI
> >>>> drivers.
> >>>
> >>> The thing is, if I copy away the filetypes.python I use, or copy one
> >>> from /usr/share/geany
> >>> to .config/geany/filedefs and restart Geany, it behaves as expected,
> what
> >>> I labled 'Editor'-Style.
> >>> So even considering the differences between a VM and the actual
> >>> workstation, I can change the behavior
> >>> even on the workstation alone. And the trigger seems to be using a
> >>> different filetypes.python. So let me rephrase:
> >>> When changing the filetypes.python I use, the behavior changes. I
> always
> >>> quit Geany before I make changes
> >>> like that and start it only after it's finished. the identifiers
> >>> attribute was not set as well as the lexer_properties section
> >>> was not defined. I took those from the /usr/share/geany file and added
> >>> them. I also changed certain colors, to have
> >>> a more dark blue background. But again, the behavior is 'usual' style.
> >>>>
> >>>> > 2. Issue
> >>>> > I have some issues with indentation while coding. I code in python.
> >>>> > Pressing
> >>>> > Enter after a colon results in the next line being indented using
> >>>> > tabs.
> >>>> > But my settings are to use spaces. Pressing Enter after a 'regular'
> >>>> > line,
> >>>> > the indentation is done using spaces.
> >>>> > So I guess there is some problem with the implementation for
> >>>> > python/colon.
> >>>> > Python sometimes really get's finicky about mixing spaces and tabs.
> >>>>
> >>>> This works for me, did you force the preference to apply to already
> >>>> open documents? Just setting the preference won't change the setting
> >>>> for already open documents unless you force it (see note at top of
> >>>> preference page)
> >>>
> >>> Do you refer to
> >>> http://www.geany.org/manual/current/index.html#preferences
> >>> and the statement about changes under the 'Document' Tab?
> >>> Anyway, I restarted Geany after changing settings. They showed up as I
> >>> set there.
> >>> Preferences Dialog -> Editor TAB Indentation: Type Spaces
> >>> But don't seem to apply. Just to be sure, we are talking about the
> same:
> >>> A sample, I have 'Show whitespaces' active at all times:
> >>> . . . . if xmldoc.getElementsByTagName('ns3:message') == 'broken
> >>> symlink': <hitting enter results in>
> >>> ----->---->print "The symlink is broken"
> >>> However, I've just had a look at the options under the Documents Tab
> and
> >>> found that
> >>> Indent Type
> >>> was set to Tabs and space although my Settings in the Preferences
> Dialog
> >>> show it as spaces.
> >>> Changing it there, solves this. It also keeps this set after restarting
> >>> Geany. Though this is the opposite of
> >>> what it say's in the Geany manual:
> >>> "The settings under the Document menu, however, are only for the
> current
> >>> document and revert to defaults when restarting Geany."
> >>> So I'm not sure whether this is a bug or just a 'glitch', but changing
> >>> the filetypes.python changed this behavior as well.
> >>>
> >>>>
> >>>> > 3. Issue
> >>>> > Is again related to the theme, after testing this in the VM. Auto
> >>>> > completing/adding for parenthesis does not work with the theme.
> >>>> > With the 'fresh' Geany closing parenthesis is added just as it
> should
> >>>> > be,
> >>>> > with the theme it's not. Curly and square braces are added without
> >>>> > difficulty.
> >>>>
> >>>> Again don't see how this is to do with the theme, more likely system
> >>>> configuration being different to the VM.
> >>>
> >>> Also again, any suggestions on which system config element could
> possibly
> >>> influence the
> >>> behavior of the editor? I purged and reinstalled Geany, put the
> >>> filetypes.* back in place
> >>> and started the Editor, same picture. Though I have to admit, that the
> >>> purging seems not
> >>> to have been as thorough as I wished. After starting the editor, the
> last
> >>> opened files reappeared.
> >>>>
> >>>> > 4. Issue
> >>>> > Might be related to no.2. Though the settings are set to use spaces,
> >>>> > pressing tab inserts a tab and even converts preceding spaces in
> >>>> > groups of
> >>>> > $tabwidth into tabs
> >>>> > Moving multiple lines at once with tab, also inserts and converts
> >>>> > spaces to
> >>>> > tabs. This seems not to be related to the theme as well.
> >>>>
> >>>> See comment above, behaves as you describe even with pref changed
> >>>> unless the change is applied to the open file.
> >>>
> >>> I'll gibe the version 0.20 a try. Lets see what this brings.
> >>> Thanks again.
> >>> Phil
> >>>
> >>>>
> >>>> Cheers
> >>>> Lex
> >>>>
> >>>> > So I don't know if these are 'bugs', so if someone know's anything
> >>>> > about it,
> >>>> > please let me know.
> >>>> > Especially if it is a bug, that might already been filed as one.
> >>>> > Regards
> >>>> > Phil
> >>>> > _______________________________________________
> >>>> > Geany mailing list
> >>>> > Geany at uvena.de
> >>>> > http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
> >>>> >
> >>>> >
> >>>> _______________________________________________
> >>>> Geany mailing list
> >>>> Geany at uvena.de
> >>>> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
> >>>
> >>
> >
> >
> > _______________________________________________
> > Geany mailing list
> > Geany at uvena.de
> > http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
> >
> >
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20110123/d6d43960/attachment.html>


More information about the Users mailing list