home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / functions / ag-compile.el < prev    next >
Encoding:
Text File  |  1990-03-21  |  2.5 KB  |  62 lines

  1. ;Path: ark1!nap1!ames!uakari.primate.wisc.edu!csd4.csd.uwm.edu!mailrus!ncar!asuvax!mcdphx!udc!chant!aglew
  2. ;From: aglew@urbana.mcd.mot.com (Andy-Krazy-Glew)
  3. ;Newsgroups: comp.emacs
  4. ;Subject: Re: dired sorting by date
  5. ;Message-ID: <AGLEW.89Aug30191000@chant.urbana.mcd.mot.com>
  6. ;Date: 30 Aug 89 23:10:00 GMT
  7. ;References: <44719@bbn.COM> <572C02cp4emH01@amdahl.uts.amdahl.com> <10204@csli.Stanford.EDU> <KIM.89Aug29080137@kannel.lut.fi>
  8. ;Sender: aglew@urbana.mcd.mot.com
  9. ;Organization: Work: Motorola MCD, Urbana Design Center; School: University of Illinois at Urbana-Champaign
  10. ;Lines: 85
  11. ;In-reply-to: kim@kannel.lut.fi's message of 29 Aug 89 12:01:37 GMT
  12. ;
  13. ;   From: ceb@csli.Stanford.EDU (Charles Buckley)
  14. ;   Newsgroups: comp.emacs
  15. ;   Date: 28 Aug 89 09:38:50 GMT
  16. ;   Organization: Center for the Study of Language and Information, Stanford U.
  17. ;
  18. ;   In the spirit of the recently posted dired-by-date patch, I seem to
  19. ;   remember that it used to be that when you did M-x grep, and got your
  20. ;   results in the *compilation* buffer, that hitting 'e' or somehing on a
  21. ;   partiucular line would cause that file to be edited, and move the
  22. ;   cursor to the line in question (One could even do this by character -
  23. ;   enough information is present).  
  24. ;
  25. ;   Does someone still have the code which does this, or could perhaps
  26. ;   some FSF member dig it out of the code locker?
  27. ;
  28. ;This isn't the old code (I wasn't aware of the old code) but it does
  29. ;part of the trick:
  30. ;
  31. ;;; Added functions to the compile package
  32.  
  33.  
  34. (defun ag-reparse-compilation-errors ()
  35.   "Move to a position in the compilation window,
  36. skipping stuff you don't want,
  37. and recreate list.
  38. INTERIM: maybe long delay since whole list is redone.
  39. but so far I have found it tolerable"
  40.   (interactive)
  41.   (compilation-forget-errors)
  42.   (save-excursion
  43.     (set-buffer "*compilation*")
  44.     (setq compilation-parsing-end (point)))
  45.   (next-error))
  46.  
  47. (make-global-binding "\^x\\" 'ag-reparse-compilation-errors)
  48.  
  49.  
  50. ;As I mention inline, it can be slow since it reparses the *compilation*
  51. ;buffer -- this was right for me, since I occasionally edit the compilation
  52. ;buffer, but it isn't always the best. Or, you could move down the already
  53. ;parsed list of marks until you found the one corresponding to your
  54. ;position in the *compilation* buffer.
  55. ;
  56. ;--
  57. ;Andy "Krazy" Glew,  Motorola MCD,                    aglew@urbana.mcd.mot.com
  58. ;1101 E. University, Urbana, IL 61801, USA.          {uunet!,}uiucuxc!udc!aglew
  59. ;   
  60. ;My opinions are my own; I indicate my company only so that the reader
  61. ;may account for any possible bias I may have towards our products.
  62.