* comint-mode broken in GNU Emacs 21.2.1?
@ 2003-09-18 20:28 Vincent Montressor
2003-09-18 20:37 ` Stefan Monnier
2003-09-18 22:39 ` Kevin Rodgers
0 siblings, 2 replies; 4+ messages in thread
From: Vincent Montressor @ 2003-09-18 20:28 UTC (permalink / raw)
I'm having trouble using comint-mode under GNU Emacs 21.2.1:
% emacs -nw -q
M-x compile
Change compile command to something that accepts interactive input, such as cat:
C-a C-k cat RET
Go to the end of the compilation buffer and enter comint-mode:
C-x o M->
M-x comint-mode
Type something and hit RET:
hello, world RET
Emacs issues the following error:
error in process filter: Wrong type argument: markerp, nil
Does anyone know how to fix this?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: comint-mode broken in GNU Emacs 21.2.1?
2003-09-18 20:28 comint-mode broken in GNU Emacs 21.2.1? Vincent Montressor
@ 2003-09-18 20:37 ` Stefan Monnier
2003-09-22 10:24 ` Vincent Montressor
2003-09-18 22:39 ` Kevin Rodgers
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2003-09-18 20:37 UTC (permalink / raw)
> error in process filter: Wrong type argument: markerp, nil
> Does anyone know how to fix this?
The usual way: set debug-on-error, reproduce the error, look at the
backtrace, if you don't know what to do then, post the backtrace for more
info, ...
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: comint-mode broken in GNU Emacs 21.2.1?
2003-09-18 20:28 comint-mode broken in GNU Emacs 21.2.1? Vincent Montressor
2003-09-18 20:37 ` Stefan Monnier
@ 2003-09-18 22:39 ` Kevin Rodgers
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2003-09-18 22:39 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
Vincent Montressor wrote:
> I'm having trouble using comint-mode under GNU Emacs 21.2.1:
>
> % emacs -nw -q
>
> M-x compile
>
> Change compile command to something that accepts interactive input, such as cat:
>
> C-a C-k cat RET
>
> Go to the end of the compilation buffer and enter comint-mode:
>
> C-x o M->
>
> M-x comint-mode
>
> Type something and hit RET:
>
> hello, world RET
>
> Emacs issues the following error:
>
> error in process filter: Wrong type argument: markerp, nil
I'll bet you're using my compile-input.el hack written way back in 1996.
Try this version, which adds comint-accum-marker to the comint-mode emulation:
[-- Attachment #2: compile-input.el --]
[-- Type: text/plain, Size: 1391 bytes --]
;;; compile-input.el
(defun compile-enable-input ()
"Enable user input to *compilation* buffers.
To do so, add this function to compilation-mode-hook."
;; Emulate comint-mode:
(require 'comint)
(set (make-local-variable 'comint-input-ring)
(make-ring comint-input-ring-size))
(set (make-local-variable 'comint-last-input-start)
(make-marker))
(set-marker comint-last-input-start (point-min))
(set (make-local-variable 'comint-last-input-end)
(make-marker))
(set-marker comint-last-input-end (point-min))
(set (make-local-variable 'comint-last-output-start)
(make-marker))
(set-marker comint-last-output-start (point-max))
(set (make-local-variable 'comint-accum-marker)
(make-marker))
(set-marker comint-accum-marker nil)
(add-hook (make-local-variable 'pre-command-hook)
'comint-preinput-scroll-to-bottom)
;; Move point to EOB on input:
(set (make-local-variable 'comint-scroll-to-bottom-on-input)
'this)
;; Restore useful bindings for input:
(local-unset-key " ") ; was scroll-up
(local-unset-key "\^?") ; was scroll-down
;; Add bindings to send input to compilation process:
(local-set-key "\C-c\C-d" 'comint-send-eof)
(local-set-key "\C-m" 'comint-send-input)
;; Enable input:
(set (make-local-variable 'compile-disable-input) nil))
(add-hook 'compilation-mode-hook 'compile-enable-input)
[-- Attachment #3: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: comint-mode broken in GNU Emacs 21.2.1?
2003-09-18 20:37 ` Stefan Monnier
@ 2003-09-22 10:24 ` Vincent Montressor
0 siblings, 0 replies; 4+ messages in thread
From: Vincent Montressor @ 2003-09-22 10:24 UTC (permalink / raw)
"Stefan Monnier" <monnier@iro.umontreal.ca> wrote in message news:<jwvy8wlu93d.fsf@vor.iro.umontreal.ca>...
> > error in process filter: Wrong type argument: markerp, nil
> > Does anyone know how to fix this?
>
> The usual way: set debug-on-error, reproduce the error, look at the
> backtrace, if you don't know what to do then, post the backtrace for more
> info, ...
The compile-input.el solution posted by Kevin Rodgers solved the
problem for me (thanks!), so I am back in business. (Indeed, this
solution is even nicer than using comint-mode, since I don't have to
change modes in the compilation buffer.)
Just out of curiosity, I did as you suggested above, using comint-mode
as before, and got this backtrace:
Debugger entered--Lisp error: (wrong-type-argument markerp nil)
marker-position(nil)
compilation-filter(#<process compilation> "hello, world\n")
I can't afford the time to explore it further now, especially since my
problem is solved, but anyone else who's interested now has that as a
starting point.
Thanks to both of you for your assistance.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-09-22 10:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-18 20:28 comint-mode broken in GNU Emacs 21.2.1? Vincent Montressor
2003-09-18 20:37 ` Stefan Monnier
2003-09-22 10:24 ` Vincent Montressor
2003-09-18 22:39 ` Kevin Rodgers
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).