User forums > Using Code::Blocks

Configure Tool "Send to emacs" with cursor position

(1/2) > >>

glaure:
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

MortenMacFly:

--- Quote from: glaure on February 02, 2010, 09:32:14 am ---Is there a hidden Macro or Variable I can use?

--- End quote ---
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).

Jenna:

--- 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?

--- End quote ---
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).

--- End quote ---

I suggest to use the same values as scintilla does, otherwise it might confuse the user.

glaure:
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

MortenMacFly:

--- 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.

--- End quote ---
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.

Navigation

[0] Message Index

[#] Next page

Go to full version