Subject: bug#2919: closed (Re: bug#8284: 24.0.50; M-q badly bound in diff-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 18 Mar 2011 19:54:02 +0000

Your bug report

#8284: 23.0.91; diff-mode redefines M-q to some harmfull command

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
8284: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8284
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#8284: 24.0.50; M-q badly bound in diff-mode
From: Stefan Monnier <[email-masked]>
To: Julien Danjou <[email-masked]>
Cc: [email-masked]
Date: Fri, 18 Mar 2011 15:52:54 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> q binding.  I think the patch below does it.

It appears to fix it, indeed.  Installed,

        Stefan

Subject: 23.0.91; diff-mode redefines M-q to some harmfull command
From: Matthieu Moy <[email-masked]>
To: [email-masked]
Date: Tue, 07 Apr 2009 14:57:54 +0200

Hi,

Emacs's diff-mode redefines M-q, which I normally use for
fill-paragraph (the standard binding), since:

  revision 1.54
  date: 2004-02-02 22:08:37 +0100;  author: uid69204;  state: Exp;  lines: +2 -1;
  Bind q to `quit-window'.

I often use diff-mode to edit patches, (created by Git with git
send-email --anotate) and add comments to them before I send them by
email, and therefore fill my paragraphs (like in any other emails).
Having M-q rebound to quit-window there is harmfull. It should
definitely not be the default.

This is especially frustrating since the code says:

(easy-mmode-defmap diff-mode-shared-map
    [...]
    ;; 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)
    ("q" . quit-window))

so, some care has been taken not to override M-A, M-r and M-R, but M-q
still is.

Thanks,

In GNU Emacs 23.0.91.2 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2009-03-17 on bauges
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--prefix=/home/moy/local/usr/''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  auto-fill-function: do-auto-fill
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  recentf-mode: t
  global-whitespace-mode: t
  global-hl-line-mode: t
  icomplete-mode: t
  auto-image-file-mode: t
  which-function-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
a t c h <return> C-x k <return> C-x b . p a t c h <return> 
M-x f o M-p <backspace> <backspace> f i l l C-k - r 
e <backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> f i l l <tab> r e <tab> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
p a r <tab> <return> C-_ C-n C-e C-a C-p <return> M-x 
<up> <return> <backspace> C-n C-n C-e <left> : : C-e 
SPC <backspace> <backspace> SPC a n d SPC b e f o r 
e SPC + . C-x C-s C-x # <f11> <return> C-l <backspace> 
<C-tab> C-x b s c r a <return> M-> <S-insert> M-y M-y 
M-y C-a C-k C-_ <C-tab> C-y <backspace> <backspace> 
<S-insert> <C-tab> C-x b A r <return> C-x o <return> 
y <return> <C-f7> g s n n n <return> <return> q g s 
<f11> <C-f7> g <return> <return> <return> <return> 
<return> <return> <return> <return> <return> <return> 
<return> <return> <return> <return> <return> <return> 
<return> <return> q g s p <return> c s <f11> C-x C-f 
/ t m p / f o o . t <backspace> p a t c h <return> 
M-q C-x b . p a t c h C-s <return> C-h k M-q C-x o 
C-n <C-tab> C-h m <C-tab> C-s m - q <prior> C-h v d 
i f f - m o <tab> m a <tab> <return> <C-tab> <C-tab> 
C-n C-p C-e <left> <left> <left> <left> <return> C-s 
M - q C-s C-s C-p M-< C-s q u i t - w i n d o w C-x 
1 M-x v c - m o <tab> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> a n n <tab> <return> C-s C-s C-s C-s C-s 
C-p M-x r e p o r <tab> b u <tab> <return>

Recent messages:
Saving file /home/moy/.newsrc.eld...
Wrote /home/moy/.newsrc.eld
Saving /home/moy/.newsrc.eld...done
(New file)
Type C-x 4 C-o RET to restore the other window.
Mark saved where search started
uncompressing diff-mode.el.gz...done
Mark saved where search started
Mark set
Mark saved where search started
vc-ensure-vc-buffer: File /net/bauges/local/moy/usr/share/emacs/23.0.91/lisp/diff-mode.el.gz is not under version control
-- 
Matthieu