From: 황병희 <byunghee.hwang@daum.net>
To: ding@gnus.org
Subject: Re: i would like to select one mail address at prompt when i hit `m' key in keyboard...
Date: Tue, 17 Nov 2020 12:00:52 +0900 [thread overview]
Message-ID: <yw81rgsvg9n.fsf@delta.birch.chromebook> (raw)
In-Reply-To: <87sg99tika.fsf@eps142.cdf.udc.es>
Alberto Luaces <aluaces@udc.es> writes:
> Byung-Hee HWANG writes:
>
> [...]
>
>>
>> (add-hook 'message-mode-hook
>> '(lambda ()
>> (if (y-or-n-p "at home?")
>> (progn (setHome))
>> (progn (setWork)))))
>> #+end_src
>>
>> at then, question...
>>
>> how can i enable the above rule only when i hit `m' key?
>>
>> i try to google and emacs manual etc... but failed..
>
> Hi, I guess you don't want a hook here, but to bind a keypress to your
> function inside the hook. Something along the lines of:
>
> (add-hook 'message-mode-hook
> '(local-set-key (kbd "M-m") '(lambda ()
> (if (y-or-n-p "at home?")
> (progn (setHome))
> (progn (setWork))))))
>
> I have binded to M-m instead of just "m", otherwise you couldn't type
> the letter "m" in a message.
Thanks Alberto, i will study about local-set-key, thanks again^^^
Sincerely, Byung-Hee
--
^고맙습니다 _地平天成_ 감사합니다_^))//
next prev parent reply other threads:[~2020-11-17 3:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 2:46 Byung-Hee HWANG
2020-11-16 10:43 ` Solved problem (Was: Re: i would like to select one mail address at prompt when i hit `m' key in keyboard...) 황병희
2020-11-16 15:41 ` i would like to select one mail address at prompt when i hit `m' key in keyboard Alberto Luaces
2020-11-17 3:00 ` 황병희 [this message]
2020-11-16 16:06 ` Eric S Fraga
2020-11-17 2:08 ` 황병희
2020-11-17 2:52 ` Bob Newell
2020-11-17 3:09 ` 황병희
2020-11-17 7:14 ` Vegard Vesterheim
2020-11-17 16:34 ` Bob Newell
2020-11-30 23:31 ` David Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yw81rgsvg9n.fsf@delta.birch.chromebook \
--to=byunghee.hwang@daum.net \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).