🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #1695

next-error does not parse lint messages correctly

#1695
From: Govind N. Kamat
Date: Thu, 18 May 1989 02:19
44 lines
1646 bytes
Error-output from System V lint is not parsed correctly by next-error
(apparently, the format of these messages was changed by AT&T).  I'm
using Gnu_Emacs version 18.51.7 with HP-UX 3.0, on a HP 9000/840.

Lars Pensj| (lars@myab.se) posted the following code to comp.emacs on
USENET which works reasonably well.  It would be helpful to have
something like this included in compile.el with a new release of
Emacs.

Thanks very much.

(defun lint-convert ()
  "Modify *compilation* buffer from lint format."
  (interactive)
  (save-excursion
    (switch-to-buffer "*compilation*" t)
    (goto-line 1)
    (while (re-search-forward "^=")
      (let (loc filename)
	(forward-line -1)
	(beginning-of-line)
	(setq loc (point)) (end-of-line)
	(setq filename (buffer-substring loc (point)))
	(message filename)
	(sit-for 1)
	(beginning-of-line 3)
	(while (equal (buffer-substring (point) (1+ (point))) "(")
	  (insert (concat "\"" filename "\", line "))
	  (delete-char 1)
	  (search-forward ")")
	  (delete-char -1)
	  (insert ":")
	  (beginning-of-line 2)
	  )
	)
      )
    )
  )


--
Govind N. Kamat				College of Engineering
kamat@uceng.UC.EDU			University of Cincinnati
					Cincinnati, OH 45221, USA
Technical Details
Message-ID: <8905180218.AA27287@rutgers.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UCENG.UC.EDU!kamat

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UCENG.UC.EDU!kamat
From: kamat@UCENG.UC.EDU (Govind N. Kamat)
Newsgroups: gnu.emacs.bug
Subject: next-error does not parse lint messages correctly
Message-ID: <8905180218.AA27287@rutgers.edu>
Date: 18 May 89 02:19:47 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 44