From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: New keybinding suggestion: C-x _ for `shrink-window' Date: Fri, 16 Nov 2007 19:19:32 +0000 Message-ID: <87r6iqvvzv.fsf@bzg.ath.cx> References: <87ejexwf4m.fsf@bzg.ath.cx> <87wssom9qy.fsf@bzg.ath.cx> <876406e0pk.fsf@bzg.ath.cx> <87wsslsk4x.fsf@bzg.ath.cx> <87lk90v34f.fsf@jurta.org> <473B9117.9080004@gmail.com> <874pfnku1a.fsf@jurta.org> <873av6fit2.fsf@bzg.ath.cx> <876402b1gc.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195240797 16431 80.91.229.12 (16 Nov 2007 19:19:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2007 19:19:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 16 20:20:01 2007 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 1It6jQ-00016Y-JY for ged-emacs-devel@m.gmane.org; Fri, 16 Nov 2007 20:20:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1It6jB-00036U-0f for ged-emacs-devel@m.gmane.org; Fri, 16 Nov 2007 14:19:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1It6j6-0002zq-26 for emacs-devel@gnu.org; Fri, 16 Nov 2007 14:19:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1It6j4-0002us-9L for emacs-devel@gnu.org; Fri, 16 Nov 2007 14:19:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1It6j3-0002uL-TG for emacs-devel@gnu.org; Fri, 16 Nov 2007 14:19:38 -0500 Original-Received: from nf-out-0910.google.com ([64.233.182.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1It6j3-0001rg-Fv for emacs-devel@gnu.org; Fri, 16 Nov 2007 14:19:37 -0500 Original-Received: by nf-out-0910.google.com with SMTP id f5so1098778nfh for ; Fri, 16 Nov 2007 11:19:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:received:from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; bh=Ok6XKWmZeUT42hs+ogls6dEQd3QCcH4PNna55iV7YiA=; b=Jz8hUafwUyJPBMVuv7dwCppYnbXsADzbRQoT09m7AWDKI1/5t5Y8fQdxjW2de97L7ziL98sS5bT8ylTrF/g7xW1hJ0HUrwtz6shFWAnhi8KsCBliXIpWT3EiWipNClz6InfbNElbinqACUErlYVIFlNMNyGp46aAjQ9f64CzFmQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; b=uUz5NTYeTQ6nY4lqZWdi5VL3I+8B5RJq99q+nm94XcnDTf0yMUDVIOqTjw4NU0XxyG+sbdZPL0kBVN+zYLNjGtqeynyI+TChMugHu4PaSmIlJwr0Rml6QFlZcG7OKOYk86jd8u5ruAk+CMRzqTFLXEdTpV+Gk6sPftMjR6in/hY= Original-Received: by 10.78.159.7 with SMTP id h7mr2469545hue.1195240774642; Fri, 16 Nov 2007 11:19:34 -0800 (PST) Original-Received: from bzg.ath.cx ( [131.227.122.84]) by mx.google.com with ESMTPS id f8sm3801119nfh.2007.11.16.11.19.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Nov 2007 11:19:33 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 8126F1575BA; Fri, 16 Nov 2007 19:19:32 +0000 (GMT) In-Reply-To: (Stefan Monnier's message of "Fri, 16 Nov 2007 13:17:57 -0500") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:83369 Archived-At: Stefan Monnier writes: >>> I'm not sure what method you use instead, but I see two choices: >>> - use a keymap with high priority. > >> This is what I currently use, with a simple (use-local-map ...) in the >> definition of `window-resize-mode'. > > That's the second lowest priority :-( Okay, I'm using `overriding-terminal-local-map' in 0.2: http://www.cognition.ens.fr/~guerry/u/window-resize.el >> The problem is that when `window-resize-mode' sends an error, the point >> goes in the minibuffer and the active keymap is still the one defined by >> `overriding-terminal-local-map'. This is rather confusing since >> window-resize-mode-map redefines the arrow keys and that these keys >> might be useful in the minibuffer. I don't know how to avoid this. > > I'm not sure I understand the problem (i.e. in which way is this > different with use-local-map). Maybe all you're missing is > `unwind-protect'? AFAIK it's different because `overriding-terminal-local-map' will be used in the minibuffer as well (whether the user is here intentionally or by error doesn't really matter.) I've already protected command from returning errors, but I need to protect self-insert-command as well. >> Another question about keymaps in general: in window-resize-mode the >> buffer is read-only and I'd like to prevent errors to be thrown when the >> user hits a key that should insert itself in another mode. > > isearch uses a default binding: > > (define-key map [t] 'window-resize-other-key) > > check isearch-other-control-char and isearch-other-meta-char. Thanks a lot, I will check this. -- Bastien