all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How bind C-c C-c to specific buffer?
Date: Sat, 12 Nov 2011 14:07:14 +0200	[thread overview]
Message-ID: <871utdv91p.fsf@gmail.com> (raw)
In-Reply-To: 8739du11ij.fsf@gmail.com

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!




  reply	other threads:[~2011-11-12 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-11-14 23:55     ` Philipp Haselwarter

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=871utdv91p.fsf@gmail.com \
    --to=gavenkoa@gmail.com \
    --cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.