From: "Søren Pilgård" <fiskomaten@gmail.com>
To: Narendra Joshi <narendraj9@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Clearning a keymap completely
Date: Mon, 5 Sep 2016 00:27:12 +0200 [thread overview]
Message-ID: <CAGXii2YfEHB2yZZrK5g=v9KcUDg_Qsr_h7foGiKoO2Hw39jWsQ@mail.gmail.com> (raw)
In-Reply-To: <CAHCj4z6HcKUNGME_5UCz2ZzLR7-dyLaSeHGBRu+tKKYOzxDaqQ@mail.gmail.com>
On Sun, Sep 4, 2016 at 11:40 PM, Narendra Joshi <narendraj9@gmail.com> 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
next prev parent reply other threads:[~2016-09-04 22:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-04 21:40 Clearning a keymap completely Narendra Joshi
2016-09-04 22:27 ` Søren Pilgård [this message]
2016-09-05 3:54 ` Yuri Khan
2016-09-05 4:03 ` John Mastro
2016-09-05 6:27 ` Narendra Joshi
2016-09-05 7:27 ` Marcin Borkowski
2016-09-06 12:53 ` Stefan Monnier
[not found] <mailman.1893.1473362103.22741.help-gnu-emacs@gnu.org>
2016-09-09 8:41 ` Ralf Fassel
2016-09-09 9:04 ` Joost Kremers
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='CAGXii2YfEHB2yZZrK5g=v9KcUDg_Qsr_h7foGiKoO2Hw39jWsQ@mail.gmail.com' \
--to=fiskomaten@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=narendraj9@gmail.com \
/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.