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.
I've found one more issue with Geany's "Safe file saving" option. When using g_file_set_contents(), file ownership and permissions are replaced with those for a new file. That fully conforms to GLib documentation (http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#g-fil…), but is not good sometimes (e.g. editing an executable script file).
I propose to use GIO API (GFile) instead of g_file_set_contents; the patch is attached. This solution, however, raises some questions:
- It does work for my system (Ubuntu 9.10), but will it work for others, especially Windows? It seems that GIO is also available on Win32, but it requires some testing
- This cannot be named "Safe" file saving, as it does not create a backup first (we can call g_file_replace_contents with make_backup = TRUE, but it would not delete this backup file when the operation completes). Maybe there should be some other configuration option to use (or not to use) this setting? Or should I replace "unsafe" file saving with GIO functions instead of replacing "safe"?
Or even more - make this option work like in GEdit (which, I suppose, uses g_file_replace_contents for both cases, with make_backup=TRUE in "safe" case), adding the corresponding checkbox to preferences dialog?
What do you think?
When several instances of Geany quit in the same time, there is a high
possibility of a conflict. I can reproduce it easily on my machine,
using either trunk or SM version.
To reproduce: open three instances of geany, "geany", "geany -i" and
another "geany" (absence of file names implies -i automatically in
this case). It would be better to open three different files in
the instances, to distinguish them. Then logout or reboot without
quitting geany manually. On my machine, after I (in case of
trunk) or SM code (in case of SM) restart geany, the default session is
always cleared. Expected behaviour: the default session is managed by
the first of the three instances and contains the files, which
were opened in that instance, after restart.
I can see two solutions for this problem. The first is an
additional POSIX process-shared semaphore / mutex for Windows to guard
geany.conf. This should eliminate the problem completely. AFAIK, there
are no wrappers for process synchronization primitives in GLib, so I'll
need to write a thin wrapper myself.
The second option is to change the behaviour of "new instances". If
such an instance (#1) detects a "main instance" (#2) running, it should
not touch geany.conf. Actually, to deal with the described issue, it
is enough to implement this behaviour only when #1 tries to save
geany.conf while quitting.
The second option is easier to write as it does not require
additional synchronization primitives and it's possible to reuse the
code of socket.c. Actually, I already have this option implemented, to
check whether it indeed solves the problem. But, you see, this
solution can't prevent the race condition completely, in distinction
from the first solution. Moreover, some of you may consider the second
solution "hackish", which is enough to decline it.
So, the first solution is right, but the second is easy :-) What do you
Geany 0.18.1.1 was released.
This is a Windows-only release without any code changes. 0.18.1.1
includes the (again) the older and more stable GTK 2.16 release (and
GLib 2.20) to fix compatibility issues with Windows 2000 and more
All downloads can be found on http://download.geany.org.
Get my GPG key from http://www.uvena.de/pub.asc
Hi. I'm Tony Rick, and I hit the wrong list for requesting the 'help'
response the first time.
I'm in Portland Oregon, where a lot of programmers like me are 'at
liberty' and looking for things to do. I'm currently helping teach a
Beginning C Programming class at a local computer hardware recycling
non-profit organization, FreeGeek. (Maybe you've heard of it,
http://www.freegeek.org if not). The class is using Geany v0.14 on
Debian Lenny, which will update to 0.17 with a backports repository
enabled. One of the questions that came up in class was about the GPL
license in the header being a visual irritant. I explained briefly
about editing templates, but having them updated requires a Geany
restart in that version. I scanned the mailing list archives and
features list and template management issues have been raised before.
One of the features requests (2925273, from arquebus), requested a
templates file selection item in the Tools menu. I thought I might
start there. I haven't figured out yet what the criteria are for
deciding what should be psrt of the core and what should be a plugin.
I also discovered that custom templates do not appear automatically when
saved. The Documentation indicates that this requires a Geany restart
also, but the 'Reload Configuration' tool does indeed add them. I'm not
sure whether this is a bug (templates and related menus should be
updated when files are modified, like configuration files), or a
serendipitous feature that simply 'came along with' Reload
Configuration, or should be mentioned in the Templates section of the
documentation (which it currently does not, IIRC).
My original thought was to use GIO and monitor the templates directory
for changes, but I saw several posts about problems with GIO and
detecting remote file changes and the use of the GIO compiler
conditional, and so assumed that the Reload Configuration method had
been chosen as an interrim solution, and that GIO file change detection
was on hold until the remote file issue had been resolved.
The following patch adds call tips for functions in PHP code.
The regex pattern for function parameters is not optimal, but should work for most cases. When you have a problem, send the relevant function definition so that I can improve the patch.
do I need to add something for the patch to be included in the geany repository?
I've seen you talked about some "filedefs/filetypes.*" configuration, does it mean it would replace such definitions in the future?
I just noticed, newer Perl 5.10 distributions don't have the
B/Bytecode module included anymore. This is what we used in
the past as the default Compile command for the filetype Perl.
The idea was to perform a syntax check this way.
It seems with 5.10 this module doesn't exist anymore or at least
isn't shipped anymore with the default Perl distribution.
But instead, Perl 5.10 has a -c command line option which also
does a syntax check. I guess this is enough for our needs to be used as
the *default* Compile command.
Since Perl 5.10 isn't really new anymore, I think we could
change the Compile command.
But I guess some of you, Nick, Dominic, ... know Perl much better
than me and so can maybe judge a bit better.
 perl -MO=Bytecode,-H,-o"%f"c "%f"
Get my GPG key from http://www.uvena.de/pub.asc
I randomly saw this:
For our uses I'm not sure if it affects performance much, but it would
be good to remove all FOO_GET_PRIVATE() macros from GObject code.
I removed this macro generation from the Class Builder plugin.
On Tue, 30 Mar 2010 17:19:59 +0000 ntrel(a)users.sourceforge.net wrote:
> Revision: 4791
> Author: ntrel
> Date: 2010-03-30 17:19:59 +0000 (Tue, 30 Mar 2010)
> Log Message:
> Don't generate FOO_GET_PRIVATE() macro because caching the result
> in Foo::priv can be much more efficient.
I've switched the regex engine for the find & replace dialog 'Use
regular expressions' option. This is (potentially) more powerful and
fixes some issues (see below).
Please test and give feedback, thanks.
On Tue, 09 Mar 2010 16:56:05 +0000
> Revision: 4746
> Author: ntrel
> Date: 2010-03-09 16:56:04 +0000 (Tue, 09 Mar 2010)
> Log Message:
> Merge gnu-regex branch:
> Use POSIX system/GNU regex engine for find & replace 'Use regular
> expressions' option. This alters regex syntax a bit - see the docs
> for details; we now support '?' operator and replacement backslash
> escaping is more standard.
> Make regex search imply replacing escaped chars.
> Allow \0 backreference replacement for the whole match.
> Note: Replace All may be slower; if this is a problem please let me
> - code:
> Add argument to utils_str_replace_escape() for keeping
> uninterpreted backslash escapes e.g. '\\', '\e'.
> Modified Paths: