[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to set a key in an article.
From: |
Katsumi Yamaoka |
Subject: |
Re: how to set a key in an article. |
Date: |
Tue, 09 Feb 2010 08:40:07 +0900 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.92 (gnu/linux) |
>>>>> 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.