From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 18 10:18:39 2011 Received: (at submit) by debbugs.gnu.org; 18 Mar 2011 14:18:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0aVi-0000Rm-8A for submit@debbugs.gnu.org; Fri, 18 Mar 2011 10:18:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0aVg-0000Rb-Aa for submit@debbugs.gnu.org; Fri, 18 Mar 2011 10:18:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0aVa-0002Kh-1i for submit@debbugs.gnu.org; Fri, 18 Mar 2011 10:18:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:52517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0aVZ-0002I2-JR for submit@debbugs.gnu.org; Fri, 18 Mar 2011 10:18:30 -0400 Received: from [140.186.70.92] (port=43058 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0aVI-0006Xw-Hh for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2011 10:18:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0aVC-0002GB-8r for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2011 10:18:07 -0400 Received: from prometheus.naquadah.org ([212.85.154.174]:45581 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0aVC-0002Fq-4H for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2011 10:18:06 -0400 Received: by mx1.naquadah.org (Postfix, from userid 8) id 4AEF35C0E7; Fri, 18 Mar 2011 15:18:04 +0100 (CET) Received: from cigue.easter-eggs.fr (coquelicot-s.easter-eggs.com [213.215.37.94]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id 69A905C0D7 for ; Fri, 18 Mar 2011 15:18:02 +0100 (CET) From: Julien Danjou To: bug-gnu-emacs@gnu.org Subject: 24.0.50; M-q badly bound in diff-mode Date: Fri, 18 Mar 2011 15:18:01 +0100 Message-ID: User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.2 (-----) Hi there, The `diff-mode' keymap `diff-mode-shared-map' inherit from `special-mode-map' which defines M-q as `quit-window'. This is *very* annoying when editing diff file build with git-format-patch. I sometimes add some text/comments in it, and press M-q to run `fill-paragraph'. But this calls `quit-window' and pisses me off. I don't know what is the best way to fix this, therefore I'm not including any patch in this report, but would do it if possible. :-) --=20 Julien Danjou =E2=9D=B1 http://julien.danjou.info From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 18 13:06:47 2011 Received: (at control) by debbugs.gnu.org; 18 Mar 2011 17:06:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0d8Q-00047f-Tf for submit@debbugs.gnu.org; Fri, 18 Mar 2011 13:06:47 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0d8P-00047T-JU for control@debbugs.gnu.org; Fri, 18 Mar 2011 13:06:45 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Q0d8K-0008AQ-5d for control@debbugs.gnu.org; Fri, 18 Mar 2011 13:06:40 -0400 Date: Fri, 18 Mar 2011 13:06:40 -0400 Message-Id: Subject: control message for bug 8284 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) forcemerge 2919 8284 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 18 15:19:30 2011 Received: (at 8284) by debbugs.gnu.org; 18 Mar 2011 19:19:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0fCr-0007pi-1h for submit@debbugs.gnu.org; Fri, 18 Mar 2011 15:19:29 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0fCp-0007pV-CF for 8284@debbugs.gnu.org; Fri, 18 Mar 2011 15:19:27 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p2IJJJKB002990; Fri, 18 Mar 2011 15:19:20 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id ACA26130010; Fri, 18 Mar 2011 15:19:19 -0400 (EDT) From: Stefan Monnier To: Julien Danjou Subject: Re: bug#8284: 24.0.50; M-q badly bound in diff-mode Message-ID: References: Date: Fri, 18 Mar 2011 15:19:19 -0400 In-Reply-To: (Julien Danjou's message of "Fri, 18 Mar 2011 15:18:01 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3800=0 X-NAI-Spam-Version: 2.2.0.9286 : core <3800> : streams <609962> : uri <830195> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 8284 Cc: 8284@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > The `diff-mode' keymap `diff-mode-shared-map' inherit from > `special-mode-map' which defines M-q as `quit-window'. > This is *very* annoying when editing diff file build with > git-format-patch. I sometimes add some text/comments in it, and press > M-q to run `fill-paragraph'. But this calls `quit-window' and pisses > me off. > I don't know what is the best way to fix this, therefore I'm not > including any patch in this report, but would do it if possible. :-) When editing the buffer, diff-mode should not be considered as a special-mode. But I see that what you write is not quite what happens: M-q is not inherited from special-mode-map, it's that `q' is inherited from special-mode-map into diff-mode-shared-map which is bound to ESC, thus giving us a binding for M-q. So I think that diff-mode-map should shadow diff-mode-shared-map's q binding. I think the patch below does it. Stefan === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2011-03-14 03:40:18 +0000 +++ lisp/vc/diff-mode.el 2011-03-18 19:18:38 +0000 @@ -122,8 +122,7 @@ ("\C-m" . diff-goto-source) ([mouse-2] . diff-goto-source) ;; From XEmacs' diff-mode. - ;; Standard M-w is useful, so don't change M-W. - ;;("W" . widen) + ("W" . widen) ;;("." . diff-goto-source) ;display-buffer ;;("f" . diff-goto-source) ;find-file ("o" . diff-goto-source) ;other-window @@ -135,17 +134,21 @@ ;; Not useful if you have to metafy them. ;;(" " . scroll-up) ;;("\177" . scroll-down) - ;; Standard M-a is useful, so don't change M-A. - ;;("A" . diff-ediff-patch) - ;; Standard M-r is useful, so don't change M-r or M-R. - ;;("r" . diff-restrict-view) - ;;("R" . diff-reverse-direction) - ) + ("A" . diff-ediff-patch) + ("r" . diff-restrict-view) + ("R" . diff-reverse-direction)) "Basic keymap for `diff-mode', bound to various prefix keys." :inherit special-mode-map) (easy-mmode-defmap diff-mode-map - `(("\e" . ,diff-mode-shared-map) + `(("\e" . ,(let ((map (make-sparse-keymap))) + ;; We want to inherit most bindings from diff-mode-shared-map, + ;; but not all since they may hide useful M- global + ;; bindings when editing. + (set-keymap-parent map diff-mode-shared-map) + (dolist (key '("A" "r" "R" "g" "q" "W")) + (define-key map key nil)) + map)) ;; From compilation-minor-mode. ("\C-c\C-c" . diff-goto-source) ;; By analogy with the global C-x 4 a binding. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 18 15:53:04 2011 Received: (at 8284-done) by debbugs.gnu.org; 18 Mar 2011 19:53:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0fjL-00007I-I7 for submit@debbugs.gnu.org; Fri, 18 Mar 2011 15:53:03 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0fjJ-00006o-Fz for 8284-done@debbugs.gnu.org; Fri, 18 Mar 2011 15:53:01 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p2IJrxDm014153; Fri, 18 Mar 2011 15:53:59 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 839A4B4095; Fri, 18 Mar 2011 15:52:54 -0400 (EDT) From: Stefan Monnier To: Julien Danjou Subject: Re: bug#8284: 24.0.50; M-q badly bound in diff-mode Message-ID: References: Date: Fri, 18 Mar 2011 15:52:54 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 18 Mar 2011 15:19:19 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3800=0 X-NAI-Spam-Version: 2.2.0.9286 : core <3800> : streams <609973> : uri <830195> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 8284-done Cc: 8284-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > q binding. I think the patch below does it. It appears to fix it, indeed. Installed, Stefan From unknown Mon Aug 18 19:35:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 16 Apr 2011 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator