* How bind C-c C-c to specific buffer?
@ 2011-11-11 23:21 Oleksandr Gavenko
2011-11-12 3:08 ` XeCycle
0 siblings, 1 reply; 4+ messages in thread
From: Oleksandr Gavenko @ 2011-11-11 23:21 UTC (permalink / raw)
To: help-gnu-emacs
I try implement functionality that spawn buffer, user type message and after
C-c C-c must arise my function that get typed text and kill buffer (like in
remember or message or log buffers).
How can I archive my goal?
Is it possible to bind key sequence limited to specific buffer without
implementing major mode?
--
Best regards!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How bind C-c C-c to specific buffer?
2011-11-11 23:21 How bind C-c C-c to specific buffer? Oleksandr Gavenko
@ 2011-11-12 3:08 ` XeCycle
2011-11-12 12:07 ` Oleksandr Gavenko
0 siblings, 1 reply; 4+ messages in thread
From: XeCycle @ 2011-11-12 3:08 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
Oleksandr Gavenko <gavenkoa@gmail.com> writes:
> I try implement functionality that spawn buffer, user type message and after
> C-c C-c must arise my function that get typed text and kill buffer (like in
> remember or message or log buffers).
>
> How can I archive my goal?
>
> Is it possible to bind key sequence limited to specific buffer without
> implementing major mode?
See local-set-key.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How bind C-c C-c to specific buffer?
2011-11-12 3:08 ` XeCycle
@ 2011-11-12 12:07 ` Oleksandr Gavenko
2011-11-14 23:55 ` Philipp Haselwarter
0 siblings, 1 reply; 4+ messages in thread
From: Oleksandr Gavenko @ 2011-11-12 12:07 UTC (permalink / raw)
To: help-gnu-emacs
On 2011-11-12, XeCycle wrote:
> Oleksandr Gavenko <gavenkoa@gmail.com> writes:
>
>> I try implement functionality that spawn buffer, user type message and after
>> C-c C-c must arise my function that get typed text and kill buffer (like in
>> remember or message or log buffers).
>>
>> How can I archive my goal?
>>
>> Is it possible to bind key sequence limited to specific buffer without
>> implementing major mode?
>
> See local-set-key.
From docs:
local-set-key is an interactive compiled Lisp function in `subr.el'.
(local-set-key KEY COMMAND)
[...]
The binding goes in the current buffer's local map, which in most cases is
shared with all other buffers in the same major mode.
So my assumption that I need implement fake major mode to get key binding true
temporary (does not reflected to any other modes/bindings)?
Or I can define my own map and set it with 'use-local-map' for buffer?
--
Best regards!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How bind C-c C-c to specific buffer?
2011-11-12 12:07 ` Oleksandr Gavenko
@ 2011-11-14 23:55 ` Philipp Haselwarter
0 siblings, 0 replies; 4+ messages in thread
From: Philipp Haselwarter @ 2011-11-14 23:55 UTC (permalink / raw)
To: help-gnu-emacs
Minor mode will suffice. Check out
http://www.emacswiki.org/emacs/BufferLocalKeys
--
Philipp Haselwarter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-14 23:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11 23:21 How bind C-c C-c to specific buffer? Oleksandr Gavenko
2011-11-12 3:08 ` XeCycle
2011-11-12 12:07 ` Oleksandr Gavenko
2011-11-14 23:55 ` Philipp Haselwarter
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 read-only IMAP folder(s) and NNTP newsgroup(s).