From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Tim Daly Jr." Newsgroups: gmane.emacs.bugs Subject: bug#13223: patch to fix this bug Date: Sun, 28 Apr 2013 15:27:40 -0700 Message-ID: <96A9F7F8-2C61-422F-A18E-9C95511F260F@tenkan.org> References: <58A8252B-C006-4216-97FD-3D2933D35282@tenkan.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: multipart/mixed; boundary=Apple-Mail-4-186320145 X-Trace: ger.gmane.org 1367188072 24187 80.91.229.3 (28 Apr 2013 22:27:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Apr 2013 22:27:52 +0000 (UTC) To: 13223@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 29 00:27:56 2013 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 1UWa4a-0008G5-71 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Apr 2013 00:27:56 +0200 Original-Received: from localhost ([::1]:44795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWa4Z-0004ns-Qe for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Apr 2013 18:27:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWa4V-0004nj-Gb for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2013 18:27:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWa4S-00013F-Tv for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2013 18:27:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWa4S-00013B-QE for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2013 18:27:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UWa4g-0007MC-Cp for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2013 18:28:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <58A8252B-C006-4216-97FD-3D2933D35282@tenkan.org> Resent-From: "Tim Daly Jr." Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Apr 2013 22:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13223 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13223-submit@debbugs.gnu.org id=B13223.136718808028268 (code B ref 13223); Sun, 28 Apr 2013 22:28:02 +0000 Original-Received: (at 13223) by debbugs.gnu.org; 28 Apr 2013 22:28:00 +0000 Original-Received: from localhost ([127.0.0.1]:49004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWa4e-0007Lr-Bo for submit@debbugs.gnu.org; Sun, 28 Apr 2013 18:28:00 -0400 Original-Received: from tenkan.org ([216.114.78.229]:43909) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWa4c-0007Lj-MN for 13223@debbugs.gnu.org; Sun, 28 Apr 2013 18:27:59 -0400 Original-Received: from [10.0.0.253] (c-24-5-122-5.hsd1.ca.comcast.net [24.5.122.5]) by tenkan.org (Postfix) with ESMTPSA id E1B17257A0A0 for <13223@debbugs.gnu.org>; Sun, 28 Apr 2013 22:27:42 +0000 (UTC) X-Mailer: Apple Mail (2.1085) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:73808 Archived-At: --Apple-Mail-4-186320145 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii This patch keeps emacs from printing the history messages when = performing a history search in a comint buffer. (For example, M-x shell = RET M-r o). Changelog: 2013-04-28 Tim Daly Jr. * comint.el (comint-history-isearch-in-progress): new variable that lets us detect that an isearch is running over command history (comint-previous-matching-input): don't print "History item: N" messages when called as part of an isearch over history, because it's too slow and spammy. (comint-history-isearch-setup, comint-history-isearch-end): = toggle comint-history-isearch-in-progress to indicate search start and stop Patch: --Apple-Mail-4-186320145 Content-Disposition: attachment; filename=skip-isearch-history-msgs.patch Content-Type: application/octet-stream; name="skip-isearch-history-msgs.patch" Content-Transfer-Encoding: 7bit === modified file 'ChangeLog' *** ChangeLog 2013-04-27 19:30:33 +0000 --- ChangeLog 2013-04-28 22:22:55 +0000 *************** *** 1,3 **** --- 1,15 ---- + 2013-04-28 Tim Daly Jr. + + * comint.el (comint-history-isearch-in-progress): new variable + that lets us detect that an isearch is running over command + history + (comint-previous-matching-input): don't print "History item: N" + messages when called as part of an isearch over history, because + it's too slow and spammy. + (comint-history-isearch-setup, comint-history-isearch-end): toggle + comint-history-isearch-in-progress to indicate search start and + stop + 2013-04-27 Paul Eggert Merge from gnulib, incorporating: === modified file 'lisp/comint.el' *** lisp/comint.el 2013-04-21 03:13:04 +0000 --- lisp/comint.el 2013-04-28 22:01:31 +0000 *************** Moves relative to START, or `comint-inpu *** 1175,1180 **** --- 1175,1183 ---- (process-mark (get-buffer-process (current-buffer)))) (point-max))) + (defvar comint-history-isearch-in-progress nil + "Indicates that a comint history search is currently running.") + (defun comint-previous-matching-input (regexp n) "Search backwards through input history for match for REGEXP. \(Previous history elements are earlier commands.) *************** If N is negative, find the next or Nth n *** 1191,1197 **** (setq comint-stored-incomplete-input (funcall comint-get-old-input))) (setq comint-input-ring-index pos) ! (message "History item: %d" (1+ pos)) (comint-delete-input) (insert (ring-ref comint-input-ring pos))))) --- 1194,1201 ---- (setq comint-stored-incomplete-input (funcall comint-get-old-input))) (setq comint-input-ring-index pos) ! (unless comint-history-isearch-in-progress ! (message "History item: %d" (1+ pos))) (comint-delete-input) (insert (ring-ref comint-input-ring pos))))) *************** Intended to be added to `isearch-mode-ho *** 1433,1439 **** 'comint-history-isearch-wrap) (set (make-local-variable 'isearch-push-state-function) 'comint-history-isearch-push-state) ! (add-hook 'isearch-mode-end-hook 'comint-history-isearch-end nil t))) (defun comint-history-isearch-end () "Clean up the comint after terminating Isearch in comint." --- 1437,1444 ---- 'comint-history-isearch-wrap) (set (make-local-variable 'isearch-push-state-function) 'comint-history-isearch-push-state) ! (add-hook 'isearch-mode-end-hook 'comint-history-isearch-end nil t) ! (setq comint-history-isearch-in-progress t))) (defun comint-history-isearch-end () "Clean up the comint after terminating Isearch in comint." *************** Intended to be added to `isearch-mode-ho *** 1444,1450 **** (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)) (defun comint-goto-input (pos) "Put input history item of the absolute history position POS." --- 1449,1456 ---- (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) ! (setq comint-history-isearch-in-progress nil)) (defun comint-goto-input (pos) "Put input history item of the absolute history position POS." --Apple-Mail-4-186320145--