From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 20 16:39:43 2018 Received: (at submit) by debbugs.gnu.org; 20 Jan 2018 21:39:43 +0000 Received: from localhost ([127.0.0.1]:36375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ed0rW-0000iV-VE for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ed0rT-0000i3-BF for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ed0rM-0001qv-PP for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56208) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ed0rM-0001qi-Km for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ed0rL-00046a-6u for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 16:39:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ed0rI-0001lp-33 for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 16:39:31 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:42395 helo=homiemail-a21.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ed0rH-0001kh-PB for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 16:39:28 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id 98D221C0066 for ; Sat, 20 Jan 2018 13:39:25 -0800 (PST) Received: from localhost.linkov.net (m91-129-108-180.cust.tele2.ee [91.129.108.180]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id BB8F51C0065 for ; Sat, 20 Jan 2018 13:39:24 -0800 (PST) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: M-e should restore isearch correctly in special modes Organization: LINKOV.NET Date: Sat, 20 Jan 2018 23:10:16 +0200 Message-ID: <87607wnsnb.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable There was an old problem that =E2=80=98isearch-edit-string=E2=80=99 incor= rectly restored a previous isearch mode in such commands as =E2=80=98comint-history-isearch-backward=E2=80=99 and =E2=80=98dired-isea= rch-filenames=E2=80=99 because they let-bind variables that affects the search parameters, e.g. =E2=80=98(let ((dired-isearch-filenames t)))=E2=80=99 only at the st= arting isearch, but when =E2=80=98M-e=E2=80=99 (isearch-edit-string) exits isear= ch, and later starts again, these let-binding are not in effect and thus restore the wrong search state. All imaginable solutions were very bad. But now I found a solution that at least not bad. It changes the global value of customizable variables for the time while isearch is active (including the time when isearch is suspended temporarily), and restores the original value afterwards. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=isearch-suspended.patch diff --git a/lisp/comint.el b/lisp/comint.el index a79e34b..8dba317 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1434,14 +1434,14 @@ comint-history-isearch (defun comint-history-isearch-backward () "Search for a string backward in input history using Isearch." (interactive) - (let ((comint-history-isearch t)) - (isearch-backward nil t))) + (setq comint-history-isearch t) + (isearch-backward nil t)) (defun comint-history-isearch-backward-regexp () "Search for a regular expression backward in input history using Isearch." (interactive) - (let ((comint-history-isearch t)) - (isearch-backward-regexp nil t))) + (setq comint-history-isearch t) + (isearch-backward-regexp nil t)) (defvar-local comint-history-isearch-message-overlay nil) @@ -1472,7 +1472,9 @@ comint-history-isearch-end (setq isearch-message-function nil) (setq isearch-wrap-function nil) (setq isearch-push-state-function nil) - (remove-hook 'isearch-mode-end-hook 'comint-history-isearch-end t)) + (remove-hook 'isearch-mode-end-hook 'comint-history-isearch-end t) + (unless isearch-suspended + (custom-reevaluate-setting 'comint-history-isearch))) (defun comint-goto-input (pos) "Put input history item of the absolute history position POS." diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 223b254..55b68a3 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2766,7 +2766,9 @@ dired-isearch-filenames-end "Clean up the Dired file name search after terminating isearch." (define-key isearch-mode-map "\M-sff" nil) (dired-isearch-filenames-mode -1) - (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t)) + (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t) + (unless isearch-suspended + (custom-reevaluate-setting 'dired-isearch-filenames))) (defun dired-isearch-filter-filenames (beg end) "Test whether some part of the current search match is inside a file name. @@ -2779,15 +2781,15 @@ dired-isearch-filter-filenames (defun dired-isearch-filenames () "Search for a string using Isearch only in file names in the Dired buffer." (interactive) - (let ((dired-isearch-filenames t)) - (isearch-forward nil t))) + (setq dired-isearch-filenames t) + (isearch-forward nil t)) ;;;###autoload (defun dired-isearch-filenames-regexp () "Search for a regexp using Isearch only in file names in the Dired buffer." (interactive) - (let ((dired-isearch-filenames t)) - (isearch-forward-regexp nil t))) + (setq dired-isearch-filenames t) + (isearch-forward-regexp nil t)) ;; Functions for searching in tags style among marked files. diff --git a/lisp/isearch.el b/lisp/isearch.el index 3725779..b131437 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1233,6 +1233,8 @@ isearch-new-regexp-function (define-obsolete-variable-alias 'isearch-new-word 'isearch-new-regexp-function "25.1") +(defvar isearch-suspended nil) + (defmacro with-isearch-suspended (&rest body) "Exit Isearch mode, run BODY, and reinvoke the pending search. You can update the global isearch variables by setting new values to @@ -1299,6 +1301,8 @@ with-isearch-suspended isearch-original-minibuffer-message-timeout) old-point old-other-end) + (setq isearch-suspended t) + ;; Actually terminate isearching until editing is done. ;; This is so that the user can do anything without failure, ;; like switch buffers and start another isearch, and return. @@ -1313,6 +1317,8 @@ with-isearch-suspended (unwind-protect (progn ,@body) + (setq isearch-suspended nil) + ;; Always resume isearching by restarting it. (isearch-mode isearch-forward isearch-regexp @@ -1374,6 +1380,7 @@ with-isearch-suspended (message ""))))) (quit ; handle abort-recursive-edit + (setq isearch-suspended nil) (isearch-abort) ;; outside of let to restore outside global values ))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 11:01:06 2018 Received: (at 30187) by debbugs.gnu.org; 21 Jan 2018 16:01:06 +0000 Received: from localhost ([127.0.0.1]:37206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edI3O-0008Ki-Lb for submit@debbugs.gnu.org; Sun, 21 Jan 2018 11:01:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edI3M-0008K8-Eo for 30187@debbugs.gnu.org; Sun, 21 Jan 2018 11:01:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edI3E-0003LW-Bz for 30187@debbugs.gnu.org; Sun, 21 Jan 2018 11:00:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edI3E-0003LO-92; Sun, 21 Jan 2018 11:00:56 -0500 Received: from [176.228.60.248] (port=2136 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1edI3D-0004MH-M3; Sun, 21 Jan 2018 11:00:56 -0500 Date: Sun, 21 Jan 2018 18:00:40 +0200 Message-Id: <83y3krqk0n.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87607wnsnb.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 20 Jan 2018 23:10:16 +0200) Subject: Re: bug#30187: M-e should restore isearch correctly in special modes References: <87607wnsnb.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30187 Cc: 30187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Juri Linkov > Date: Sat, 20 Jan 2018 23:10:16 +0200 > > All imaginable solutions were very bad. But now I found a solution > that at least not bad. It changes the global value of customizable > variables for the time while isearch is active (including the time > when isearch is suspended temporarily), and restores the original value > afterwards. What if the user QUITs out of the search -- will the original value be restored? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 16:47:24 2018 Received: (at 30187) by debbugs.gnu.org; 21 Jan 2018 21:47:24 +0000 Received: from localhost ([127.0.0.1]:37447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edNSW-0001sk-0b for submit@debbugs.gnu.org; Sun, 21 Jan 2018 16:47:24 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:33472 helo=homiemail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edNSU-0001sc-Az for 30187@debbugs.gnu.org; Sun, 21 Jan 2018 16:47:22 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id CC0491C0066; Sun, 21 Jan 2018 13:47:21 -0800 (PST) Received: from localhost.linkov.net (m91-129-108-180.cust.tele2.ee [91.129.108.180]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id 061E01C0065; Sun, 21 Jan 2018 13:47:19 -0800 (PST) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#30187: M-e should restore isearch correctly in special modes Organization: LINKOV.NET References: <87607wnsnb.fsf@mail.linkov.net> <83y3krqk0n.fsf@gnu.org> Date: Sun, 21 Jan 2018 23:23:03 +0200 In-Reply-To: <83y3krqk0n.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 Jan 2018 18:00:40 +0200") Message-ID: <87mv166h54.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30187 Cc: 30187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >> All imaginable solutions were very bad. But now I found a solution >> that at least not bad. It changes the global value of customizable >> variables for the time while isearch is active (including the time >> when isearch is suspended temporarily), and restores the original valu= e >> afterwards. > > What if the user QUITs out of the search -- will the original value be > restored? Yes, the original value is restored thanks to =E2=80=98condition-case=E2=80= =99 with =E2=80=98quit=E2=80=99 in =E2=80=98with-isearch-suspended=E2=80=99 that g= uarantees that =E2=80=98isearch-abort=E2=80=99 is always called. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 22 17:14:52 2018 Received: (at 30187-done) by debbugs.gnu.org; 22 Jan 2018 22:14:52 +0000 Received: from localhost ([127.0.0.1]:38676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edkMe-00010u-8v for submit@debbugs.gnu.org; Mon, 22 Jan 2018 17:14:52 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:34041 helo=homiemail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edkMd-00010n-7T for 30187-done@debbugs.gnu.org; Mon, 22 Jan 2018 17:14:51 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id 7CA1E1C0064; Mon, 22 Jan 2018 14:14:50 -0800 (PST) Received: from localhost.linkov.net (m91-129-108-180.cust.tele2.ee [91.129.108.180]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id A26341C0062; Mon, 22 Jan 2018 14:14:49 -0800 (PST) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#30187: M-e should restore isearch correctly in special modes Organization: LINKOV.NET References: <87607wnsnb.fsf@mail.linkov.net> <83y3krqk0n.fsf@gnu.org> <87mv166h54.fsf@mail.linkov.net> Date: Tue, 23 Jan 2018 00:14:23 +0200 In-Reply-To: <87mv166h54.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 21 Jan 2018 23:23:03 +0200") Message-ID: <87fu6x7d8g.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30187-done Cc: 30187-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >>> All imaginable solutions were very bad. But now I found a solution >>> that at least not bad. It changes the global value of customizable >>> variables for the time while isearch is active (including the time >>> when isearch is suspended temporarily), and restores the original val= ue >>> afterwards. >> >> What if the user QUITs out of the search -- will the original value be >> restored? > > Yes, the original value is restored thanks to =E2=80=98condition-case=E2= =80=99 with > =E2=80=98quit=E2=80=99 in =E2=80=98with-isearch-suspended=E2=80=99 that= guarantees that =E2=80=98isearch-abort=E2=80=99 > is always called. Done. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 17:00:35 2018 Received: (at 30187) by debbugs.gnu.org; 29 Jan 2018 22:00:35 +0000 Received: from localhost ([127.0.0.1]:48315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egHTf-00006F-0r for submit@debbugs.gnu.org; Mon, 29 Jan 2018 17:00:35 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:57674 helo=homiemail-a75.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egHTb-000066-VC for 30187@debbugs.gnu.org; Mon, 29 Jan 2018 17:00:32 -0500 Received: from homiemail-a75.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTP id 7031A5EC07C for <30187@debbugs.gnu.org>; Mon, 29 Jan 2018 14:00:31 -0800 (PST) Received: from localhost.linkov.net (m91-129-109-178.cust.tele2.ee [91.129.109.178]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTPSA id C89625EC072 for <30187@debbugs.gnu.org>; Mon, 29 Jan 2018 14:00:30 -0800 (PST) From: Juri Linkov To: 30187@debbugs.gnu.org Subject: Re: bug#30187: M-e should restore isearch correctly in special modes Organization: LINKOV.NET References: <87607wnsnb.fsf@mail.linkov.net> Date: Mon, 29 Jan 2018 23:57:17 +0200 In-Reply-To: <87607wnsnb.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 20 Jan 2018 23:10:16 +0200") Message-ID: <87a7wwz5tu.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30187 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > There was an old problem that =E2=80=98isearch-edit-string=E2=80=99 inc= orrectly > restored a previous isearch mode in such commands as > =E2=80=98comint-history-isearch-backward=E2=80=99 and =E2=80=98dired-is= earch-filenames=E2=80=99 > because they let-bind variables that affects the search parameters, > e.g. =E2=80=98(let ((dired-isearch-filenames t)))=E2=80=99 only at the = starting > isearch, but when =E2=80=98M-e=E2=80=99 (isearch-edit-string) exits ise= arch, > and later starts again, these let-binding are not in effect > and thus restore the wrong search state. There is another problem with =E2=80=98comint-history-isearch-backward=E2= =80=99: when it is called at the end of an =E2=80=9C*Async Shell Command*=E2=80=9D= buffer it should not activate comint-history isearch, only a normal isearch should be started. I tried different approaches, but only workable solution is to check whether the shell prompt is empty as it is in all =E2=80=9C*Async Shell Command*=E2=80=9D buffers: diff --git a/lisp/comint.el b/lisp/comint.el index 8dba317..b7179e2 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1448,10 +1448,17 @@ comint-history-isearch-message-overlay (defun comint-history-isearch-setup () "Set up a comint for using Isearch to search the input history. Intended to be added to `isearch-mode-hook' in `comint-mode'." - (when (or (eq comint-history-isearch t) - (and (eq comint-history-isearch 'dwim) - ;; Point is at command line. - (comint-after-pmark-p))) + (when (and (get-buffer-process (current-buffer)) + (or (eq comint-history-isearch t) + (and (eq comint-history-isearch 'dwim) + ;; Point is at command line. + (comint-after-pmark-p) + ;; Prompt is not empty like in Async Shell Command buffers + (not (eq (save-excursion + (goto-char (comint-line-beginning-position)) + (forward-line 0) + (point)) + (comint-line-beginning-position)))))) (setq isearch-message-prefix-add "history ") (setq-local isearch-search-fun-function #'comint-history-isearch-search) From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 16:21:33 2018 Received: (at 30187) by debbugs.gnu.org; 7 Feb 2018 21:21:33 +0000 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 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 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) 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) From: Juri Linkov To: Leo Liu Subject: Re: master a710f8a: * lisp/comint.el (comint-history-isearch-setup): Check if process is live. Organization: LINKOV.NET References: <20180206213907.23079.76097@vcs0.savannah.gnu.org> <20180206213908.03CCC208E4@vcs0.savannah.gnu.org> Date: Wed, 07 Feb 2018 23:20:02 +0200 In-Reply-To: (Leo Liu's message of "Wed, 07 Feb 2018 09:19:08 +0800") Message-ID: <87tvush4zh.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30187 Cc: 30187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > 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? From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 22:14:00 2018 Received: (at 30187) by debbugs.gnu.org; 8 Feb 2018 03:14:00 +0000 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 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 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) 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) From: Leo Liu To: Juri Linkov Subject: Re: bug#30187: master a710f8a: * lisp/comint.el (comint-history-isearch-setup): Check if process is live. References: <20180206213907.23079.76097@vcs0.savannah.gnu.org> <20180206213908.03CCC208E4@vcs0.savannah.gnu.org> <87tvush4zh.fsf@mail.linkov.net> 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 Date: Thu, 08 Feb 2018 11:13:46 +0800 In-Reply-To: <87tvush4zh.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 07 Feb 2018 23:20:02 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (macOS 10.12.6) MIME-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30187 Cc: 30187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 16:38:19 2018 Received: (at 30187) by debbugs.gnu.org; 8 Feb 2018 21:38:19 +0000 Received: from localhost ([127.0.0.1]:34356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejttb-0006wo-84 for submit@debbugs.gnu.org; Thu, 08 Feb 2018 16:38:19 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:45723 helo=homiemail-a23.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejttZ-0006wf-Nj for 30187@debbugs.gnu.org; Thu, 08 Feb 2018 16:38:18 -0500 Received: from homiemail-a23.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a23.g.dreamhost.com (Postfix) with ESMTP id 3480D4B0089; Thu, 8 Feb 2018 13:38:17 -0800 (PST) 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 10A8D4B007C; Thu, 8 Feb 2018 13:38:15 -0800 (PST) From: Juri Linkov To: Leo Liu Subject: Re: bug#30187: master a710f8a: * lisp/comint.el (comint-history-isearch-setup): Check if process is live. Organization: LINKOV.NET References: <20180206213907.23079.76097@vcs0.savannah.gnu.org> <20180206213908.03CCC208E4@vcs0.savannah.gnu.org> <87tvush4zh.fsf@mail.linkov.net> Date: Thu, 08 Feb 2018 23:29:03 +0200 In-Reply-To: (Leo Liu's message of "Thu, 08 Feb 2018 11:13:46 +0800") Message-ID: <87vaf7tbkw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30187 Cc: 30187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> 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 = 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? Good idea. The patch at the end of this message also always checks if the prompt is empty at the end of the shell buffer to exclude Async Shell Command buffers and inactive shells. >> Or even when comint-history-isearch is nil by default, run shell =E2=80= =98M-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 activ= e shell. >> 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-inpu= t=E2=80=99 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. Nice, good to know, as these days I completely switched to Elixir. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=comint-after-pmark-p.patch diff --git a/lisp/comint.el b/lisp/comint.el index b4fbfc8..22fbe06 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1448,17 +1448,18 @@ comint-history-isearch-message-overlay (defun comint-history-isearch-setup () "Set up a comint for using Isearch to search the input history. Intended to be added to `isearch-mode-hook' in `comint-mode'." - (when (and (get-buffer-process (current-buffer)) + (when (and + ;; Prompt is not empty like in Async Shell Command buffers + ;; or in inactive shells + (not (eq (save-excursion + (goto-char (comint-line-beginning-position)) + (forward-line 0) + (point)) + (comint-line-beginning-position))) (or (eq comint-history-isearch t) (and (eq comint-history-isearch 'dwim) ;; Point is at command line. - (comint-after-pmark-p) - ;; Prompt is not empty like in Async Shell Command buffers - (not (eq (save-excursion - (goto-char (comint-line-beginning-position)) - (forward-line 0) - (point)) - (comint-line-beginning-position)))))) + (comint-after-pmark-p)))) (setq isearch-message-prefix-add "history ") (setq-local isearch-search-fun-function #'comint-history-isearch-search) @@ -2288,8 +2289,10 @@ comint-skip-prompt (defun comint-after-pmark-p () "Return t if point is after the process output marker." - (let ((pmark (process-mark (get-buffer-process (current-buffer))))) - (<= (marker-position pmark) (point)))) + (let ((process (get-buffer-process (current-buffer)))) + (when process + (let ((pmark (process-mark process))) + (<= (marker-position pmark) (point)))))) (defun comint-simple-send (proc string) "Default function for sending to PROC input STRING. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 21:45:13 2018 Received: (at 30187) by debbugs.gnu.org; 9 Feb 2018 02:45:13 +0000 Received: from localhost ([127.0.0.1]:34540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejygb-0004zD-01 for submit@debbugs.gnu.org; Thu, 08 Feb 2018 21:45:13 -0500 Received: from mail-pl0-f54.google.com ([209.85.160.54]:39045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejygY-0004rB-QO for 30187@debbugs.gnu.org; Thu, 08 Feb 2018 21:45:11 -0500 Received: by mail-pl0-f54.google.com with SMTP id o13so835184pli.6 for <30187@debbugs.gnu.org>; Thu, 08 Feb 2018 18:45:10 -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; bh=XyXKbUtioWvbnvrQzNtRJWqflIrcbRTf8GrKwnXnOjI=; b=TuYPrA8Rm9Qre3UdVSQ4SLRMRUsgWLBMqjwgY/lEjpygHOoJ+pubQYozkNdltjfe5d 7sXzdIo5rM0LXtuXhm535oCA2fXAs+qd+S+4f4+9cUQ223BNjzaajln62KtX/tevXOx/ 6OzB5ZATrAkULg6ozXU3t9hQSKyINVvMnbN+0oOZug7dnq3giW6SwFJ/xyZNPPS69D45 3hv8iGtdDqwD4itl0pKzINBF9WW6Z/rJJz7Zxk3pMcmx1M+JJis6Ym9W110WH/kZ+WaR dzp2UbMw/xRvwy1uX7wsw0IG3EIVDkxTuItW9nrEAcqsBPmT5amJ5vgcm4DzHBGgLQkG w7vA== 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; bh=XyXKbUtioWvbnvrQzNtRJWqflIrcbRTf8GrKwnXnOjI=; b=U0tYBXsMaMIwy+4eU6yUQ66WabCBIoxOC1yVhbP42B8Giium023wa8u8oO3Z/MsbKX RO8AN0JJJk3pwCC35h4LZMNZYvATFEhN4XtKxurZ6q6K7cx3GApp0WTKt6gZku/F03kH g3o78IaDP6EYWf1ViwOL8o/VtNulOPsWNyOSd21Rol37PUaG8G/PYpYHvL6CRAqxZDEY dfJQj2hIFPn1RiNIw71f3qPMDJMhcy3Qj7yab+R/e7GBXop/3vIQ6W6sfB7TiChe6dtO tPmBMbnc/cPEcAKkKR+FxUD03+6jnpwHDxE9auhxBGiYStlwyOMPahHljOlV5BYrNl94 GpYw== X-Gm-Message-State: APf1xPC2eHU/aOAq1zxHWpowF5LW/JtDbLmq8OWeFXNqJLDW5BP9hmPo swPSWO4xhPudm1YX1QQ142zwkA== X-Google-Smtp-Source: AH8x224dCew9i2EX8RHoZdaYEY/Kv+imsJVBahl+00R4VjNqAKEgroUq7HuXx540tRk0nV+JAQymFA== X-Received: by 2002:a17:902:6ac4:: with SMTP id i4-v6mr1090414plt.304.1518144304735; Thu, 08 Feb 2018 18:45:04 -0800 (PST) Received: from Zeuss-MacBook-Air.local ([112.208.17.40]) by smtp.gmail.com with ESMTPSA id p9sm2542049pgs.35.2018.02.08.18.45.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2018 18:45:04 -0800 (PST) From: Leo Liu To: Juri Linkov Subject: Re: bug#30187: master a710f8a: * lisp/comint.el (comint-history-isearch-setup): Check if process is live. References: <20180206213907.23079.76097@vcs0.savannah.gnu.org> <20180206213908.03CCC208E4@vcs0.savannah.gnu.org> <87tvush4zh.fsf@mail.linkov.net> <87vaf7tbkw.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0 nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+ U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs 3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C YII= Date: Fri, 09 Feb 2018 10:45:02 +0800 In-Reply-To: <87vaf7tbkw.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 08 Feb 2018 23:29:03 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (macOS 10.12.6) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30187 Cc: 30187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 2018-02-08 23:29 +0200, Juri Linkov wrote: > Good idea. The patch at the end of this message also always checks > if the prompt is empty at the end of the shell buffer to exclude > Async Shell Command buffers and inactive shells. Thanks for taking this on. The patch looks good. >> 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. > > Nice, good to know, as these days I completely switched to Elixir. Good to know too. The BEAM is underappreciated. Leo From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 16:45:57 2018 Received: (at 30187) by debbugs.gnu.org; 11 Feb 2018 21:45:57 +0000 Received: from localhost ([127.0.0.1]:38676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekzRd-0001od-Mh for submit@debbugs.gnu.org; Sun, 11 Feb 2018 16:45:57 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:42753 helo=homiemail-a100.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekzRb-0001oV-Le for 30187@debbugs.gnu.org; Sun, 11 Feb 2018 16:45:55 -0500 Received: from homiemail-a100.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTP id 2234431A075; Sun, 11 Feb 2018 13:45:55 -0800 (PST) Received: from localhost.linkov.net (m91-129-100-74.cust.tele2.ee [91.129.100.74]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTPSA id 4162B31A070; Sun, 11 Feb 2018 13:45:54 -0800 (PST) From: Juri Linkov To: Leo Liu Subject: Re: bug#30187: master a710f8a: * lisp/comint.el (comint-history-isearch-setup): Check if process is live. Organization: LINKOV.NET References: <20180206213907.23079.76097@vcs0.savannah.gnu.org> <20180206213908.03CCC208E4@vcs0.savannah.gnu.org> <87tvush4zh.fsf@mail.linkov.net> <87vaf7tbkw.fsf@mail.linkov.net> Date: Sun, 11 Feb 2018 23:44:16 +0200 In-Reply-To: (Leo Liu's message of "Fri, 09 Feb 2018 10:45:02 +0800") Message-ID: <87eflrb3rj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30187 Cc: 30187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> Good idea. The patch at the end of this message also always checks >> if the prompt is empty at the end of the shell buffer to exclude >> Async Shell Command buffers and inactive shells. > > Thanks for taking this on. The patch looks good. This is now pushed to master. Thanks for the feedback. From unknown Fri Aug 15 20:52:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 12 Mar 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator