From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#30187: master a710f8a: * lisp/comint.el (comint-history-isearch-setup): Check if process is live. Date: Wed, 07 Feb 2018 23:20:02 +0200 Organization: LINKOV.NET Message-ID: <87tvush4zh.fsf@mail.linkov.net> References: <20180206213907.23079.76097@vcs0.savannah.gnu.org> <20180206213908.03CCC208E4@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518038450 15478 195.159.176.226 (7 Feb 2018 21:20:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Feb 2018 21:20:50 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 30187@debbugs.gnu.org To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 07 22:20:46 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejX8R-0001SX-AL for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Feb 2018 22:20:07 +0100 Original-Received: from localhost ([::1]:60104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejXAS-0006mF-Ns for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Feb 2018 16:22:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejXAL-0006lh-6y for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 16:22:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejXAI-0006uQ-2m for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 16:22:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53844) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ejXAH-0006uH-VV for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 16:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ejXAH-00048c-QF for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 16:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Feb 2018 21:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30187 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30187-submit@debbugs.gnu.org id=B30187.151803849315872 (code B ref 30187); Wed, 07 Feb 2018 21:22:01 +0000 Original-Received: (at 30187) by debbugs.gnu.org; 7 Feb 2018 21:21:33 +0000 Original-Received: from localhost ([127.0.0.1]:33508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejX9p-00047w-72 for submit@debbugs.gnu.org; Wed, 07 Feb 2018 16:21:33 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:44577 helo=homiemail-a23.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejX9n-00047n-9w for 30187@debbugs.gnu.org; Wed, 07 Feb 2018 16:21:31 -0500 Original-Received: from homiemail-a23.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a23.g.dreamhost.com (Postfix) with ESMTP id 70F6F4B0089; Wed, 7 Feb 2018 13:21:30 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-111-42.cust.tele2.ee [91.129.111.42]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a23.g.dreamhost.com (Postfix) with ESMTPSA id 9225C4B007C; Wed, 7 Feb 2018 13:21:29 -0800 (PST) In-Reply-To: (Leo Liu's message of "Wed, 07 Feb 2018 09:19:08 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143015 Archived-At: > Changing comint-history-isearch-setup this way seems too pervasive. I > have a use case where (get-buffer-process (current-buffer)) is always > nil. Is there another way to work around the issue in *Async Shell > Command*? Thanks. Before this fix the search was broken in *Async Shell Command* and in inactive shells. For example, try to set comint-history-isearch to =E2=80=98dwim=E2=80=99 and type =E2=80=98C-r=E2=80=99 in a *Async Shell Command* buffer. It fai= ls with Lisp error: (wrong-type-argument processp nil) process-mark(nil) comint-after-pmark-p() comint-history-isearch-setup() ... Or even when comint-history-isearch is nil by default, run shell =E2=80=98= M-x shell=E2=80=99, then exit it, and after =E2=80=9CProcess shell finished=E2=80=9D type =E2= =80=98M-r=E2=80=99 and any letter to search for it: Lisp error: (wrong-type-argument processp nil) process-mark(nil) comint-delete-input() comint-goto-input(nil) comint-history-isearch-pop-state ... In these cases the history can't be searched because there is no active s= hell. I wonder what use case do you need in inactive shells without a prompt, so it's impossible to search in the history. How you used to search through the shell history without failing in =E2=80=98comint-goto-input=E2= =80=99 like in the backtrace above?