Re: [Geany-devel] Just a stupid github question: How to merge a pull request with fast forward?

2011-12-13 Thread Nathan Broadbent

 See question from subject line. How can I merge a pull request without
 adding a new commit stating the merge? Is there some kind of ff or
 cherry-pick available through front end?


Hi,

You can't do a cherry pick or rebase through the front-end. I think adding
this 'merge pull request' commit is a good idea, since it shows more
information about where the commit came from.

But if you want, you can use 'git rebase' to avoid the merge commit. In the
case of my 'gitignore' branch, you could have run the following commands:

git remote add ndbroadbent git://
github.com/ndbroadbent/geany-plugins.git
git fetch ndbroadbent
git rebase ndbroadbent/gitignore
git remote rm ndbroadbent


Cheers,
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Just a stupid github question: How to merge a pull request with fast forward?

2011-12-13 Thread Nathan Broadbent
  You can't do a cherry pick or rebase through the front-end. I think
  adding this 'merge pull request' commit is a good idea, since it shows
  more information about where the commit came from.

 OK. So I assume its best practice also on github to do so?

Yes, this is a best practice. It's also a best practice to add a
'merge' commit when merging in a feature branch, so that the branch's
diversion is retained.

Github's network graph [1] and gitk [2] are great tools for viewing
this history, and you shouldn't worry too much about making the
history as 'linear' as possible.


[1] https://github.com/geany/geany-plugins/network
[2] http://lwn.net/Articles/140350/


Best regards,
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Wrap words Addon patch

2011-12-13 Thread Nathan Broadbent
 Now that the geany-plugins has been converted to Git, I thought I'd post
 this patch that adds the feature I've been working on (wrapping text with
 characters) to the Addons plugin.  Any chance of it being added?

Hi Alex,

Now that geany-plugins is on github, we can take advantage of the
awesome 'Pull Request' feature.
Everyone should read the introduction to pull requests if they are new
to github. [1]

Here's how you can send a pull request from your fork of geany-plugins:

1. Visit https://github.com/pzoxiuv/geany-plugins-1
2. Click 'Pull Request'
3. In the box on the right, you will see the heading 'Head branch ·
tag · commit'. There is an input field next to pzoxiuv/geany... @,
where you should type your branch (addons_wraptext).
4. You can enter a title  description, and double check the commits
and changes. If everything looks good, click 'Send pull request'


This is a lot more powerful than mailing patches back and forth. The
'patch' can be updated easily by adding new commits to your branch,
and anyone can add comments to any of the changed lines.


Best regards,
Nathan


[1]: http://help.github.com/send-pull-requests/
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Just a stupid github question: How to merge a pull request with fast forward?

2011-12-13 Thread Nathan Broadbent
 And another question: Is github allowing to do an automatic rebase for
 forks?
 E.g. I have forked geany-plugins into my namespace
 https://github.com/frlan/geany-plugins
 and want to keep it up to date. Do I need to to it locally with git
 remote --add etc. or is there any gui for?

It's not possible to keep a fork up to date automatically. Any changes
on your fork would start to produce merge conflicts that can't be
resolved automatically.
Also, there isn't too much benefit in having your own fork of the
code, apart from having a place to store experimental branches that
you don't want on the main repository. In that case, you should just
delete the master branch from your fork and track the master branch
from geany/geany-plugins.


Best regards,
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] Having trouble with keybindings

2011-12-07 Thread Nathan Broadbent
Hello,

I'm working on the TreeBrowser plugin. I have fixed a few bugs, so I'm
looking forward to sending pull requests when geany-plugins is on
github :)

I'm currently trying to add a keybinding for deleting objects from the
treeview. I have added a KB_DELETE_OBJECT keybinding, and I've mapped
this to the delete key, which works fine. However, the keybinding for
the sidebar is still activated when the editor has focus, and I press
the 'delete' key.
I would like the keybinding to only activate if the sidebar widget has
focus (is active). This is also a problem for the 'rename object'
keybinding that was already there.

The last parameter to the 'keybindings_set_item' function is:
GtkWidget * menu_item  -  Optional widget to set an accelerator for,
or NULL.
I've tried setting this to 'treeview' or 'sidebar_vbox', but that
doesn't seem to work.

