[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kant
Subject:    Bug#43134: Run shell command with file contents or filename as input
From:       Phlip <pplumlee () omnigon ! com>
Date:       2002-05-29 12:25:36
[Download RAW message or body]

Anders Lund sez:

> > The shell command may return error messages. Those messages should be
> > caught into an output window.
> > By clicking on lines in the output
> > windwo it should be possible to jump
> > to a line number specified in the error
> > message.
> >
> > To extract what line to jump to one
> > could use regular expressions.
>
> I do have the start of a plugin that can do exactly that, but there is
> still a long way before it is done. Would oyu like to help?

The problem with this topology is the same as with the primitive 
pipe-and-jump-to-error-line system in Vim that nobody uses. Without a real UI 
after the error results collect, Vim arbitrarily jumps to the first error 
line. This is totally disturbing (especially since Vim is too primitive to 
have a way to easily get right back to where one was) because 49% of the time 
it's not what one wants.

I have already added to my private Kate the ability to jump to a command 
line, and I use it out-of-process when testing, with this:

	http://c2.com/cgi/wiki?PyUnitTestBrowser

When the user clicks on an error, or when they select test code or production 
code in the top panel and use the edit feature, the program shells to kate 
like this:

	kate -line 62 ./test_browser.py

kate (much more intelligently than Vim) then navigates to that file or opens 
it, then puts the cursor on that line.

My system could easily be replicated into any other language. If one were 
using CppUnit or JUnit (for example), one could adjust that test runner to 
trigger a test event when one saves ones files. Then when CppUnit reports an 
error into its error list, one could trigger kate remotely like that.

I have submitted the relevant code changes to this list; all kate needed was 
the -line feature.

> > Combinations of shell commmands
> > and regular exprssions for handling
> > error jumps could be added as named
> > tools to the tools menu.
> > E.g one could have a tool called
> > compiled java that executed javac
> > on the file currently edited.

So I assume you have heard of JUnit, and how important it is to a program's 
growth cycle?

> I'd say no, as that would mean a action for every language/filetype/command
> combination you would think of. A plugin that is only active for some
> defined file types would make sense.

A system that makes adding buttons to Kate as easy as, say, Glimmer, would go 
far here towards such stochastic customization.

-- 
  Phlip
           http://www.greencheese.org/DontPlanDesigns
  --  "Why have an attention span when you can
       have a staff [of lawyers]?"  -- Ian Sholes  --

(Complete bug history is available at http://bugs.kde.org/db/43/43134.html)
_______________________________________________
kde-kant mailing list
kde-kant@
http://mail.kde.org/mailman/listinfo/kde-kant
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic