On Thu, 30 Apr 2009 21:52:07 +0200, spir wrote:
Le Thu, 30 Apr 2009 19:49:34 +0200, Enrico Tröger enrico.troeger@uvena.de s'exprima ainsi:
On Thu, 30 Apr 2009 09:22:09 +0200, spir wrote:
Hi,
-1- startup folding What about having docs folded at open-time, especially at startup (files from last session)? (Actually, I never want them unfolded, as Geany currently does, so that I have to fold each file manually.) Should be a parameter to let the user set the preferred behaviour.
Someone just needs to implement it :). I won't work on this myself as I don't use folding at all.
I would like to help, but my competence in C in rather limited. Anyway, if you're kind enough to point me at the proper places in source, I'll have a look and see what I can do. At first sight:
- file opening
src/document.c: document_open_file_full() But editor_create() and editor_destroy() seems more appropriate. I'd say the very beginning would be to retrieve the current folding state of an editor before it is destroyed (editor_destroy()). Then think about a reasonable format to save this state to the config file and how to reload and apply these information on next startup. Also think of problems like how to handle the case when the file was changed externally between two Geany sessions and so the saved folding information became partly or completely invalid because the file content changed.
- folding/unfolding funcs
It's all in src/editor.c where your new code also should go.
- startup sequence -- esp. from last session savings
- maybe management of user settings
These are rather trivial and can be delayed until any initial code is existent and working
-2- non-code doc folding Block struture is commonly used for all kinds of non-code documents, too. When editing them, folding would be a reeeaally coooooool ;-) feature. Even more than for code, in fact, because there is no code browser to help and quickly navigate. I would enjoy such a feature based on
- either C-like block syntax (open/close tokens)
- or python-like (indentation)
- or what else? (header syntax like [title]?)
Actually, once block structure is parsed, there may even be "pseudo-code-browsing".
This has to be supported in the first place by Scintilla, the editing component we use in Geany. So, please file a feature request at the Scintilla project (www.scintilla.org). Thanks.
Right. Couldn't this more easily be implemented by "cheating" with the editor (the reason why I used the term "pseudo-code")? For instance, if I save a plain text file under the name "dummy.py", then folding applies like for python code. So, I guess we could have a foldable_text file type for cheap. But maybe I'm overlooking obvious issues...
Hmm, maybe this could work by implementing an own lexer in Geany and use SCLEX_CONTAINER to tell Scintilla that Geany does handle it. But this would require someone would write that code and define what's useful to create fold points for no known format, i.e. whether to use blank lines, indentation, a mix of those, something else, ...
-3- terminal settings I spoke once about terminal settings not activated at startup. Have some more infomation. If you "message window" is on, then at startup the bottom frame is open and shows status information. [...]
- Case you run before having manually switched to terminal,
automatic switching caused by running will not take settings into account. [it should be checked there whether settings are activited already?] Well,
You mean when Geany switches to the VTE tab when using Build->Run then font/colour settings are not applied to the VTE? If so, this is weird. It works fine here (Geany SVN, Debian Testing).
Yep. If I execute a program (in fact using F5) without having 'visited' the VTE at least once manually (but the lower window beeing open anyway, actually with the status tab active), then it does not take settings. Actually it seems to happen only when last session (reopen at statup) has source files from at least 2 directories. Anyway, it's not a big trouble at all, as you can imagine. I just wanted to inform because you replied last time you thought this issue was solved.
Because it works here. And I just started Ubuntu 8.10 Live-CD in a VM, installed Geany 0.16 from getdeb.net in this VM and tried it and it worked. No idea what's different to your system except that you are still using Geany 0.15, I would have tested this as well but couldn't find any packages for 8.10 and I don't have the time to compile it first, sorry. If you or anyone can provide detailed information when and why it doesn't work or even a fix, that'd be nice.
Regards, Enrico