I'd be really grateful if someone would be able to help me understand
how to solve this.


Thanks very much!
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Geany Color Schemes and Extras Page

2011-12-07 Thread Nathan Broadbent
 So what I propose is to move these links (and also the online color scheme
 generator) to a sub-page or sub-section for legacy color schemes, with a
 description about when to use which colour schemes with which versions. This
 way people who use older Geany versions can still access them but they won't
 be the default schemes users will find. I'd also like to put descriptions,
 screenshots and links to the geany-themes color schemes on the Extras page.
 If time allows I plan to also  extend the wiki page[4] to include
 information about the older colour schemes and the transition/version stuff.

Hello,

When I started evaluating Geany, the 'Themes' section on the Extras
page really turned me off. Theme support appeared to be limited, some
of the links were broken, and some of the themes didn't work.
It took me a long time to find your geany-themes project on github,
since I only found it after searching Github for geany related
projects.
But when I found it, it really influenced my decision about switching to Geany.

So I would like to help to re-organize and update the Extras page. If
nothing else, it needs some clearer section headings. I'm a web
developer by trade, so please let me know if there's any way I can
help.
I would like to offer to create the screenshots for each of the themes
in geany-themes, create a gallery page for these (perhaps with a nice
jQuery lightbox), and add a link to this gallery from the sidebar. I
really think the collection of themes is big enough to deserve it's
own page.

Does that sound reasonable?


Thanks,
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Indentation using regex (was [PATCH 14/19] Rewrite tab switching queue)

2011-12-06 Thread Nathan Broadbent
 Actually the plugin is option 3,   It is return plus user activated,
 just some activations are normal keys.

Aha, I understand. Thanks for the explanation.

 Maybe it works for Ruby, but
 it doesn't for C, and after looking at the code I don't see how it can
 possibly generate GNU style indentation.

 if (blah)
 {
    bletch();
 }

 It certainly doesn't as configured, it generates

 if (blah)
        {
         bletch();
        }

 and doesn't seem to ever lose that indent?

You're right, that plugin seems to generate KR, 1TBS or BSD KNF style
indentation, and not GNU style by default - see
http://en.wikipedia.org/wiki/Indent_style

However, I think it would be appropriate to support each of these
popular indentation styles, and allow the user to select which style
to use. Even better, perhaps the style could be auto-detected by
parsing the current file.


Regards,
Nathan
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Indentation using regex (was [PATCH 14/19] Rewrite tab switching queue)

2011-12-05 Thread Nathan Broadbent
 1. calculate the indent each change, and then ripple that through the file
 2. calculate the indent each change and only apply it to this line
 3. calculate and apply the indent to lines N and N-1 only on new line
 or user command
 4. calculate and apply the indent on user command

 Option 1 is rejected because it is expensive and it will destroy
 manually adjusted indentation when editing an existing line and
 because indentation can change as you type causing distracting effects
 (happens with some Emacs indentation styles)

 Option 2 is rejected for the same reasons

 Option 4 is rejected because auto new line indent is really the
 minimum required to be called auto indentation

 So that leaves option 3.  The upside is that new lines get a sensible
 indentation automatically, the downside is that lines that should be
 unindented won't be until enter or user command.  I have used another
 editor that worked this way and after a while I became used to it.
 Note that editing an existing line won't destroy manual indentation
 unless you tell it to or create a new line after.

Hello,

Good auto-indentation is one of the last things I'm missing after my
switch from Gedit to Geany. It was something that was handled really
well by the 'Smart Indent' plugin. I would like to share a short video
(1:24) of the indentation behavior that I grew accustomed to:

http://vimeo.com/1890098


This style of auto-indentation requires Option 1 or 2 (calculate for
each change), because it unindents the 'end', 'elsif' and 'else'
keywords as soon as their last characters are pressed.
I did find this behavior very useful, even though I admit that it
would sometimes destroy my manual indentation.


You might also find it interesting to browse the code of this plugin here:

https://github.com/gmate/gmate/blob/master/plugins/gedit2/smart_indent/smart_indent/__init__.py

At least, it contains some good indent regexs for different languages.


I might disagree that Options 1  2 are expensive. The gedit plugin
even defines a very limited set of 'unindent_keystrokes', so the
'unindent' regex is only executed when one of these keys are pressed.
For C, it's just :, and for Ruby, it's edfn.
I also disagree that it's distracting, because I grew accustomed to it
very quickly.

