From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs Subject: bug#19710: 24.4.51; Isearch is broken in comints which relly on regexp Date: Wed, 18 Feb 2015 20:18:25 +0200 Message-ID: <87zj8bjd72.fsf@gmail.com> References: <87oapjmfth.fsf@gmail.com> <874mrawgcu.fsf@mail.linkov.net> <87oapi6m3v.fsf@gmail.com> <87vbjhdvas.fsf@mail.linkov.net> <877fvwvfnm.fsf@gmail.com> <87pp9ipplf.fsf@mail.linkov.net> <878ufvkyd9.fsf@gmail.com> <874mqjfa3n.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424283562 23944 80.91.229.3 (18 Feb 2015 18:19:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Feb 2015 18:19:22 +0000 (UTC) Cc: 19710@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 18 19:19:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YO9DL-0008PN-Qm for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Feb 2015 19:19:11 +0100 Original-Received: from localhost ([::1]:52165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO9DL-0007M1-1E for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Feb 2015 13:19:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO9DG-0007Jv-B3 for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 13:19:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YO9DC-000496-Re for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 13:19:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO9DC-000490-O1 for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 13:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YO9DB-0004yf-Vp for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 13:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vitalie Spinu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Feb 2015 18:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19710 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19710-submit@debbugs.gnu.org id=B19710.142428351019091 (code B ref 19710); Wed, 18 Feb 2015 18:19:01 +0000 Original-Received: (at 19710) by debbugs.gnu.org; 18 Feb 2015 18:18:30 +0000 Original-Received: from localhost ([127.0.0.1]:47986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YO9Cg-0004xo-2G for submit@debbugs.gnu.org; Wed, 18 Feb 2015 13:18:30 -0500 Original-Received: from mail-we0-f172.google.com ([74.125.82.172]:46202) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YO9Ce-0004xg-A5 for 19710@debbugs.gnu.org; Wed, 18 Feb 2015 13:18:28 -0500 Original-Received: by wevm14 with SMTP id m14so2742142wev.13 for <19710@debbugs.gnu.org>; Wed, 18 Feb 2015 10:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=dClY6K9RmQmJ5PM6/Bp7zh7+j8OvnphMFF7NMgtVH44=; b=ToZRewUzzTC4rtzVBoBvL8vFUOKRDAe8yg/IIRnQLyCM9y+MKyA9BdTCD4Ts465L4N yroHBRLfL0W1Wa+b+SM2fRs6s6U+Y7z7i0pjp3fiq3R6v+WOyyiEYmCaMkUECrxgZNGL PuN2iURAdxw007kqu1gJrhrmHMQ4VdSETTTmC/mLmHdQrgjjoawq3jtebmYRQ+t83e6Y 9lTAM88V30ChNYeM2me4Q6u2cJ6dGeZTWGBKE2XYwuy4mkPHAsgicEGdEKkEnvD1Gqo5 pxfDaqpNW19W8l0UPLrJmfAHWLLH9BzRe+/pZKUbl9+Vo+p/Nus0wL4dGkxdQEUIopF3 +PRQ== X-Received: by 10.194.171.136 with SMTP id au8mr1386486wjc.6.1424283507693; Wed, 18 Feb 2015 10:18:27 -0800 (PST) Original-Received: from localhost (host-static-86-106-238-197.moldtelecom.md. [86.106.238.197]) by mx.google.com with ESMTPSA id n1sm26554990wib.11.2015.02.18.10.18.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 10:18:26 -0800 (PST) In-Reply-To: <874mqjfa3n.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 18 Feb 2015 19:01:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99550 Archived-At: Works. Thanks! >>> Juri Linkov on Wed, 18 Feb 2015 19:01:52 +0200 wrote: >> Relatedly, comint-bol inside multiline output regions is broken. >> >> In shell buffer: >> >> $ locate pwd >> >> then go to a previous line and M-x comint-bol. It will jump all the way >> back to comint-prompt-regexp. > The following patch for the emacs-24 branch should fix this regression. > It distinguishes two cases: when point is on the output or input > depending on the field property, for the case of comint-use-prompt-regexp=nil. > This means that we can't support multi-line commands for the case > when comint-use-prompt-regexp=t because it doesn't use fields, thus > there is no way to distinguish input from output. > So for comint-use-prompt-regexp=t `M-x comint-bol' will work > as in the previous release, but `M-x comint-bol' will be > fixed for comint-use-prompt-regexp=nil: > diff --git a/lisp/comint.el b/lisp/comint.el > index c81551a..2532dd7 100644 > --- a/lisp/comint.el > +++ b/lisp/comint.el > @@ -2267,8 +2267,6 @@ (defun comint-line-beginning-position () > ;; Use comint-prompt-regexp > (save-excursion > (beginning-of-line) > - (unless (looking-at comint-prompt-regexp) > - (re-search-backward comint-prompt-regexp nil t)) > (comint-skip-prompt) > (point)) > ;; Use input fields. Note that, unlike the behavior of > @@ -2278,7 +2276,10 @@ (defun comint-line-beginning-position () > ;; if there are two fields on a line, then the first one is the > ;; prompt, and the second one is an input field, and is front-sticky > ;; (as input fields should be). > - (constrain-to-field (field-beginning) (line-end-position)))) > + (constrain-to-field (if (eq (field-at-pos (point)) 'output) > + (line-beginning-position) > + (field-beginning)) > + (line-end-position)))) > (defun comint-bol (&optional arg) > "Go to the beginning of line, then skip past the prompt, if any.