From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: when deleting in minibuffer, don't change kill-ring
Date: Thu, 27 Oct 2011 20:23:41 +0200 [thread overview]
Message-ID: <87pqhiuwcy.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 7AF781F7ABA44DA5A698D5AFA772C4B2@us.oracle.com
"Drew Adams" <drew.adams@oracle.com> writes:
>> how to prohibit kill-ring being changed, when I press "backspace" key
>> in minibuffer?
>
> It is _not_ changed. Provide a recipe, starting from emacs -Q.
>
> If you do need to change the binding of the key for some reason, then
> do so in each of the minibuffer key maps. E.g.,
>
> (define minibuffer-local-must-match-map (kbd "DEL")
> 'backward-delete-char)
> etc.
>
> But AFAICT, the global binding of DEL (and <backspace>) is in effect
> in the minibuffer, and the global binding does not kill a char, it
> deletes it.
I guess the OP means `backward-kill-word' (<M-backspace>) and friends.
I'm also interested in something like that. I want to use the word,
line, and region editing commands in the minibuffer, but I don't want to
have the killed text in the global kill-ring.
What I'd really like to have is a separate kill-ring for the
minibuffers. I've tried
(dolist (b (buffer-list))
(when (minibufferp b)
(set-buffer b)
(make-local-variable 'kill-ring)))
or entering a recursive edit
M-: M-: (make-local-variable 'kill-ring) RET C-g,
but that doesn't have an effect. Isn't it possible to have buffer local
values for variables defined at the C level?
Another observation: why are there more than one minibuffers? Right
now, I have 4:
(dolist (b (buffer-list))
(when (minibufferp b)
(insert (format "%s is a minibuffer\n" b)))) ;; C-j
*Minibuf-1* is a minibuffer
*Minibuf-2* is a minibuffer
*Minibuf-3* is a minibuffer
*Minibuf-0* is a minibuffer
some minutes ago I had 5, all with just one emacs frame. And with emacs
-Q, I first have one and after the first window split, I have 2.
Bye,
Tassilo
next prev parent reply other threads:[~2011-10-27 18:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-27 16:35 when deleting in minibuffer, don't change kill-ring filebat Mark
2011-10-27 16:52 ` Drew Adams
2011-10-27 18:23 ` Tassilo Horn [this message]
2011-10-27 18:38 ` Peter Dyballa
2011-10-27 19:08 ` Tassilo Horn
2011-10-27 21:53 ` Drew Adams
2011-10-28 6:53 ` Tassilo Horn
2011-10-28 7:10 ` Tassilo Horn
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pqhiuwcy.fsf@thinkpad.tsdh.de \
--to=tassilo@member.fsf.org \
--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.
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).