Hi,
I love using emacs as my main editor. Usually I integrate emacs as external tool in the IDE.
For example in Visual Studio: emacsclientw -n +$(CurLine):$(CurCol) $(ItemPath)
In Code::Blocks I use the following:
Executeable: /usr/bin/emacsclient
Parameters: -n ${ACTIVE_EDITOR_FILENAME}
What I miss is the option to send the current cursor position in emacs.
Is there a hidden Macro or Variable I can use?
Bye Gunther
Quote from: glaure on February 02, 2010, 09:32:14 AM
Is there a hidden Macro or Variable I can use?
No, it's not implemented, but I can do this quickly. The question is: Shall that be
zero index based (so the first line/column is zero) or human readable, so
one index based (thus the first line/column is really 1).
Quote from: MortenMacFly on February 02, 2010, 10:15:55 AM
Quote from: glaure on February 02, 2010, 09:32:14 AM
Is there a hidden Macro or Variable I can use?
No, it's not implemented, but I can do this quickly. The question is: Shall that be zero index based (so the first line/column is zero) or human readable, so one index based (thus the first line/column is really 1).
I suggest to use the same values as scintilla does, otherwise it might confuse the user.
I am looking into wxScintilla too :)
Just checked with emacs. The cursor positions start with 1. So 1:1 means left upper corner.
Is it possible that you may send me a patch file of your changes? I am still forced to use the 8.02 release.
But I looked into the source code and think I could integrate this feature here too.
Thanks Gunther
Quote from: jens on February 02, 2010, 10:21:10 AM
I suggest to use the same values as scintilla does, otherwise it might confuse the user.
I don't think so. External applications (which we target hereby) will usually have a human readable interface although they might be zero based internally. This is not really related to wxScintilla. However, I can do both... not very convenient, but I can think of use cases where you either need the one or the other. ;-)
It's already implemented in my local copy... just doing some testing... Then I can provide a patch and submit to trunk.
Quote from: MortenMacFly on February 02, 2010, 10:59:01 AM
It's already implemented in my local copy... just doing some testing... Then I can provide a patch and submit to trunk.
Done. however, a patch is not good as I have also done some code cleanup. Please do a comparison of r6129 and r6130 online using:
http://svn.berlios.de/wsvn/codeblocks/?op=log&rev=0&sc=0&isdir=1
The relevant parts are all where you find "
m_ActiveEditorLine" and "
m_ActiveEditorColumn" in the header and implementation file.
Thank you!
I will tell you if it works in 8.02.
Quote from: glaure on February 02, 2010, 11:51:44 AM
I will tell you if it works in 8.02.
BTW: I would really suggest you update your code base if possible. 08/02 is *very* outdated.
I agree. But this is a productive company environment. There is no chance that I force a role-out of a C::B nightly build. (Only would get my ass kicked or worse :) )
Edit:
Morten it works perfect! I am a happy developer now :)