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 all.
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
think?
Best regards,
Eugene.
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.
- tony
Hello,
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?
Just a normal build: but a strange configure error did occur.
$$$
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
configure: error: No C++ compiler not found. Please install a C++ compiler.
$$$
I found it's just a ``which`` in configure.in.
QQQ
# check for C++ compiler explicitly and fail if none is found, do this check
# after AC_PROG_CXX has set the CXX environment variable
which $CXX >/dev/null 2>&1
if test "x$?" != "x0"; then
AC_MSG_ERROR([No C++ compiler not found. Please install a C++
compiler.])
fi
QQQ
I didn't know that the ``which`` utility was considered a compiler. :p
How about just using a shell builtin, ``hash``, ``type -P`` or just ``eval
$CXX --version`` as a test instead?
------------------------------------------------------------------
configure.in:18 : which $CXX >/dev/null 2>&1
configure.in:51 : GIT=`which git 2>/dev/null`
configure.in:60 : SVN=`which svn 2>/dev/null`
Found 3 matches for "which".
--
-Erik S
Hi all.
I usually limit line length by 80 in my own projects, but in Geany 100
symbols is recommended. If the long line marker position preference was
project-specific, I would not need to change it in the Preferences
dialog every time I switch between Geany sources and one of my projects.
If making this preference project-specific makes sense for you, I can
spend some time to implement it. Otherwise, I will just ignore the
issue (I don't consider it important).
Best regards,
Eugene.
<Space> and <Enter> keys do the same thing in Filebrowser plugin. The following patch modifies that of <Enter> key, so it switches focus to editor after switching to corresponding document.
Hi all.
Preface
-------
Recently I realized that I completely forgot to integrate project
support into my XSMP support (which would reside in "sm" branch after
some of my patches are committed). Currently my code stores open
files, but it does not remember the project, if any was opened when
Geany terminated.
I was looking through the code to understand how the integration could
be implemented and testing how Geany behaves on opening and closing
projects. I discovered some issues, and there are also some questions
I'd like to ask. After all problems are solved and questions are answered,
I'll prepare some more patches for "sm" branch.
Question #1
-----------
`load_startup_files' function within main.c (formatting is wrong):
/* when we want a new instance, we still load project session files
unless -s was passed */
if (!cl_options.load_session ||
(!load_project_from_cl && cl_options.new_instance)) return;
Specifying "-s" while opening a projects causes Geany to open a blank document.
First, when geany instance is closed, the project is overwritten.
Instead of the files which were previously there, there would be no
files in the project. Is it a desired behaviour? Is it a desired way to
clear a project?
Second, it is not intuitive. From my point of view, "-s" is
there to not load the default session. When user tries to open a
project and specify "-s", he should wish to open the project's files
and not load the default session. Currently opening a project forbids
loading the default session, so "-s" is not necessary. But I think the
behaviour I described ("-s" is ignored) is more logical than opening a
blank document instead of project's files.
What do you think?
Best regards,
Eugene.
Hi all.
I have a bunch of little questions, some of them are not even related to
Geany. Here they are:
1. There is a little issue with "Automatically continue block comments"
turned on. It inserts comment symbols even if a block comment, which
includes the beginning of the prev. line, is already closed. An
example:
class A {
virtual void a() = 0;
};
class B {
/* override */ void a() = {}
* <<< comment symbol was inserted here
The attached patch checks whether the comment is still active before
automatically continuing it. It seems to work fine for me.
2. There is a strange issue with deleting spaces from the beginning of
a line. Suppose you have a file with indentation set to 2 spaces and
two lines:
if foo:
bar()
If you move cursor after the first space of the second line and press
Backspace, you get
if foo:
bar
with the cursor just before "bar", not in the beginning of the line.
That is weird. Is this a "feature" of Scintilla or Geany? If the
latter, which source file I need to fix? :-)
3. [unrelated] How do I reply to my own message in a mailing-list? (I
tried to google it without success)
Best regards,
Eugene.
Hi All,
I have created a branch for further development of the build system called bs2.
I have added the current state of the design spec to the doc directory
and a temporary Python prototype implementation of the configure
dialog in scripts (since I know how much you all hate reading GUI
descriptions). It is intended to delete this before merge but it will
be useful to get ideas on making it usable, for example which fields
should be visible normally and which only in advanced mode.
@Nick as the padding guru you might have some suggestions, in my
opinion applying padding to rows containing buttons or combo boxes
makes a disproportionate increase in size, so for now I've taken it
off, see what you think.
Running the script (python build_dialog_prototype.py) produces a
window with two buttons, one produces the dialog as it will be when no
project is open and one as it will be when a project is open. Clearly
the dialog has no code or data behind it, but the "advanced" and "show
all" buttons work. Apply, cancel and ok all close the dialog.
Please be warned, if you havn't read the spec (which is the only
documentation until the manual is updated) that this looks complex
when you first see it in advanced mode. But the dialog does no more
than bring together settings that already exist in various hidden
places in Geany.
Cheers
Lex