* help: Why is font-lock-add-keywords failing in comint??? [not found] ` <jwvu14soy2u.fsf-monnier+emacs/pretest@vor.iro.umontreal.ca> @ 2003-12-23 12:01 ` Daniel Pfeiffer 2003-12-23 14:54 ` help: adapting your library to new M-x compile Daniel Pfeiffer 1 sibling, 0 replies; 6+ messages in thread From: Daniel Pfeiffer @ 2003-12-23 12:01 UTC (permalink / raw) My new compile v0.19 http://dapfy.bei.t-online.de/compile.el now has a working minor-mode variant. That font-lock-add-keywords its own stuff to the front of whatever was there. It then calls turn-on-font-lock, or in case that was on, font-lock-fontify-buffer to make sure the new keywords are taken into accont. This works nicely: M-: (progn (outline-mode) (compilation-minor-mode)) You can also manually call compilation-shell-minor-mode in a comint buffer. The only thing that doesn't work, is activating it in the _same_command_ that starts a comint, actually comint-mode, not even on the post-command-idle-hook. This claims font-lock is on, the font-lock-keywords get correctly set, but all remains unfontified: M-: (progn (comint-mode) (compilation-minor-mode)) This promising work-around doesn't help either: M-: (progn (comint-mode) (remove-hook 'change-major-mode-hook 'font-lock-defontify t) (compilation-minor-mode)) I can't see what comint-mode is doing that prevents this from working. How can I marry comint-mode in one command with a minor mode that needs to turn on font-lock? Background: The new compile uses font-lock as its message parser. And some compilations (e.g. TeX) may want to talk back, so comint can be useful. coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / läramå Esperanto: http://lernu.net/ coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / läramå Esperanto: http://lernu.net/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* help: adapting your library to new M-x compile [not found] ` <jwvu14soy2u.fsf-monnier+emacs/pretest@vor.iro.umontreal.ca> 2003-12-23 12:01 ` help: Why is font-lock-add-keywords failing in comint??? Daniel Pfeiffer @ 2003-12-23 14:54 ` Daniel Pfeiffer 2003-12-25 5:01 ` Ian Zimmerman 1 sibling, 1 reply; 6+ messages in thread From: Daniel Pfeiffer @ 2003-12-23 14:54 UTC (permalink / raw) My new compile v0.19 http://dapfy.bei.t-online.de/compile.el is now nearing completion. RMS has been quite interested in the progress, so this should soon become the successor. You have written code that uses compile and might be broken or affected by these changes. Since I don't know what your code does, or don't have the programs it calls, I need your help. - compilation-error-regexp-alist has subtly changed. Most significantly the regexps must now be anchored with ^ if they match the beginning of a line. Else the leading .* can be dropped, making them simpler. It now offers richer possibilities: detecting line/column-ranges and differentiating 3 levels of messages. - compilation-file-regexp-alist is gone and is also handled by compilation-error-regexp-alist - compile-internal (which by name should never have been used) is deprecated. It is replaced by compilation-start and, if needed, a derived compilation mode. The new grep-mode is a good example of this. - compilation-error-list is gone. All locating of errors is done with compilation-next-error (which uses text-properties). - There is no longer a parse function you can override. Parsing is now done by font-lock. It already handles the custom cases I have identified. An example of the result can be seen when visiting this in Emacs: http://dapfy.bei.t-online.de/compilation.txt You can adapt your mode yourself. Or send me a compiler-output it is to parse. This should include all possible formats of error, warning and diagnostic messages and explain what the format is (file name, column numbers, etc.) Also explain anything odd that is going on, which could not be handled by the old compile. The things that need taking care of are: - diff-mode.el: A cleanup is included in my compile.el. The question is why this needs compilation-minor-mode at all, only to override its commands? Even though the concepts don't quite fit, it might be interesting to derive diff-mode from compilation-mode and let that do the parsing. - diff.el: This little library messes around in internal variables extensively. IMHO it should be merged into diff-mode, as it offers little extra. - progmodes/ada-mode.el: ada-compile-goto-error This apparently deals with multiple file-names to be found in one message. This is now handled by the default compile. - progmodes/ada-xref.el: Probably mostly works. Special setup may required a derived gnatfind-mode comparable to grep-mode. - progmodes/grep.el (not really a progmode!) A cleanup is included in my compile.el. - progmodes/vhdl-mode.el: vhdl-compile-init, ... Probably works, except for vhdl-compiler-alist, which should be improved. - textmodes/makeinfo.el Don't know what this is up to... - textmodes/bibtex.el: bibtex-validate Reparsing is no longer necessary, nor even possible. - textmodes/tex-mode.el: Parsing classical TeX output is impossible to get right. Make TeX use -file-line-error-style or -c-style-errors with normal compile. Making this work together with comint for interaction is under study, and will be handled by my library. - vc.el: vc-buffer-context, vc-restore-buffer-context This apparently reparses all compilation buffers pointing to a file reverted by vc? If so, that is no longer necessary: when a buffer gets reverted all markers to it go stale automatically. The code must only be removed. This requires a fairly recent Emacs 21.3.50 (a few months old should be fine, except if you use M-x grep). Due to the Savannah problems, you can temporarily get it here: cvs -d:ext:anoncvs@subversions.gnu.org:/cvs-latest/emacs ... I will be gone for a week after XMas, but will otherwise gladly help you. coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / läramå Esperanto: http://lernu.net/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: help: adapting your library to new M-x compile 2003-12-23 14:54 ` help: adapting your library to new M-x compile Daniel Pfeiffer @ 2003-12-25 5:01 ` Ian Zimmerman 2003-12-25 16:36 ` Kai Grossjohann 0 siblings, 1 reply; 6+ messages in thread From: Ian Zimmerman @ 2003-12-25 5:01 UTC (permalink / raw) Daniel> - textmodes/tex-mode.el: Daniel> Parsing classical TeX output is impossible to get right. Make Daniel> TeX use -file-line-error-style or -c-style-errors with normal Daniel> compile. Making this work together with comint for interaction Daniel> is under study, and will be handled by my library. Just making sure I understand what you're proposing here - have an elisp wrapper program watch the output of real TeX and filter it then output error messages in cc format to the compilation buffer? But if the wrapper can understand TeX's output, why not compile.el itself? -- Nothing can be explained to a stone. Or to a stoned person, either. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: help: adapting your library to new M-x compile 2003-12-25 5:01 ` Ian Zimmerman @ 2003-12-25 16:36 ` Kai Grossjohann 2003-12-25 23:25 ` Ian Zimmerman 0 siblings, 1 reply; 6+ messages in thread From: Kai Grossjohann @ 2003-12-25 16:36 UTC (permalink / raw) Ian Zimmerman <bayard@newsguy.com> writes: > Daniel> - textmodes/tex-mode.el: > > Daniel> Parsing classical TeX output is impossible to get right. Make > Daniel> TeX use -file-line-error-style or -c-style-errors with normal > Daniel> compile. Making this work together with comint for interaction > Daniel> is under study, and will be handled by my library. > > Just making sure I understand what you're proposing here - have an elisp > wrapper program watch the output of real TeX and filter it then output > error messages in cc format to the compilation buffer? Recent web2c versions of TeX support the -c-style-errors (or similar) command line option. Using it means that the output of TeX changes. Kai ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: help: adapting your library to new M-x compile 2003-12-25 16:36 ` Kai Grossjohann @ 2003-12-25 23:25 ` Ian Zimmerman 2003-12-26 1:11 ` David Kastrup 0 siblings, 1 reply; 6+ messages in thread From: Ian Zimmerman @ 2003-12-25 23:25 UTC (permalink / raw) Kai> Recent web2c versions of TeX support the -c-style-errors (or Kai> similar) command line option. Using it means that the output of Kai> TeX changes. Hmm, must be very recent indeed. Mine has no such option, and itz@homage:~$ dpkg --status tetex-bin Package: tetex-bin Status: install ok installed Priority: optional Section: tex Installed-Size: 8572 Maintainer: teTeX maintainers <debian-tetex-maint@lists.debian.org> Version: 2.0.2-5 But wasn't TeX (the program) supposed to be frozen forever? -- Nothing can be explained to a stone. Or to a stoned person, either. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: help: adapting your library to new M-x compile 2003-12-25 23:25 ` Ian Zimmerman @ 2003-12-26 1:11 ` David Kastrup 0 siblings, 0 replies; 6+ messages in thread From: David Kastrup @ 2003-12-26 1:11 UTC (permalink / raw) Ian Zimmerman <bayard@newsguy.com> writes: > Kai> Recent web2c versions of TeX support the -c-style-errors (or > Kai> similar) command line option. Using it means that the output of > Kai> TeX changes. > > Hmm, must be very recent indeed. Mine has no such option, and > > itz@homage:~$ dpkg --status tetex-bin > Package: tetex-bin > Status: install ok installed > Priority: optional > Section: tex > Installed-Size: 8572 > Maintainer: teTeX maintainers <debian-tetex-maint@lists.debian.org> > Version: 2.0.2-5 > > But wasn't TeX (the program) supposed to be frozen forever? Says who? Donald Knuth is not yet dead. But this stuff is web2c-centric anyway, and web2c is not part of TeX proper. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-26 1:11 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20031125230305.62ef78ae.occitan@esperanto.org> [not found] ` <jwvu14soy2u.fsf-monnier+emacs/pretest@vor.iro.umontreal.ca> 2003-12-23 12:01 ` help: Why is font-lock-add-keywords failing in comint??? Daniel Pfeiffer 2003-12-23 14:54 ` help: adapting your library to new M-x compile Daniel Pfeiffer 2003-12-25 5:01 ` Ian Zimmerman 2003-12-25 16:36 ` Kai Grossjohann 2003-12-25 23:25 ` Ian Zimmerman 2003-12-26 1:11 ` David Kastrup
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).