tony@oha.UUCP (Tony Olekshy) (04/14/90)
In message <75V2SHDxds13@ficc.uu.net>, peter@ficc.uu.net (Peter da Silva) writes: > > What about... > /usr/include/sys/termio.h(13): Error 47: Redefined TIOCSETC > Where should "error" stick this message? First of all, have make copy tags to tags+ whenever tags is regenerated. What am I talking about, you ask? Read on... Now, your compile with error editing script, ccee, should do the following. - Tee all the output of cc into a temp file. - sed the temp file into, say, @error, with an transformation which produces lines like: usr_include_sys_termio_h_13: Error 47: Redefined TIOCSETC - The script then generates another sed transformation of the temp file, and pipes the result to sort -o tags - tags+. The second transformation produces lines like: usr_include_sys_termio_h_13 /usr/include/sys/termio.h 13 - The script then starts vi @error for you. Look at the top few errors. When you want to see the location from whence a message originates, put the cursor at the beginning of the line containing the message and ^]. Your real tags still work too. So now you can go mucking about, and when you are ready for the next message just :n @error. Delete the lines pertaining to problems solved, and continue. Note that ccee could munge EXINIT to map some key to :n @error. - When vi is exited, ccee is done. You can return to any unsolved problems with vi @error. If you want an edit/compile/test loop, ccee may want to prompt for the next step while cycling the default, allow shell escapes, use make test for the test step, et cetera. The ccee prompt might look like: ccee: next? e(dit) c(ompile) t(est) v(i @error) !(command) q(uit) [c] _ Well, that about does it. I have tested the tags file concept, but have not written the code because with multiscreens I have 6 editing sessions, a master make dispatcher, and a few test sessions all going at once! When you have limited screen real estate, like 14", multiscreens beat any windowing system. X on a laptop, anyone? Also note that if you write this in perl, it can suck in the original tags+ and do collision avoidance label selection, easily handle quite fancy user interaction at the prompt, and do away with the temp file, sed, and external sort. The whole thing would perform like a thoroughbred. Cool. Have fun. -- Yours, etc., Tony Olekshy (...!alberta!oha!tony or tony@oha.UUCP).