So if it could be written in a way that supports the behavior in the
video above, I would be really grateful.
But no problem if not -- like you say, I can get used to any behavior
after using it for a while.


Thanks very much for your time!
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Nathan Broadbent
 It turned out to be quite easy, because the two meanings are actualy
 used separately...

 --
 E-gards: Jimmy

Thanks very much for the patch, it works great!


 - Make 'Wrap search' checked by default.
 
  And that'll irritate anyone who prefers not to wrap, and has to uncheck
  'Wrap search' any time (s)he starts Geany.

Sorry, I wanted to suggest changing the default for the Geany
installation. The user's preference would still be saved between
sessions

 Yep, that's a default value that will probably please 50% users and
 annoy the other 50%.  A pref's good, but changing the default doesn't
 make much sense if you ain't got no well-done statistics about most
 spread user opinion.

I've tried to collect a few statistics... Here are my sources:

* Geany feature request - search autowrap on by default
(http://sourceforge.net/tracker/?func=detailaid=2962018group_id=153444atid=787794
* Same feature request for the Bugzilla project
(https://bugzilla.mozilla.org/show_bug.cgi?id=91520)

Votes for 'Wrap search' by default (11):

Nick Treleaven, John Levon, Blake Ross, Jesse Ruderman, Neil
Becker, TGOS, Mike Stockman, Andrew Pimlott, Tom Schneider,
realgrouchy, search autowrap on by default poster (anonymous)

Votes against 'Wrap search' by default (2):

timeless, Fred

Enrico Tröger was impartial, stating I don't mind much, we can change
the default.


Everything's up to you, but I do feel that this default would make
search more friendly for new users.

Also, sorry to be all talk and no contribution yet... But I am
currently working on a HAML lexer for Scintilla, as well as
improvements to the TreeBrowser plugin.


Best regards,
Nathan
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Nathan Broadbent
 (close dialog currently only closes the dialog for find all style
 options)

This is true. However, if you look at the Add wrapped search [1]
feature request (which is still open), Nick Treleaven
and Enrico Tröger had a conversation about changing this back in 2009:

2009-10-14 05:49:13 ntrel: I suppose we could make the option 'Always
wrap' and then change the dialog 'close' checkbox to apply to all
actions. Sound OK Enrico?

2009-10-21 10:30:46 eht16: Nick, yes, sounds good.


 Hum, you mean displaying the wrap search prefs from the pref dialog in
 the find dialog too?  Why not, but I'm afraid it'd make the dialog less
 readable for not much benefit.

Well, if the Close dialog checkbox did apply to all actions, and the
wrap search checkbox was also on the Find dialog, then both of those
settings wouldn't need to be in Preferences any more.. Because they
would always be configurable on the Find dialog.

I'm a bit tired of the debate though, so I'm happy to just apply
Dimitar's patch and close all of these feature request tickets :)


Regards,
Nathan


[1] 
http://sourceforge.net/tracker/?func=detailaid=2877992group_id=153444atid=787794
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] Default search behavior is irritating

2011-12-03 Thread Nathan Broadbent
Hello,

It took me a little while to find the Search preferences. I did not expect
them to be filed under 'General' - 'Miscellaneous'.
From a usability perspective: In my attempt to configure search, I first
looked in Editor, and then Interface.

I was getting very irritated with the message keyword not found. Wrap
search and try again?. It happened every time I searched for something
while my cursor was near the bottom of a document. Now I am finding that
the Always wrap search and hide the Find dialog setting is insufficient,
since my personal preference is to always wrap search, but keep the find
dialog open.

So may I please request the following modifications to search:

   - Move the 'Search' preferences to 'Editor' - 'Search  Replace',
   instead of 'General' - 'Miscellaneous'
   - Remove the Always wrap search and hide the Find dialog setting.
   - Add a 'Wrap search' checkbox to the Find dialog, below the 'Close
   dialog' checkbox.
   - Make 'Wrap search' checked by default.



Best regards,
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-03 Thread Nathan Broadbent
 * Move the 'Search' preferences to 'Editor' - 'Search  Replace', instead of 
 'General' - 'Miscellaneous'
 * Remove the Always wrap search and hide the Find dialog setting.
 * Add a 'Wrap search' checkbox to the Find dialog, below the 'Close dialog' 
 checkbox.
 * Make 'Wrap search' checked by default.


Some of these points have been discussed, but not concluded, in the
following SourceForge feature requests:

* https://sourceforge.net/tracker/?func=detailaid=2962018group_id=153444atid=787794
* https://sourceforge.net/tracker/?func=detailaid=2877992group_id=153444atid=787794


Best regards,
Nathan
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-03 Thread Nathan Broadbent
  my personal preference is to always wrap search, but keep the find
  dialog open.
 
  This is your personal preference only.

Yes, I was just saying that I would like my personal preference to be possible


 I'm not really against having a General - Search tab, but I'm not sure
 having a tab with 3/4 settings only is so much better.

Ok, thats fine


     - Remove the Always wrap search and hide the Find dialog setting.
 
  What about the people who prefer to always hide the open dialog?

 +1, that's a feature we have and people use, I don't think we should
 remove it.

Sorry, I wasn't suggesting to remove the feature, just to make it more
customizable.


     - Make 'Wrap search' checked by default.
 
  And that'll irritate anyone who prefers not to wrap, and has to uncheck
  'Wrap search' any time (s)he starts Geany.

 Yep, that's a default value that will probably please 50% users and
 annoy the other 50%.  A pref's good, but changing the default doesn't
 make much sense if you ain't got no well-done statistics about most
 spread user opinion.

The reason I thought of putting the 'wrap search' checkbox on the Find
dialog, is that the 'close dialog' checkbox does remember it's state
after closing and restarting Geany. So a user would only ever need to
change it once.

  There is one, and only one thing, that is unquestionably better IMHO:
  separate [ ] Always wrap search and hide the Find dialog into
  [ ] Always wrap search and [ ] Hide the Find dialog. It can even be
  implemented in backwards-compatible way, so if the lead developers
  approve, I'll give it a try.

 Yep, this sounds sensible to me.  It'd be better flexible and I can
 understand somebody was one and not the other.  So yeah, go ahead :)

