From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Geoff Gole" Newsgroups: gmane.emacs.devel Subject: Annoying paren match messages in minibuffer Date: Mon, 12 Jan 2009 21:18:35 +0900 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1231767796 8962 80.91.229.12 (12 Jan 2009 13:43:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2009 13:43:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 12 14:44:26 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LMN5c-0001HE-Bb for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2009 14:44:26 +0100 Original-Received: from localhost ([127.0.0.1]:35274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMN4M-0008AG-5E for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2009 08:43:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LMLkd-0003vF-Hc for emacs-devel@gnu.org; Mon, 12 Jan 2009 07:18:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LMLkc-0003uw-T7 for emacs-devel@gnu.org; Mon, 12 Jan 2009 07:18:39 -0500 Original-Received: from [199.232.76.173] (port=42867 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMLkc-0003ur-OZ for emacs-devel@gnu.org; Mon, 12 Jan 2009 07:18:38 -0500 Original-Received: from wa-out-1112.google.com ([209.85.146.180]:55625) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LMLkc-0008P8-8r for emacs-devel@gnu.org; Mon, 12 Jan 2009 07:18:38 -0500 Original-Received: by wa-out-1112.google.com with SMTP id j32so6083852waf.26 for ; Mon, 12 Jan 2009 04:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=/03aCSpBGzTT5JWYUwh9PhB8UpueYte9PSVWa/VRVhk=; b=QqIDT373e5jhYA3sSsyCt6a4aiERRxld4etkUvo0PI+NfWjIeK2rY87pbc71+BBdPx MKgTVyfRzwGVHhy/tFvPjw/3LsX6RpnKI4WcugCKueLPE01D1XEYn6kFuUdjGPrqKgwh VpvdWKaqs1BmIrGat/Zsbf8UGAMzT3ewKBS3o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=rRKXLN02jhUrIpiG/OOxpxOLrbtrFhsIln/THOEyhqpWZ2utnVTyd6MQLk6LsGZWVU wGzTJsk2WoUzFJPTjlEeRcEYpkXv+JgWczmWkYYmpl5EcfNPh2Nq+eywm2TcDrmJ1+G3 7/X61binLEjVqst8w0GFsP/xJxDqXOR5B3JDA= Original-Received: by 10.115.91.2 with SMTP id t2mr18999781wal.224.1231762715674; Mon, 12 Jan 2009 04:18:35 -0800 (PST) Original-Received: by 10.114.113.19 with HTTP; Mon, 12 Jan 2009 04:18:35 -0800 (PST) Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 12 Jan 2009 08:42:18 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107802 Archived-At: By default, emacs will display a minibuffer message on seeing the user type an unmatched paren. This is usually a welcome feature, but can become annoying when point is in the minibuffer where well-formed input is not necessarily balanced. For example: emacs -Q M-% ) This is perfectly sensible input for replace-string, so seeing the nag message (and have it momentarily displace the minibuffer display) is irritating. I know that this is not a big deal as any further input will immediately dismiss the message, but I'd think it would be better not to show it in the first place. Perhaps paren matching should be inhibited for minibuffer input that need not be balanced? I attempted to implement this by binding blink-matching-paren and show-paren-mode. Unfortunately that continues to inhibit paren matching if the user moves out of the minibuffer, so is not satisfactory. The example patch below does this for query-replace. Thoughts? --- emacs/lisp/replace.el 2009-01-09 14:01:00.000000000 +0900 +++ /tmp/buffer-content-17773Bqy 2009-01-12 20:33:21.000000000 +0900 @@ -225,12 +225,14 @@ To customize possible responses, change the \"bindings\" in `query-replace-map'." (interactive - (let ((common - (query-replace-read-args - (concat "Query replace" - (if current-prefix-arg " word" "") - (if (and transient-mark-mode mark-active) " in region" "")) - nil))) + (let* (blink-matching-paren + show-paren-mode + (common + (query-replace-read-args + (concat "Query replace" + (if current-prefix-arg " word" "") + (if (and transient-mark-mode mark-active) " in region" "")) + nil))) (list (nth 0 common) (nth 1 common) (nth 2 common) ;; These are done separately here ;; so that command-history will record these expressions