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?
This is an alternate implementation of Eugene's X11 session support.
The main difference is that the state each running Geany is saved
into a separate temporary Geany configuration file.
Each Geany is restored exactly it was before the session was closed,
including open files, options (including applied but unsaved),
per-document options (even if no project file is open) etc.
There are no races when saving geany.conf, it's not saved at all. If
you want to save the options, so that the next Geany will use them,
just go to the Geany you want the options from and save them,
exactly as you would do before the session was closed.
Should there be "main" and "option-saving" instances, which ones,
and how should they differ from the "secondary" instances? As Eugene
pointed out, this is not related to the session management, at least
with this SM implementation.
The patch applies against the latest svn-4933. Of course, it should
not be included in 0.19, I only finished it today. Some parts of
Eugene's SM were reverted, since they were not required.
I sent in a patch on April 23rd, but have not received any accept /
reject notice, possibly because I didn't tag it with [patch], so here
it is again. Resolves feature request #2990915 as illustrated here:
When comment_use_indent is set to true in per-filetype config,
comments are no longer indented on a line-by-line basis, but have the
indentation of the least indented line in the block. This looks a lot
In addition, empty lines are commented out by default. In the original
patch, I introduced a new option for it, but Thomas Martitz suggested
that this is not preferable.
I am just curious what the current thought is on compiling with GIO when
The only reason I ask is that it (seems to) solve the GVfs bug issues at
least after I applied Алексей's patch and for me that is really a huge
benefit, but yet I understand the added complexity and maintainability
I was following the other "Safe file saving - permissions issue" thread
but it I couldn't tell if a decision had been reached, and it covered a
few other topics.
p.s. I know all the arguments against FTP, but sometimes my hands are
tied (clients are reluctant to change), despite protest. =)
In geany, there are a few checks of the type:
g_file_test(<filename>, G_FILE_TEST_IS_REGULAR |
which presumably check if <filename> is a regular file, or a symlink to
one. However, G_FILE_TEST_IS_REGULAR follows symlinks and is
enough for the test, while G_FILE_TEST_IS_SYMLINK (and consequently
G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK) is true for any type
of symlink, including broken and link to directory.
I think G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK should be
replaced with G_FILE_TEST_IS_REGULAR.
The following patches are required by gproject to build and
run correctly. More details in the individual patches.
[PATCH 1/3] Add a signal that is emitted before build starts
[PATCH 2/3] Make it possible to fill some fields of find in files dialog by plugins
[PATCH 3/3] Open files from msgwindow even if find_in_files_dir is not set
The status line is pretty crowded, as you know, so how about making it
configurable? Something like:
line: %l / %n\t col: %c\t sel: %s ...
I can write it, if you think that's a good idea.