That's fine too, I'd be very happy if I could just configure each
setting separately.

Thanks very much for your responses!


Nathan
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] (no subject)

2011-12-01 Thread Nathan Broadbent
Hi Alex,

I'm also really keen for this feature, so could I please request a recent
copy of the plugin? Perhaps you could update your repo on github?
I'd like to start using it right away, and could help to fix any bugs.

I also really think that this should to be added to the 'Auto-close quotes
and brackets' feature in core Geany, since it is the expected behavior for
any user coming from TextMate or Gedit.


Regards,
Nathan



On Thu, Dec 1, 2011 at 7:20 PM, Lex Trotman ele...@gmail.com wrote:

 On Fri, Dec 2, 2011 at 10:54 AM, Meyer 3m.me...@gmail.com wrote:
  Sure.  I want to be able to select text, and then insert a character
 (e.g.
  an apostrophe) before and after the selection just by pressing the
  apostrophe key.  Since the normal behavior when a character is pressed
 while
  text is selected is to delete the text and insert a character, I need to
  know when that happens - then I could undo the delete and insert my
  characters.  If it was two separate events though - delete then insert
 - I
  won't want to do anything.
 
  I have it working now, but it seems awfully hackish:  when one of the
  characters I might insert is pressed, I store the current position of
 the
  cursor and undo the last event.  If the new cursor position is the same
  place as the old one, then it was a overwrite event.  Otherwise, it
 was
  delete then insert.
 
  So, any ideas for how I could do this would be much appreciated!

 I assume you are writing a plugin.

 You should use the keybinding system to capture the apostrophe before
 it goes to scintilla so you can detect and do anything you want.

 Cheers
 Lex

 
  Alex
 
  On Thu, Dec 1, 2011 at 3:40 PM, Frank Lanitz fr...@frank.uvena.de
 wrote:
 
  Am 01.12.2011 20:57, schrieb Meyer:
   I have two possible situations that I need to differentiate between,
 and
   I'm not sure how to do it - The first situation is the user deletes
   selected text by overwriting it with a new character.  The second is
 the
   user deletes selected text by pressing backspace/delete, and then
 enters
   a new character.  I thought this would be fairly easy, but I've been
   trying to figure it out for awhile and haven't gotten anywhere. Does
   anyone have any ideas for how I could accomplish this?
 
  Can you go into more details in which context you need that
 information?
 
  Cheers,
  Frank
 
 
 
  ___
  Geany-devel mailing list
  Geany-devel@uvena.de
  https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
 
 
 
  ___
  Geany-devel mailing list
  Geany-devel@uvena.de
  https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
 
 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel



 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Unit tests for Geany (continued from Github)

