unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: "Geoff Gole" <geoffgole@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Annoying paren match messages in minibuffer
Date: Wed, 14 Jan 2009 01:28:50 +0200	[thread overview]
Message-ID: <87y6xedc47.fsf@jurta.org> (raw)
In-Reply-To: <f5bc73230901120418h76475b06ia84f908aa97b84e7@mail.gmail.com> (Geoff Gole's message of "Mon, 12 Jan 2009 21:18:35 +0900")

>   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?

Please don't disable these notifications in the minibuffer.
They are useful for detecting unbalanced parenthesis while writing
short Lisp snippets or regexps with a lot of grouping constructs
in the minibuffer.

An annoyance like you reported can be eliminated with the following
simple patch:

Index: lisp/simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.966
diff -u -r1.966 simple.el
--- lisp/simple.el	9 Jan 2009 04:44:21 -0000	1.966
+++ lisp/simple.el	13 Jan 2009 23:28:42 -0000
@@ -5229,7 +5229,9 @@
                  ;; a matching-char info, in which case the two CDRs
                  ;; should match.
                  (eq matching-paren (cdr (syntax-after (1- oldpos))))))
-        (message "Mismatched parentheses"))
+	(if (window-minibuffer-p (selected-window))
+	    (minibuffer-message " [Mismatched parentheses]")
+	  (message "Mismatched parentheses")))
        ((not blinkpos)
         (or blink-matching-paren-distance
             ;; Don't complain when `$' with no blinkpos, because it

-- 
Juri Linkov
http://www.jurta.org/emacs/




  parent reply	other threads:[~2009-01-13 23:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 12:18 Annoying paren match messages in minibuffer Geoff Gole
2009-01-12 15:20 ` Stefan Monnier
2009-01-13  2:26   ` Miles Bader
2009-01-13 14:00     ` Stefan Monnier
2009-01-13 15:55     ` Dan Nicolaescu
2009-01-13 18:27       ` Stefan Monnier
2009-01-13 18:33         ` Dan Nicolaescu
2009-01-14 22:15           ` Stefan Monnier
2009-01-14 22:30             ` Drew Adams
2009-01-13 13:58   ` Geoff Gole
2009-01-13 18:25     ` Stefan Monnier
2009-01-13 23:28 ` Juri Linkov [this message]
2009-01-14 13:46   ` Chong Yidong
2009-01-14 14:01     ` Stefan Monnier
2009-01-14 15:29       ` Drew Adams
2009-01-14 21:12         ` Juri Linkov
2009-01-14 21:52           ` Stefan Monnier
2009-01-14 22:22             ` Drew Adams
2009-01-14 23:10               ` Stefan Monnier
2009-01-15  0:52                 ` Drew Adams
2009-01-15  2:41                   ` Stefan Monnier
2009-01-16 19:10                     ` Drew Adams
2009-01-16 20:52                       ` Stefan Monnier
2009-01-16 23:42                         ` Drew Adams
2009-01-17  2:15                           ` Stefan Monnier
2009-01-14 22:13           ` Drew Adams
2009-01-14 21:12       ` Juri Linkov
2009-01-14 21:53         ` Stefan Monnier
2009-01-14 18:56   ` Geoff Gole
2009-01-14 21:14     ` Juri Linkov
2009-01-14 22:20       ` Geoff Gole
  -- strict thread matches above, loose matches on Subject: below --
2009-01-14 23:16 Chetan Pandya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y6xedc47.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=geoffgole@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).