From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Perry Newsgroups: gmane.emacs.bugs Subject: bug#21737: Acknowledgement (24.5; Minor feature request: `comint-previous-matching-input-from-input' and point) Date: Fri, 13 Nov 2015 22:30:45 +0000 Message-ID: <3B07598E-834E-4071-8EF2-F32AF4B15164@gmail.com> References: <22057.18203.537000.988338@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1447454620 20733 80.91.229.3 (13 Nov 2015 22:43:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 22:43:40 +0000 (UTC) To: 21737@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 13 23:43:29 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 1ZxN41-000467-U3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Nov 2015 23:43:26 +0100 Original-Received: from localhost ([::1]:55608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxN41-0000R3-DW for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Nov 2015 17:43:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxN3i-0008U9-9V for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2015 17:43:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxN3f-0003S8-3R for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2015 17:43:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxN3e-0003S4-WE for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2015 17:43:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZxN3e-0000oS-Kg for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2015 17:43:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <22057.18203.537000.988338@gargle.gargle.HOWL> Resent-From: Stephen Perry Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Nov 2015 22:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21737-submit@debbugs.gnu.org id=B21737.14474545343071 (code B ref 21737); Fri, 13 Nov 2015 22:43:02 +0000 Original-Received: (at 21737) by debbugs.gnu.org; 13 Nov 2015 22:42:14 +0000 Original-Received: from localhost ([127.0.0.1]:37531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxN2a-0000mm-8J for submit@debbugs.gnu.org; Fri, 13 Nov 2015 17:42:14 -0500 Original-Received: from mail-wm0-f43.google.com ([74.125.82.43]:36279) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxMrp-0000X3-7F for 21737@debbugs.gnu.org; Fri, 13 Nov 2015 17:30:50 -0500 Original-Received: by wmww144 with SMTP id w144so46513463wmw.1 for <21737@debbugs.gnu.org>; Fri, 13 Nov 2015 14:30:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=72zNX6Cj7Zdmm0yyYrkPdgB6jXeEv/LACKHwHGH/NtI=; b=twuMfbDtNxQVcsSwxLwHiSHK/CcQOy1PI+AFPNcON67PKoTMp+K35OVzMdMeyxFlBH vfL8AovJspxpuS+RkqYqTSHTWKI+BFaJKhv2s7+cxMi6yKNSPMsTad93dUSIIFn4gbkG W0FWcHywY8dymTLO6yNC27c8dZNywdoHU6sBjX3vXGs8vWQm/EIxw2oWthL0cn7YWJ2s kHr1Omw89lMR/T9mJyPkJBqnBVTtHmEBRdTPizpMhBSxRmx2olhpnyN3x8v2OWjZa9+m Xp1RIE0PRgVVtJs7abQ5M8YgLInY2HveseZGJqMqXxI/JuvuAEt5sHcttQXhVkYGRe1Q sYEw== X-Received: by 10.194.119.162 with SMTP id kv2mr24414368wjb.62.1447453848552; Fri, 13 Nov 2015 14:30:48 -0800 (PST) Original-Received: from stephens-mbp.cable.virginmedia.net (cpc4-papw5-2-0-cust294.5-3.cable.virginm.net. [81.102.145.39]) by smtp.gmail.com with ESMTPSA id pc2sm21852850wjb.11.2015.11.13.14.30.46 for <21737@debbugs.gnu.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Nov 2015 14:30:46 -0800 (PST) X-Mailer: Apple Mail (2.3096.5) X-Mailman-Approved-At: Fri, 13 Nov 2015 17:41:54 -0500 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: 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108733 Archived-At: How about this for a patch? It=E2=80=99s my first so be kind :-) diff --git a/lisp/comint.el b/lisp/comint.el index e70fe88..8d61226 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -283,6 +283,14 @@ comint-move-point-for-output (const others)) :group 'comint) =20 +(defcustom comint-move-point-to-end-on-match nil + "Controls whether point moves to the end of the matched input. +If nil, then point remains in the current position. +If t, point moves to the end of matched input." + :type '(choice (const :tag "off" nil) + (const t)) + :group 'comint) + (defvaralias 'comint-scroll-to-bottom-on-output = 'comint-move-point-for-output) =20 (defcustom comint-scroll-show-maximum-output t @@ -1220,7 +1228,8 @@ comint-previous-matching-input-from-input (comint-previous-matching-input (concat "^" (regexp-quote = comint-matching-input-from-input-string)) n) - (goto-char opoint))) + (unless comint-move-point-to-end-on-match + (goto-char opoint)))) =20 (defun comint-next-matching-input-from-input (n) "Search forwards through input history for match for current input.