[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: Sat, 02 Sep 2006 02:48:22 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>>> 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.
>> That sounds like a good thing to do in any case.  Could you install this
>> change?
> Shouldn't that be:
>       (goto-char (or (and comint-last-output-start
>                         (marker-position comint-last-output-start))
>                    (point-min)))

This will fail when `comint-last-output-start' is not a marker.

Actually, `comint-last-output-start' is never nil and always a
marker in the comint buffer, so both versions will work.

But if we want to be extra safe, then that should be:

      (goto-char (or (and (markerp comint-last-output-start)
                          (marker-position comint-last-output-start))

i.e. to check if `comint-last-output-start' is a marker and has
a position, and to use this position in `goto-char'.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]