2011-11-30 Thread Nathan Broadbent
Hi,

Sorry about that! I won't change topic in the middle of a thread.

I've figured out why the installation documentation didn't work for
me: You pre-generate the 'configure' script and package this when you
distribute a release in a tarball, but this configure script isn't
checked into the repository.
I checked out the source-code from github, but the documentation
doesn't mention anything about running './autogen.sh' first. (Sorry, I
haven't done much C programming for a while...)

Since the project has moved to Github, more people will be getting the
source code straight from the repository. So it might be helpful to
replace  $ ./configure   with   $ ./autogen.sh  in the Autotools
based build system section of the manual
(http://www.geany.org/manual/current/#installation), and also in the
installation section of the README.


Thanks,
Nathan



On Wed, Nov 30, 2011 at 3:12 PM, Frank Lanitz fr...@frank.uvena.de wrote:
 Am 30.11.2011 07:36, schrieb Nathan Broadbent:
 P.S. The documentation needs to be updated for the 'waf' build system,
 in quite a few places, including geany-plugins.

 I don't refer to other points as I would need to catch up discussion on
 github before (wth why are we using differnt chanels? can we turn off
 the github commenting stuff.. its a nightmare)

 However, comments like you do above are not very helpful. If there is a
 mistake inside documentation, which might can happen - no question - we
 still don't know where and what might be wrong. Please be so kind and
 point to the place you did found the issue. Comments like this only
 causes us to re ask you one and another time and also are giving a bad
 formating of you hint (read: I'm a bit against you change succession
 idea before I ever see it which is not a good starting point)

 Cheers,
 Frank
 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] I'd like to write a lexer for HAML. Can I invoke sub-lexers, and can I set up simple TDD?

2011-11-29 Thread Nathan Broadbent
Dear Scintilla  Geany mailing lists,

I would like to write a Scintilla lexer for the HAML syntax. HAML is
used by many (if not most) Ruby on Rails developers. It is an indented
HTML markup language with inline Ruby evaluation. It also needs to
support many embedded syntaxes, such as javascript, ruby, css,
markdown, textile, and plain HTML.

I've been studying the HTML lexer for the last 5 hours, and I'm
beginning to understand how everything fits together. But before I
start the lexer, I would like to please ask a few questions.

I've noticed that the HTML lexer function is passed 6 sets of
keywords, including HTML elements, Javascript keywords, Python
keywords, etc. It then defines 'classifyWordHT***' functions in order
to classify words for each of those sub-languages.

I was wondering if it would be possible / advisable to invoke a
different lexer for each sub-language, instead of trying to support
them all from one lexer?
For example, I could detect the opening tag for javascript, scan down
the file and count the character length until the javascript block
ends. Then I could pass the original Accessor to the javascript lexer
(LexerCPP) with the start position and length. This 'sub-lexer' would
colorize the text, and the main lexer could then skip that block of
text.

It seems that a Scintilla lexer isn't designed to do this on it's own,
since Geany passes it all of the data about filetypes, keywords, and
highlighting mappings. But is there any reason why I couldn't
hard-code javascript = SCLEX_CPP in my HAML lexer?
Or is there an abstract way to query lexer mappings and keywords from
scintilla's caller application?


My other question is: How do you test your lexers? Do you just compile
them and check them manually in SciTE or Geany?
I'd really like to start with some sample files, hand-code the
expected highlighting, then compile and run the sample files through
the lexer until all the expectations are met. I haven't been able to
find any documentation about testing, but please let me know if
someone has already written a script to automate this process.


Thanks a lot for your time!

Best regards,
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] Unit tests for Geany (continued from Github)

2011-11-29 Thread Nathan Broadbent
(continued from github - https://github.com/geany/geany/pull/15)

 I don't think any of Geany's developers will argue that having some sort of 
 unit testing would be a good idea, especially for the plugin API, but mainly 
 it boils down to:

 1) What framework to use (Geany is written in plain C).


From the Stack Overflow question Is Google Test OK for testing C
code? (http://stackoverflow.com/a/6218365/304706) :

It is pretty common to test C code using a C++ testing frameworks,
even the leading book on the subject
(http://pragprog.com/titles/jgade/test-driven-development-for-embedded-c)
follows this approach. I have used googletest extensively in the past
to unit test C code and can recommend it.

I have written a blog post about it that might be useful:
http://meekrosoft.wordpress.com/2009/11/09/unit-testing-c-code-with-the-googletest-framework/

...

As long as your headers are C++-compatible (not using C++ keywords,
export symbols with correct linkage), it should be fine.


 2) How do you run unit tests on a live GUI application with no libraries 
(surely there's a way).

I don't have much experience, so I can't offer any suggestions. But I
can do the research.


 3) Who's going to do it :)

 If you want to help with this, I'm sure it would be appreciated.

I could help start it off, but it would have to be an on-going thing.
I wouldn't have the time to sit down and write tests for the whole
application. Each developer could get into the habit of writing a test
whenever they change something or add a new feature.


 The only real restriction IMO is that it not add any dependencies to the
 application or build system under normal conditions.  For example, it would 
be a bummer to make Joe Hacker have to install some exotic
 unit testing framework libraries just to do a `make  make install`.

I totally agree with not adding dependencies under normal conditions,
and I don't think that will be an issue if the code is written well.
Test-driven development often enforces particular design patterns, so
there will probably need to be some refactoring involved.


-

To be honest, the real reason that I started talking about unit tests,
is because I really need them in order to write a lexer for scintilla.
Manual testing for lexers would be a nightmare.

editor_rant

Also to be honest, I'm still a little conflicted with regards to gedit
vs. geany vs. others. Gedit uses GTKSourceView, which has definitions
for many more languages, but their lexers are XML / Regex based. So
they're really slow for larger files, and they don't support code
folding, which I'm starting to get used to. But their community seems
to be a lot bigger, and a little more active.
I also experimented with an editor called 'Redcar' which now appears
to be the worst of both worlds... It uses GTKSourceView, plus the main
editor is written in Ruby... Ruby might be my favorite language, but
it's damn slow.
So yeah, I've tried everything from vim to Eclipse, but so far, only
Geany seems to have the right balance. So I'd like to put in some
effort to make this editor better - after all, I'm going to be using
it for 8 hours a day.

/editor_rant


Cheers!
Nathan


P.S. The documentation needs to be updated for the 'waf' build system,
in quite a few places, including geany-plugins.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] Greetings from an IDE refugee

2011-11-26 Thread Nathan Broadbent
Hello,

I'm a Ruby on Rails programmer with a bit of C and C++ experience.
I was using gedit 2.x  the gmate plugins happily for over a year, until
Ubuntu 11 decided to go to GTK3, and bump gedit to 3.x. All my plugins are
no longer compatible, so I decided that it was about time to find a new
editor.

I've tried all the editors I can find, and I've decided that Geany wins.
But I'm not completely satisfied with it, and there's plenty of things I'd
like to work on. Here's my list:


1) I'd like to expand the behaviour of 'Auto-close quotes and brackets',
and make it work like the 'Pair char autocomplete' gedit plugin -
http://code.google.com/p/gedit-pair-char-autocomplete/:

The plugin is smart enough to automatically overwrite existing closing
brackets when appropriate. Selecting a block of text and typing an opening
parenthesis or quote character will enclose the selection in quotes or
parenthesis.


2) I'd like to fix a weird bug with 'haml' templates - Any file that starts
with an '=' character is treated as a giant comment. This destroys syntax
highlighting for most of our haml files. I can't figure out why this is
happening.

3) I really like the TreeBrowser plugin. In fact, I really wouldn't have
considered Geany if it didn't exist. So I'd like to add file-system
monitoring to auto-refresh directories, and cut/copy/paste of multiple
files. I think a file browser is a pretty critical feature of any editor,
so I was also wondering if this plugin deserves to be merged into core.

