bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnus keybinding problem


From: Andrew M. Bishop
Subject: Re: Gnus keybinding problem
Date: 09 Feb 2002 17:42:34 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

ShengHuo ZHU <address@hidden> writes:

> >> >> >> > I use the topical format for the Group buffer and it looks like 
> >> >> >> > this.
> >> >> >> >
> >> >> >> > [Gnus]
> >> >> >> >    [mail] ...
> >> >> >> >    [news] ...
> >> >> >> >    [drafts] ...
> >
> >> > The problem that I can see (and I believe to be a bug) is:
> >> >
> >> > The function bound to M-g claims to be gnus-group-get-new-news-this-group
> >> 
> >> You saw this because Topic minor mode is not active, i.e. "Topic" is
> >> shown not on the mode line.  After typing `t' (or M-x gnus-topic-mode
> >> RET), you will see that the function bound to M-g claims to be
> >> gnus-topic-get-new-news-this-topic, because now the Topic minor mode
> >> is active, also you will see "Topic" on the mode line.
> >
> > The topic minor mode is active.  It says Topic on the modeline, the
> > format is topic mode (as in the quoted section of my original e-mail
> > above) and running M-x gnus-topic-mode puts me back to normal mode.
> >
> >> > Why does pressing the key invoke a different function from that
> >> > reported by C-h k M-g or C-h b ?  If it reported the correct function
> >> > then I would not have had the problem.  This makes it a bug.
> >> 
> >> It is all because there is a Topic minor mode.
> >
> > The keypresses above should include the minor mode bindings.
> 
> What does `C-h b' (describe-bindings) report in the Group buffer?


Further investigations lead me to the real cause of the problem.  It
is not relaated to gnus or topic mode at all, it is related to the
Emacs help system and is a real, verifiable, bug.  I am sorry if I
lead you down the wrong track.


I started using Emacs on a terminal where the backspace key gave a C-h
character.  This is very inconvenient when using Emacs since it brings
up help rather than deleting backwards.  The solution to this was to
redefine the key that started help.  This leads to the following part
of my .emacs file, one of the oldest parts in fact.

-------------------- .emacs --------------------

;;; ^H as delete and meta-h as help ;;;;

(global-unset-key "\C-h")
(define-key global-map "\C-h" 'delete-char)
(define-key global-map "\M-h" 'help-for-help)

-------------------- .emacs --------------------

In Emacs 21 this no longer works, the help-for-help command ignores
the minor modes that are active.

To demonstrate this run the following (using view-mode as an example
minor mode):

emacs -q -f view-mode

Run C-h b (or M-x describe-bindings) and you will see:

-------------------- C-h b --------------------
Key translations:
key             binding
---             -------

<lines deleted>

^L
`view-mode' Minor Mode Bindings:
key             binding
---             -------

<lines deleted>

^L
Major Mode Bindings:
key             binding
---             -------

<lines deleted>

^L
Global Bindings:
key             binding
---             -------

<lines deleted>
-------------------- C-h b --------------------

Run C-h C-h b or C-h ? b (or M-x help-for-help b) and you will see:

-------------------- C-h C-h b --------------------
Key translations:
key             binding
---             -------

<lines deleted>

^L
Major Mode Bindings:
key             binding
---             -------

<lines deleted>

^L
Global Bindings:
key             binding
---             -------

<lines deleted>
-------------------- C-h C-h b --------------------

The solution to this is to use this in my .emacs file:

(define-key global-map "\M-h" 'help-command)


There should however be no difference between C-h b and C-h ? b
since the latter one just provides the help options and C-h even
prompts the user to use C-h ? to get the list of options.

The following keys act differently:

C-h b           C-h C-h b
C-h c           C-h C-h c
C-h k           C-h C-h k
C-h m           C-h C-h m

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             address@hidden
                                      http://www.gedanken.demon.co.uk/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]