From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 11 12:05:06 2012 Received: (at submit) by debbugs.gnu.org; 11 Apr 2012 16:05:06 +0000 Received: from localhost ([127.0.0.1]:52295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SI02b-0001SY-R2 for submit@debbugs.gnu.org; Wed, 11 Apr 2012 12:05:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38026) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHuCF-0001gh-Vb for submit@debbugs.gnu.org; Wed, 11 Apr 2012 05:50:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHuB5-00024q-Iu for submit@debbugs.gnu.org; Wed, 11 Apr 2012 05:49:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:36369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHuB5-00024m-Fd for submit@debbugs.gnu.org; Wed, 11 Apr 2012 05:49:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHuB0-0002UD-KV for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 05:49:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHuAv-0001z6-7R for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 05:49:22 -0400 Received: from sandstorm.ocf.berkeley.edu ([128.32.129.218]:49586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHuAu-0001ri-UY for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 05:49:17 -0400 Received: from tsunami.ocf.berkeley.edu (tsunami.OCF.Berkeley.EDU [128.32.129.223]) by sandstorm.ocf.berkeley.edu (Postfix) with ESMTP id B457040392 for ; Wed, 11 Apr 2012 02:49:06 -0700 (PDT) Received: by tsunami.ocf.berkeley.edu (Postfix, from userid 19319) id 6617F20038; Wed, 11 Apr 2012 02:49:06 -0700 (PDT) From: Wesley Dawson To: bug-gnu-emacs@gnu.org Subject: 23.2; `comint-history-isearch' with value 'dwim causes error when comint process is finished Date: Wed, 11 Apr 2012 02:49:06 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: clamav-milter 0.97.3 at sandstorm X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 11 Apr 2012 12:05:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Setting `comint-history-isearch' to 'dwim causes comint buffers where the process has exited to give the following error: (comint-after-pmark-p: Wrong type argument: processp, nil) isearch works as expected after the message, however. Following is a fix to `comint-after-pmark-p', which makes it simply return nil if the process has already ended: (defun comint-after-pmark-p () "Return t if point is after the process output marker. Return nil if the process has ended." (let* ((process (get-buffer-process (current-buffer))) (pmark (and process (process-mark process)))) (and pmark (<= (marker-position pmark) (point))))) It seems it is currently impossible to recover the input history once the process exits, so I believe this is the sensible thing to do. In addition, `async-shell-command' is often used to execute arbitrary long-running processes that don't require input but that you don't want to hang emacs, and so an input history won't even be available in those cases. Recipe for emacs -Q: (setq comint-history-isearch 'dwim) C-j M-x async-shell-command : RET C-x o C-s (comint-after-pmark-p: Wrong type argument: processp, nil) In GNU Emacs 23.2.1 (i486-pc-linux-gnu) of 2010-12-11 on raven, modified by Debian configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=no' '--without-gconf' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Shell Minor modes in effect: shell-dirtrack-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ESC [ > 0 ; 2 7 7 ; 0 c ESC ] 1 1 ; r g b : a 5 a 5 / 2 a 2 a / 2 a 2 a ESC \ ( s e t q SPC c o m i n t - h i s t o r y - i s e a r c h SPC ' d w i m ) C-j ESC & : RET C-x o C-s ESC x r e p o r t - e m a c s - b u g RET Recent messages: ("emacs") For information about GNU Emacs and the GNU system, type C-h C-a. :: finished. comint-after-pmark-p: Wrong type argument: processp, nil Load-path shadows: /usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug shell comint ring ediff-hook vc-hooks lisp-float-type lisp-mode register page menu-bar rfn-eshadow timer select mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 28 18:44:19 2018 Received: (at control) by debbugs.gnu.org; 28 Aug 2018 22:44:19 +0000 Received: from localhost ([127.0.0.1]:36128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fumih-0006po-B7 for submit@debbugs.gnu.org; Tue, 28 Aug 2018 18:44:19 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:39255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fumig-0006pY-32; Tue, 28 Aug 2018 18:44:18 -0400 Received: by mail-it0-f51.google.com with SMTP id h1-v6so2736894itj.4; Tue, 28 Aug 2018 15:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=FdPFf3EpJYeEUShJmYI0IP1EG2PfkyeQuSazSQkduY0=; b=gMTrsJ3vbmocXmolHx9377io1PkI9q6KL/wJNcPFCSlBogDFTSeHF5RxA62zJU1Amw PmG75GfeUUFvmAOsgzAG9PNyIqGDl6/Oa8GrAAWBey3dWivO/AFLTpodZrlBPRKxOzSB zHq6cAsSyfumq/+WN/GvG86SbTjGOAkcdNZUvERrbP2hWsPKqa5U9oUte4hOanMY9+q8 7W0YNzw5Yx3qsbgjoEgJzgZhOYU9IsV7Cr3jEaMWXR1b+SvTNfzZAacbLmruT2Ngqfbq xz9wdgbNTNsOCBMv1s8M8eWmeeyjEsjJj4a/Ewdw6mAsezfahP1GBBJxinrzWoWIDhYj jmow== 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:date:in-reply-to :message-id:user-agent:mime-version; bh=FdPFf3EpJYeEUShJmYI0IP1EG2PfkyeQuSazSQkduY0=; b=U85pVbGZgYgHpEgjRBPDE63sxYOxu6VZerTAOqG9UMA3oJk+MyGS3u4S2iWKcM5l89 O9lHuF0Ba/xp9R1ItJCvfaH02XTQfLQrwVuuZymaiC6RhiKwtExBg4tLTNtctz9LgW64 KBE5WJazRPQsj8R8A5kMXMCEV8RQAF5ddgLFM+JQa1E4n304ckMmKPkwulinqnJuSgNo Kqwrrp9m2iA/yGPo5X3NiIjk1ogCYLOm+Ehia8aYX0JrsvwXAMIZovIim3BO8L/tT6xt cRVs57fgXnNbsl/KzrApKMfQ5VitLNZvL+K9eKnOmPOuMAXrdILfYQfrYwgModTEta6f 6SGQ== X-Gm-Message-State: APzg51BHs9kxQIyghI5X/MAWy/4P8Hedg2IUFr5cjHNy4eYGN5h6l/0k gMudJ5lRnEne6qPc9pU1cwiP6k5q X-Google-Smtp-Source: ANB0VdadVuUx5t5elza12L7lhghsCvKVfljFooCTK2ZthLz6wIXMkwSslhBn5DJQPe1VQMk+AROQvw== X-Received: by 2002:a02:93a2:: with SMTP id z31-v6mr3268462jah.93.1535496252385; Tue, 28 Aug 2018 15:44:12 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id d65-v6sm1150841iof.46.2018.08.28.15.44.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Aug 2018 15:44:11 -0700 (PDT) From: Noam Postavsky To: Live System User Subject: Re: bug#32555: 26.1; Async command buffer navigation bug References: <87bm9myjys.fsf@aol.com> <87lg8qu129.fsf@gmail.com> <87r2iiz1ax.fsf@aol.com> Date: Tue, 28 Aug 2018 18:44:10 -0400 In-Reply-To: <87r2iiz1ax.fsf@aol.com> (Live System User's message of "Tue, 28 Aug 2018 16:25:10 -0400") Message-ID: <87ftyyt8lh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 32555@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: -1.0 (-) tags 32555 = fixed merge 32555 11224 close 32555 27.1 quit Live System User writes: > (add-hook 'shell-mode-hook > (local-set-key [up] ; cycle backward through command history > '(lambda () (interactive) > (if (comint-after-pmark-p) > (comint-previous-input 1) > (previous-line 1)))) > I've never had issues with this code before. That seems surprising since this problem is only fixed on the master branch since February. [1: aaeb101d89]: 2018-02-10 23:46:13 +0200 * lisp/comint.el (comint-after-pmark-p): Check if buffer has a live process. https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=aaeb101d899a09e18630466c348041a172cd5d91 From unknown Thu Aug 21 12:12:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 27 Sep 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