4) I would love to write some plugins in Ruby. The GeanyLua plugin could be
a good base for this, but it would be great if the core had native bindings
for Python and Ruby.

5) I'd love to see more 'Ruby on Rails'-related plugins, such as test suite
integration (RSpec/Cucumber), built-in Rails API documentation (similar to
railsapi.com), and caching/invoking rake  capistrano tasks. It would also
be nice if the compile/build buttons could be automatically hidden while
editing a scripting language.

6) It would be cool to have some simple integrations with git and github.


Well, those are some of the things I'd like to work on. Thanks to everyone
who has worked on Geany so far! It's a great IDE, and I look forward to
contributing.


Regards,
Nathan B
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Greetings from an IDE refugee

2011-11-26 Thread Nathan Broadbent
Hi Lex,

Thanks for your reply.

 Certainly you could use a plugin to provide an improvement in
 auto-closing braces etc.  In general these days it is preferable that
 all language specific parts go in plugins so they don't interfere with
 other languages.  Since braces are shared by all the C refugee
 languages :) a plugin for that would probably get much use.

 As a personal note I find autoclosing a PITA and don't use it, YMMV.


I'll certainly write language specific parts in a plugin. Although, I
think the features I mentioned are pretty generic, especially
enclosing selected text in quotes or parentheses.


 What filetype are you using for haml since it isn't a supported
 filetype?  It is possible that whichever highlighting analyser you use
 doesn't fully understand haml (or it just has a bug :).  The lexers
 are part of the editing component Geany uses from the scintilla
 project (see http://www.scintilla.org/ ) so if you find a bug you
 should report it there.

I've tried ruby and yaml filetypes, but it seems like a 'default'
issue, even when `*.haml;` isn't defined anywhere. Thanks for pointing
out that Geany uses scintilla. I found a relatively promising thread
on their google group
(http://groups.google.com/group/scintilla-interest/browse_thread/thread/4220bfe6fbdf5e4d),
but it seems to have gone nowhere. I guess I have to get my hands
dirty with lexers :)


 Well, lots of us don't think it is needed in an IDE at all, most
 desktops have a browser already, and it runs in another window on
 another screen making much better use of my screen real estate.  And
 selecting files there opens them in Geany fine.

 By all means implement improvements for the treebrowser plugin, but it
 is unlikely to be added to core (especially as even the more limited
 filebrowser included with Geany is a plugin, not core).

Ok, that's fair enough. I agree that the 'minimal' mentality is a
great thing to preserve, so I will just implement those improvements
on the plugin. By the way, I'm really glad that the 'geany-plugins'
umbrella project exists. It's a really good idea, and I'll be keeping
it in mind for some of my other open source projects.


 A Python plugin plugin is in progress. See
 https://github.com/codebrainz/geanypy

Awesome! If I write geanyrb, I will base it on this. Do you think it
might make sense to have an abstract script plugin, with a common API?
The Lua, Python and Ruby plugins could then share the same API.


 There is a VCS plugin that supports git.  What do you mean by github
 integration?

Thanks for that, I didn't notice the GeanyVC plugin. Works great, and
I have a few ideas for improvements.
A Github integration would be pretty ambitious, but I guess I'm just a
Linux user who's a bit jealous of Github for Mac
(http://mac.github.com/)... It would be cool to have some of those
basic repo management features in my IDE.


Thanks again for your reply!

Cheers,
Nathan
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Greetings from an IDE refugee

2011-11-26 Thread Nathan Broadbent
 If I understand you correctly, you're referring to this bug report
 [1]. It was recently discussed on the list [2], and there is even some
 code implementing the feature as a plugin [3].

 [1] 
 https://sourceforge.net/tracker/?func=detailaid=3383201group_id=153444atid=787794
 [2] http://www.mail-archive.com/geany-devel@uvena.de/msg05210.html
 [3] https://github.com/pzoxiuv/Geany-Plugins


Oh, great! Amazing that this has been worked on so recently.
It's almost what I want... But I think it should be the default
behavior for 'auto-close quotes and brackets', instead of a plugin. I
don't think any extra configuration options are necessary - nobody
would complain about it if they've already turned on the 'auto-close'
feature. I also think that the actual characters are much more
appropriate triggers than 'Ctrl+key'.


Thanks for your help!
Nathan
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel