Can someone please let me know what I'm doing wrong? Is there some option somewhere that needs to be checked to allow this to work?
I've spent about 8 hours over the last 2 days searching the forums to find out how to make TP jump to a line in a source file from an error message in the output window.
Here's one of several Posix RE's that will work when doing a search from the Search menu, but will not get me to the source line when double clicking on the error line in the Output window:
"(.:\\[^"]+).+([0-9]+):
Also, File = 1, Line = 2, Column = Nothing/blank.
I've tried several other variations of this RE, some simpler, some more complex, and they all worked fine with "Search/Find/Find Next", but do not work by double-clicking the error line in the output window. I even tried using the default non-Posix syntax with Posix un-checked, and that worked with search as well. I even moved the "test" main.c file to root directory, hoping that a simpler path would help.
Here is a sample error message:
"C:\main.c", line 25: Cannot find and/or read include file "defs.h"
A side note: It would be nice to add a new feature to TP that gives some sort of clue as to what's wrong, instead of just "Cannot jump to item under the cursor". It's kind of obvious that it can't, if it doesn't!
I suggest that along with the standard "Cannot..." message in the status bar, to also include something like "File: 'C:\main.c' Line: '25' Column: '', so the user can tell if there is something wrong with his RE, or if the file and line are correct, some other reason why the action fails.
Cannot jump to item under the cursor/Real Expressions/Tools
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 6
- Joined: Tue Nov 16, 2010 4:51 pm
-
- Posts: 6
- Joined: Tue Nov 16, 2010 4:51 pm
Cannot jump to item under the cursor
I'm replying to my own post, because there were some typos and typoohs that may be misleading.
First of all, I said "Real" but meant "Regular" in the subject line, meaning that this post really does belong in the "Regular Expressions" forum.
Second, in the example I gave "(.:\\[^"]+).+([0-9]+): there was supposed to be a space between the .+ and the ([0-9]+):
Without the space (or different syntax altogether), it will ignore the MSD of the line number and return only the remaining digits.
Third, with doing nothing but closing TextPad, then restarting it again, it magically started working, even with the more simplified forms of my RE. So I guess my problem is solved, at least for now.
Fourth, I am aware that my "suggestion" to have TP report what is "sees" for the filename/line/column in the status bar when it encounters an error, belongs in the "Enhancement Suggestions" forum.
First of all, I said "Real" but meant "Regular" in the subject line, meaning that this post really does belong in the "Regular Expressions" forum.
Second, in the example I gave "(.:\\[^"]+).+([0-9]+): there was supposed to be a space between the .+ and the ([0-9]+):
Without the space (or different syntax altogether), it will ignore the MSD of the line number and return only the remaining digits.
Third, with doing nothing but closing TextPad, then restarting it again, it magically started working, even with the more simplified forms of my RE. So I guess my problem is solved, at least for now.
Fourth, I am aware that my "suggestion" to have TP report what is "sees" for the filename/line/column in the status bar when it encounters an error, belongs in the "Enhancement Suggestions" forum.