From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?B?U8O4cmVuIFBpbGfDpXJk?= Newsgroups: gmane.emacs.help Subject: Re: Clearning a keymap completely Date: Mon, 5 Sep 2016 00:27:12 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1473082651 30768 195.159.176.226 (5 Sep 2016 13:37:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Sep 2016 13:37:31 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Narendra Joshi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 05 15:37:27 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgu5V-0007Po-4C for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Sep 2016 15:37:25 +0200 Original-Received: from localhost ([::1]:54705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgu5S-00047Z-VL for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Sep 2016 09:37:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgfsi-0007sn-6h for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 18:27:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgfsg-00072N-3P for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 18:27:15 -0400 Original-Received: from mail-vk0-x22f.google.com ([2607:f8b0:400c:c05::22f]:34132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgfsf-00072J-VU for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 18:27:14 -0400 Original-Received: by mail-vk0-x22f.google.com with SMTP id v189so64636258vkv.1 for ; Sun, 04 Sep 2016 15:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Dnhhjwqlf46HCLeXSvcUOwmd+8R9eNypNdjAxwpgXSk=; b=GqK9rXxBxdBoG12q9YwQuaSO+MOmzezTNn+epcDKCqOmubl9E8MLOOn/Owh6W+GNZn ubFqPfxfSo0Hb7fVXMwwtDjYY2eSMVEZotzQ0NpJsEDJNZ5hERtoIlORktgss5/F3Wvd e6G+8TY7FaypBe53lGMnFrTizTBBfHukMgVCacCtkmcxrh4wPj0ERUmfBqmaZQRUYsuC 3VVaLPTw6IoEQeEcBiEPsM3QlUPk7vEcAY/wq6lzNzmdSAeAqFKq/0DTE1rYMvwo2Cg0 ZolHibtpmkl7vXKpntMR8f5+T9em6omORsR7c7MGqiO31VEVEIyKUT6MApv7rSifD6+G qcbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Dnhhjwqlf46HCLeXSvcUOwmd+8R9eNypNdjAxwpgXSk=; b=jMs1DkZxkKKpkxXyrdMXeqzKj9KWDwxb+lwk6C5+PnrVrg8YNgOKPjd3dCcNmIbVDf 0cJrl6hedgA6BuhJXZSO+6d6K1SiCoMj5m8P60G4VQufcgyk/OwAW7NYmfyW2WM0XT0Q Q3mLai2oyUP+lfjV6xr5e8IX11sti/L6+Ikvu1XUcU9482pm//YJMmbTXRAc+aGjdn1g XeJcw9VWZR+Zu11tC7bPflQ5m5iNjxXykfB/rsnodfa6AyowygHGdC1L+PzigcApZvbK 5Nt8ohJkDWYeQzBczWNIVltyl/3GqNhHXxVTFxePwuCL01a2u+eKFloWLZluiRH8xVGt PZZw== X-Gm-Message-State: AE9vXwPozumF3iojWRxpoLjKVtIYIRCjA5c0tIxsi9hHereKth3YnRNyQ2dBvtLShuBGud0R/T3Q2JKYEnBy/g== X-Received: by 10.31.70.132 with SMTP id t126mr17313936vka.99.1473028033269; Sun, 04 Sep 2016 15:27:13 -0700 (PDT) Original-Received: by 10.103.89.17 with HTTP; Sun, 4 Sep 2016 15:27:12 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::22f X-Mailman-Approved-At: Mon, 05 Sep 2016 09:34:37 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:111264 Archived-At: On Sun, Sep 4, 2016 at 11:40 PM, Narendra Joshi wrote: > I need to remove all the self-insert commands in a buffer. I want to > be able to insert text into the buffer through emacs lisp but don't > want the user to be able to insert text. How can this be done? > That is now how you want to solve it. Instead look into the buffer-read-only and inhibit-read-only variables [0]. You can let bind them to temporarily edit the buffer from your code. Messing with all the keybindings is not the way to go. [0] https://www.gnu.org/software/emacs/manual/html_node/elisp/Read-Only-Buffers.html