Hi,
I'm sending my stack of patches against geany again, this time as individual patches. Here's the full list:
[PATCH 01/19] Prevent -Wmissing-prototypes report warning when compiling a plugin
[PATCH 02/19] Add signals for project options dialog opening and closing
[PATCH 03/19] Make the project menu accessible by plugins
[PATCH 04/19] Make it possible to change project patterns by plugins
[PATCH 05/19] Don't be annoying when not necessary
[PATCH 06/19] Make it possible for plugins to change the base directory of msgwindow
[PATCH 07/19] Open the file in the msgwindow even if no linenumber is specified
[PATCH 08/19] When closing tab, return to the document at the top of the MRU list
[PATCH 09/19] Use wider entry for project file path
[PATCH 10/19] New utils function to get relative path from one directory to another
[PATCH 11/19] File name in the project settings dialog shouldn't look it is editable
[PATCH 12/19] Use relative paths in the project files
[PATCH 13/19] Remove the "set" button from the project properties dialog
[PATCH 14/19] Rewrite tab switching queue
[PATCH 15/19] Do not insert --include= when the search pattern entry is empty
[PATCH 16/19] Use project patterns in the FIF dialog
[PATCH 17/19] Make the tab switching dialog a bit more useful
[PATCH 18/19] Use standard include paths for "open selected file"
[PATCH 19/19] Use per document indent sizes
Only some of them are required by gproject - others are just suggestions for improvements. I didn't explicitly distinguish between these two types of patches but it should be pretty clear from the description. There have been some minor changes since my last post - mainly the change of the FIF dialog to contain combo box for pattern selection and there are also some new patches - the detailed description is in the individual emails. Of course many of the patches are suggestions only so further discussion is welcome.
Cheers,
Jiri
On Thu, Sep 16, 2010 at 19:27, Thomas Martitz
<thomas.martitz(a)student.htw-berlin.de> wrote:
> On 16.09.2010 02:23, Lex Trotman wrote:
>>
>> Hi Jiri,
>>
>> I couldn't get this to work at all, it printed "calling indent this
>> line" all the time but didn't indent :-(
>>
>> I only had half an hour so I couldn't investigate much.
>>
>
> I have the same experience. Auto-indentation doesn't seem to work anymore
> (e.g. when hitting enter after on a line that ends with {, or when typing
> }).
I have just re-tested it again and it works on my machine (I have
forgotten one trace in the code - that's what you see in the console).
A quick question: have you read the commit log?
This patch makes it possible to specify several regex patterns for every
filetype which determine under what condition the indentation is performed.
The pattern variables are specified under the [settings] section of the
given filetype and their value is the regex to be used. The variables are
as follows:
* indent_this_line_regex - the match is performed after every keystroke
and if the regex matches, the indentation is performed on the current
line
* indent_next_line_regex - the match is performed only when enter is
pressed. The indentation is applied on the next line
* unindent_this_line_regex - like indent_this_line_regex but
unindents instead
* unindent_next_line_regex - like indent_next_line_regex but indents instead
Comments and strings are detected from the lexer so these can be ignored
inside the patterns. For instance these are very basic rules for GNU
indent style:
indent_next_line_regex=^.*\\{[[:blank:]]*$
unindent_this_line_regex=^[[:blank:]]*\\}$
indent_this_line_regex=^[[:blank:]]+\\{$
unindent_next_line_regex=^[[:blank:]]*\\}[[:blank:]]*$
By commenting-out the last two lines you get ANSI indentation style.
If you replace \\{ and \\} with begin and end, respectively, you
get analogous rules for pascal. Notice the double-escaping of { and } -
the first escape sequence is for the keyfile ini format (so for the
regex itself \\ becomes \).
This means that in order to make it work e.g. for C, you have to edit
~/.config/geany/filedefs/filetypes.c
(or the corresponding file under /usr/local/share/geany) and add
indent_next_line_regex=^.*\\{[[:blank:]]*$
unindent_this_line_regex=^[[:blank:]]*\\}$
indent_this_line_regex=^[[:blank:]]+\\{$
unindent_next_line_regex=^[[:blank:]]*\\}[[:blank:]]*$
under the [settings] section (+ restart geany). Please let me know if
it works (but also in the opposite case ;-).
Jiri
>
> Best regards.
> _______________________________________________
> Geany-devel mailing list
> Geany-devel(a)uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
Hi list,
To workaround bug(s) in GVFS, I've now changed the file saving
implementation for systems with GIO in SVN trunk. See also:
http://lists.uvena.de/geany-devel/2010-November/003412.html
Please help test this. File permissions should be preserved after
saving, and disk space exhaustion should now be handled without losing
the previously saved file.
Also, running geany --version (or -V) should now also show 'GIO' if your
system has it and Geany knew about it at build time.
Begin forwarded message:
Date: Tue, 02 Nov 2010 17:42:54 +0000
From: ntrel(a)users.sourceforge.net
To: geany-commits(a)uvena.de
Subject: SF.net SVN: geany:[5361] trunk
Revision: 5361
http://geany.svn.sourceforge.net/geany/?rev=5361&view=rev
Author: ntrel
Date: 2010-11-02 17:42:54 +0000 (Tue, 02 Nov 2010)
Log Message:
-----------
Use g_file_replace_contents() if available to save documents - this
should help workaround bugs in GVFS.
Needs testing.
Nick
Hi all,
I'm writing a plugin which integrates Devhelp documentation browser into
Geany (similar to Anjuta). The code is currently on my github site:
https://github.com/codebrainz/geany-devhelp
It's working quite well as is, but I can think of some more things to
improve it. It kinda mangles Geany's notebook layout a fair bit and I'm
not sure what the repercussions of this are (if any) although I'm fairly
satisfied with the results.
It also adds a menu item on the editor's context menu to look up the
current symbol/tag in the built-in devhelp, which is a nice feature
(thanks to b4n for suggesting this on IRC).
Obviously it requires having the Devhelp libraries installed as well as
WebKit GTK.
If anyone has any feedback (especially opinions about the way it lays
out the UI), I would very much appreciate hearing it. If you don't want
to install it, there's a screen shot in the repository:
https://github.com/codebrainz/geany-devhelp/raw/master/geany-devhelp.png
Thanks for your time,
Matthew Brush (codebrainz)
Hi!
I create this new thread because the original one was not really about
this, so please read that thread for some details, particularly my
previous mail:
http://lists.uvena.de/pipermail/geany-devel/2010-November/003567.html
Although I know it's probably not the best time for such huge changes
(Christmas and release coming soon, ...), but now's the news, now's the
mail :)
So, now the interesting stuff.
As you (might) already know, I've got the tagmanager to work in memory,
opening a little more the way to real-time symbols updating. For
convenience, I join the patch here (can be found in the previous thread)
as 0001-First-tagmanager-move-to-MIO-I-O.patch.
>From here, the next step is to use the in-memory capabilities and
reparse in (almost-)real-time. Here comes two more patches:
1) 0002-Enable-in-memory-tag-parsing.patch which is really tiny and
enables in-memory tag parsing
2) 0003-Update-tag-list-on-IDLE-time-right-after-any-documen.patch which
updates the tag list on IDLE time after any change in the document. This
patch is not really good (allowing a timeout and a user setting would be
probably a good idea), but it is here mostly for being able to test.
So with these on, you can test the in-memory tag parsing, and notice
that... it updates in real-time, yes, but the symbol list flickers a
lot, and it's very annoying. So here comes 5 (!) more patches:
1) 0004-Improve-implementation-of-hide_empty_rows-to-do-all-.patch: this
one is not needed, simply improves the implementation of
hide_empty_rows() -- note that it may be applied alone too;
2) 0005-Make-TMTag-reference-counted.patch and...
3) ...0006-Provide-a-GType-for-TMTag-and-use-it.patch: these two makes
TMTags reference-counted and add a GType for them, allowing the tree tag
store to keep a reference to them, so they never become invalid. I
needed it for the implementation of the last patch, read ahead;
4) 0007-Don-t-remove-and-add-the-symbols-tree-view-if-we-re-.patch: this
ones avoids removing and re-addind the tag view upon update if the final
state is the same as the original one, avoiding a part of the
flickering. Note that it applies alone as well;
5) and finally,
0008-Update-the-symbol-list-rather-than-clearing-and-re-b.patch: this is
the huge part of the thing: it re-implements tag store updating to avoid
clearing and re-filling the list, rather updating the rows when
possible. Apart avoiding flickering, this also keeps user's selection
and folding :)
As you might read at the top of the patch, this implementation is
probably not the better possible, but avoids lot of refactoring in a
code I'm not sure to understand perfectly well (add_tree_tag()) -- note
that I suggest another implementation in the patch's comment, and I have
a working sample (but not with the symbol list...) if somebody's interested.
About this patch, there is a question (as a FIXME in the patch): why did
you detached the tag store from the tag view before updating it? Was it
for performance reasons or what? I dropped this since it (obviously) led
to flickering, and it seems to work well, but I'm wondering.
Well! If you apply all these patches, you should have a working,
real-time, in-memory tag parsing that should look good :)
So, what's left? Testing of course, lot of it.
Also, for now it doesn't update tag list before the first save (for new
documents). I've not investigating the issue yet though.
So I'll stop here, thank you for your time reading and let you test
this, right? :)
Regards,
Colomban
PS: for the inpatients of you, I included a patch
(0000-In-memory-tag-parsing-all-together.patch) that combines all the 8
patches together.
Dear Geany devs,
Some time ago I received the attached patch though this list (from
Enrico?). I really love the added functionality to prevent duplicate
automatically added quotes and brackets.
Can this be added to Geany itself? Ideally this would be activated
with a checkbox in prefs > editor > completions.
-tnx!-
Harold
Hi,
I've noticed various issues with file loading from command line:
1) if the option load last session is not enabled project files can't be
opened from command line: this happens because the code to handle them
is wrapped in a prefs.load_lastsession if so the only way to load them
from command line is having that option true.
2) trying to open a file (eg from double clicking in nautilus) will
screw your session as command line loading of single files ignores your
session opened files, except if geany was already opened.
So to fix those issues I've reorganized the code in the
load_startup_file function in order to:
1) load the project files ignoring the session if a project file was
specified at command line
2) allow to load more files in addition to the project file (removing so
the limitation imposed there artificially - possible improvement to this
would be adding a flag to open_cl_files as argument in order to avoid
that pointer toying)
3) the open_cl_files is called after loading the session so the
specifically selected files are opened last and so are automatically
selected (what you would expect when opening a file from nautilus)
4) if the option to load last session is not enabled and there isn't a
project file being loaded from command line and a project is not being
loaded we just try to load files from command line if any
Stefano Angeleri
Hello, everybody.
My name is Alexander, i'm a software developer from St.Petersburg, Russia.
I started to use Geany at my job, mostly for C++ development, and only feature I was not satisfied with
was debuggers support.
I looked at the existing GDB plugin but it's seemed a little bit unusual for me,
and next I thought about multiple debuggers support in one plugin.
So I started to develop my own plugin with the foregoing in mind:
- more VS, Netbeans,... likely GUI
- multiple debuggers support
Now i have GDB working more or less enough for using, and feel
like I need some feedback.
(I started to work on bashbd backend, but faced some problems and decided to postpone it,
until GDB and general features will work well).
So, project adress at SF is https://sourceforge.net/projects/geanydbg/
Also I've prepared a little page with a description - http://geanydbg.sourceforge.net/walkthrough.htm
Waiting four your opinions and feedbacks.
--
Best regards,
Alexander Petukhov <Alexander.Petukhov(a)mail.ru>
Hi guys!
I found a bug in project creation (and save) check: if the project path
is a writable directory, update_config() won't see that write will fail,
and no error at all will be reported to the user (though write will fail
on a directory).
I fixed this (in the attached patch) by:
1) check whether the path is not a directory, because
utils_is_file_writeable() [1] returns TRUE in this case, but write will
still fail. Perhaps it should rather be fixed in utils_is_file_writeable()?
2) check the return value of write_config(). This needed a little more
tuning for later calls to update_config() to work correctly, but now if
write actually fails, and even if update_config() reported no error, an
error will be displayed to the user and she will have a chance to retry.
There is a last write_config() that may file silently though, the one in
project_close(); not sure how this may be fixed.
Best regards,
Colomban
[1] shouldn't it be renamed utils_is_file_writable(), without the "e"?
Not sure though, but it looks weird to me and my spellchecker complains
about it...
Hi,
I compiled the freshly downloaded geany 0.21 (svn r5534), and it recognizes
the PHP filetype, but does not color it. What should I change?
My plan is: to get COBOL syntax highlighting working.
Zoltan