[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot interrupt async shell command
From: |
Juri Linkov |
Subject: |
Re: Cannot interrupt async shell command |
Date: |
Thu, 31 Aug 2006 01:45:34 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> * Start an async shell command: M-! sleep 100 & RET
> * Switch to the buffer *Async Shell Command*
> * Type C-c C-c
>
> I got the error: Marker does not point anywhere
>
> Backtrace looks as follows:
>
> Debugger entered--Lisp error: (error "Marker does not point anywhere")
> shell-filter-ctrl-a-ctrl-b("")
> run-hook-with-args(shell-filter-ctrl-a-ctrl-b "")
> comint-send-input(t t)
> comint-skip-input()
> comint-interrupt-subjob()
> call-interactively(comint-interrupt-subjob)
Another commands unusable in *Async Shell Command* are `comint-quit-subjob',
`comint-stop-subjob' and `comint-kill-subjob'. All they don't work here
due to the call to `comint-skip-input' and `shell-filter-ctrl-a-ctrl-b'
which fails in *Async Shell Command* because the marker
`comint-last-output-start' has no position.
One way to fix this bug is to replace the following line in
`shell-filter-ctrl-a-ctrl-b':
(goto-char (or comint-last-output-start (point-min)))
with
(goto-char (or (and (marker-position comint-last-output-start)
comint-last-output-start)
(point-min)))
i.e. to check if there is a buffer position recorded in
comint-last-output-start instead of checking the marker
(always created in `comint-mode') for nil.
--
Juri Linkov
http://www.jurta.org/emacs/