Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* how to set a key in an article.
@ 2010-02-08 15:41 Uwe Brauer
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Brauer @ 2010-02-08 15:41 UTC (permalink / raw)
  To: info-gnus-english

Hello

When reading an article (mail/news) describe-mode

Tells me that I am in article-mode.

I want to bind the function icalendar-extract-buffer to some
key.

I tried 
 (add-hook 'gnus-article-mode-hook 'my-article-keys)
 (defun my-article-keys ()
 (interactive)
   (local-set-key "C-\\" 'icalendar-extract-ical-from-buffer))

Or 
  (local-set-key [(control c) i]  'icalendar-extract-ical-from-buffer)


But it does not work. What shall I do?

Uwe Brauer 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to set a key in an article.
  2010-02-08 23:40 ` Katsumi Yamaoka
@ 2010-02-09 10:52   ` Uwe Brauer
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Brauer @ 2010-02-09 10:52 UTC (permalink / raw)
  To: info-gnus-english

>>>>> On Tue, 09 Feb 2010 08:40:07 +0900, Katsumi Yamaoka <yamaoka@jpl.org> wrote:

>>>>> Uwe Brauer wrote:
   >> When reading an article (mail/news) describe-mode

   >> Tells me that I am in article-mode.

   >> I want to bind the function icalendar-extract-buffer to some
   >> key.

   >> I tried
   >> (add-hook 'gnus-article-mode-hook 'my-article-keys)
   >> (defun my-article-keys ()
   >> (interactive)
   >> (local-set-key "C-\\" 'icalendar-extract-ical-from-buffer))

   > Use "\C-\\" , [(control ?\\)] , [(control \\)] or (kbd "C-\\") .

   >> Or
   >> (local-set-key [(control c) i]  'icalendar-extract-ical-from-buffer)




   > Use "\C-ci" , [(control ?c) ?i] , [(control c) ?i] or (kbd "C-c i") .

"\C-ci" worked, thanks. 

That is really strange because I thought (local-set-key
[(control c) i] 'icalendar-extract-ical-from-buffer) is the
most general, inoperable form for key binding concerning
Xemacs and GNU emacs. And it worked in all other setting, 
summary keys, group keys etc.

Anyway.

Thanks 


Uwe 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to set a key in an article.
       [not found] <mailman.866.1265643714.14305.info-gnus-english@gnu.org>
@ 2010-02-08 23:40 ` Katsumi Yamaoka
  2010-02-09 10:52   ` Uwe Brauer
  0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2010-02-08 23:40 UTC (permalink / raw)
  To: info-gnus-english

>>>>> Uwe Brauer wrote:
> When reading an article (mail/news) describe-mode

> Tells me that I am in article-mode.

> I want to bind the function icalendar-extract-buffer to some
> key.

> I tried
>  (add-hook 'gnus-article-mode-hook 'my-article-keys)
>  (defun my-article-keys ()
>  (interactive)
>    (local-set-key "C-\\" 'icalendar-extract-ical-from-buffer))

Use "\C-\\" , [(control ?\\)] , [(control \\)] or (kbd "C-\\") .

> Or
>   (local-set-key [(control c) i]  'icalendar-extract-ical-from-buffer)

Use "\C-ci" , [(control ?c) ?i] , [(control c) ?i] or (kbd "C-c i") .

> But it does not work. What shall I do?
> Uwe Brauer

You can verify what keystrokes those expressions mean by evaluating:

(key-description [(control ?c) ?i])
 => "C-c i"

Note that `gnus-article-mode-hook' is run only when the article
buffer is created.  So, you may want to kill the article buffer
manually in advance to check if the hook functions work.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-09 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 15:41 how to set a key in an article Uwe Brauer
     [not found] <mailman.866.1265643714.14305.info-gnus-english@gnu.org>
2010-02-08 23:40 ` Katsumi Yamaoka
2010-02-09 10:52   ` Uwe Brauer

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 NNTP newsgroup(s).