GNU bug report logs - #30187
M-e should restore isearch correctly in special modes

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sat, 20 Jan 2018 21:40:03 UTC

Severity: normal

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 30187 <at> debbugs.gnu.org
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
> 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 ‘dwim’
and type ‘C-r’ 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()
  ...

Or even when comint-history-isearch is nil by default, run shell ‘M-x shell’,
then exit it, and after “Process shell finished” type ‘M-r’ 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 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 ‘comint-goto-input’ like
in the backtrace above?




This bug report was last modified 7 years and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.