From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#30187: master a710f8a: * lisp/comint.el (comint-history-isearch-setup): Check if process is live. Date: Thu, 08 Feb 2018 11:13:46 +0800 Message-ID: References: <20180206213907.23079.76097@vcs0.savannah.gnu.org> <20180206213908.03CCC208E4@vcs0.savannah.gnu.org> <87tvush4zh.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518059561 25143 195.159.176.226 (8 Feb 2018 03:12:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Feb 2018 03:12:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (macOS 10.12.6) Cc: 30187@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 08 04:12:37 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 1ejcd7-0004XM-SE for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Feb 2018 04:12:10 +0100 Original-Received: from localhost ([::1]:35669 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejcf7-0006NM-Db for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Feb 2018 22:14:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejcez-0006LY-US for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 22:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejcew-0008L2-Ow for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 22:14:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53990) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ejcew-0008Kr-K3 for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 22:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ejcew-0000zi-AB for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2018 22:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Feb 2018 03:14:02 +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.15180596403806 (code B ref 30187); Thu, 08 Feb 2018 03:14:02 +0000 Original-Received: (at 30187) by debbugs.gnu.org; 8 Feb 2018 03:14:00 +0000 Original-Received: from localhost ([127.0.0.1]:33654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejcet-0000zJ-Nj for submit@debbugs.gnu.org; Wed, 07 Feb 2018 22:13:59 -0500 Original-Received: from mail-pg0-f52.google.com ([74.125.83.52]:43249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejcer-0000z6-4m for 30187@debbugs.gnu.org; Wed, 07 Feb 2018 22:13:57 -0500 Original-Received: by mail-pg0-f52.google.com with SMTP id f6so1141627pgs.10 for <30187@debbugs.gnu.org>; Wed, 07 Feb 2018 19:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=CMRmXcIVKooyTV5h1j/+AUqql6uYQ9oUmCXaMgxctUQ=; b=Sye4kyLdUXnorOAVXEs1JBumB8TDC+fXfPaWSUhc8Xh0Rf6IsR+0cwPFNQPGuZkc/J Q/GgQzzNCsrqKLGTSYojPNz3mcNECpr81yDkGoAqjP0qhfiri3fEiakZtZ5HbQz066Hm q+vw/WbA/KLZI/Saqw6JtWA6XSP2AnKVbjJSL3BEmgNS0FYrbelpSpcc+l1P6ZSo1eEL uzODiEz/RfCDrCBR5JCD3nMFtW+Loi0qSFGtEx8vvH7BJajzaq097oa7jizDRQDi5xKh 1Rp7DGQNaZQ34ZMyk1nhNS38o+fHWfRMKpf6zyBLI+51n0NJEHYZrg38VbPNbNCMsZyn 9cbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=CMRmXcIVKooyTV5h1j/+AUqql6uYQ9oUmCXaMgxctUQ=; b=SrIXmBeyb/54p37eYPxn93K10zevBDqVHQxNzavKtKN9NvkqhwXKCI1RU441QwZot5 4rLuCJZpE/7+n5M15IelGL14cyPr8q2hSj0sjSzRw9EiaQ3X1E0YkRnRbOq91C436UwI nrpjEMut4Gmoeuuzxj5X+8wfkMrCeHWG8iv0GlyeDEugQd4NhjSr3Il2d8aE84/BM/RJ 2YGokPJmuSIQZgPul9DGmmRBWRWY0J+KBdbEYO9wUXsZX3yFsEFbLVjAsjD9SPzLQxt7 ltX+66kfpK+mvGHBmayVF1kR75pkjV9cOSvKQ4z790esl0+s/Elqb78u66fWl4eSGOuK pZCw== X-Gm-Message-State: APf1xPBO31YJEinK/3qqxXcuXnR3jnEm6X4gzmUhw/y3hcjzJMsPSp2R 5sVKYeQv1Wr562R81XM04MEjTQ== X-Google-Smtp-Source: AH8x224phGX+/v8QXo0TBR++ltyYIDL4sgtpLUBMsP79tpntdY9ccJ+yszW4PyqLu+QHZYgcirKhwg== X-Received: by 10.99.37.7 with SMTP id l7mr6681836pgl.311.1518059631060; Wed, 07 Feb 2018 19:13:51 -0800 (PST) Original-Received: from Zeuss-MacBook-Air.local ([112.208.17.40]) by smtp.gmail.com with ESMTPSA id j1sm5554349pff.94.2018.02.07.19.13.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2018 19:13:50 -0800 (PST) Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC In-Reply-To: <87tvush4zh.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 07 Feb 2018 23:20:02 +0200") 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:143023 Archived-At: On 2018-02-07 23:20 +0200, Juri Linkov wrote: > Before this fix the search was broken in *Async Shell Command* > and in inactive shells. Thanks. I tried the following examples and saw their failures. > > For example, try to set comint-history-isearch to =A1=AEdwim=A1=AF > and type =A1=AEC-r=A1=AF in a *Async Shell Command* buffer. It fails with > > Lisp error: (wrong-type-argument processp nil) > process-mark(nil) > comint-after-pmark-p() > comint-history-isearch-setup() > ... It seems to make a lot of sense to have comint-after-pmark-p return nil instead. WDYT? > Or even when comint-history-isearch is nil by default, run shell =A1=AEM-= x shell=A1=AF, > then exit it, and after =A1=B0Process shell finished=A1=B1 type =A1=AEM-r= =A1=AF 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 =A1=AEcomint-goto-input=A1= =AF like > in the backtrace above? My use case is using a function (or in Erlang's lingo a light-weight process) to communicate with a remote Erlang shell. So there is no process as comint/emacs understands. Leo