From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: How bind C-c C-c to specific buffer? Date: Sat, 12 Nov 2011 14:07:14 +0200 Organization: At home. Message-ID: <871utdv91p.fsf@gmail.com> References: <877h369rfi.fsf@gmail.com> <8739du11ij.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1321099662 9986 80.91.229.12 (12 Nov 2011 12:07:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Nov 2011 12:07:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 12 13:07:38 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RPCN0-0004VI-LR for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Nov 2011 13:07:38 +0100 Original-Received: from localhost ([::1]:55733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCN0-0004fp-2N for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Nov 2011 07:07:38 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCMv-0004fW-51 for help-gnu-emacs@gnu.org; Sat, 12 Nov 2011 07:07:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPCMu-0004Eq-62 for help-gnu-emacs@gnu.org; Sat, 12 Nov 2011 07:07:33 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:43380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCMt-0004Ej-Sj for help-gnu-emacs@gnu.org; Sat, 12 Nov 2011 07:07:32 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RPCMt-0004SQ-EZ for help-gnu-emacs@gnu.org; Sat, 12 Nov 2011 13:07:31 +0100 Original-Received: from 123-36-202-46.pool.ukrtel.net ([46.202.36.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Nov 2011 13:07:31 +0100 Original-Received: from gavenkoa by 123-36-202-46.pool.ukrtel.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Nov 2011 13:07:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 123-36-202-46.pool.ukrtel.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (windows-nt) Cancel-Lock: sha1:lg4FJ42uJY3ZCayTspfP5zf6Iqk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82876 Archived-At: On 2011-11-12, XeCycle wrote: > Oleksandr Gavenko 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!