From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: when deleting in minibuffer, don't change kill-ring Date: Thu, 27 Oct 2011 14:53:31 -0700 Message-ID: <2E5FB92AF4854B6CB7774F5D671C3320@us.oracle.com> References: <7AF781F7ABA44DA5A698D5AFA772C4B2@us.oracle.com> <87pqhiuwcy.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1319752431 11419 80.91.229.12 (27 Oct 2011 21:53:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2011 21:53:51 +0000 (UTC) To: "'Tassilo Horn'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 27 23:53:44 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 1RJXtP-0004pp-Lv for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Oct 2011 23:53:43 +0200 Original-Received: from localhost ([::1]:49339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJXtP-000773-8G for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Oct 2011 17:53:43 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJXtL-00076y-3F for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 17:53:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJXtJ-0001Yt-Lq for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 17:53:39 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:30471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJXtJ-0001Yl-Ad for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 17:53:37 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p9RLrZE5010472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Oct 2011 21:53:36 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p9RLrYx5022661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Oct 2011 21:53:35 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p9RLrTwx008072; Thu, 27 Oct 2011 16:53:29 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 27 Oct 2011 14:53:29 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87pqhiuwcy.fsf@thinkpad.tsdh.de> Thread-Index: AcyU1Z7Lf5BRzCEJQte4zdvGfO8GTgAAOQTQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4EA9D2E0.0066,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 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:82682 Archived-At: > I guess the OP means `backward-kill-word' () 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. I think you need deleting (non-killing) commands to remap the killing commands to: (defun delete-word (arg) (interactive "p") (delete-region (point) (progn (forward-word arg) (point)))) (defun backward-delete-word (arg) (interactive "p") (delete-word (- arg))) Then, as I said, bind these in _each_ of the minibuffer keymaps. This is for one of the maps: (define-key minibuffer-local-must-match-map [remap kill-word] 'delete-word) (define-key minibuffer-local-must-match-map [remap backward-kill-word] 'backward-delete-word) > 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. Try doing it on `minibuffer-setup-hook' instead. (add-hook 'minibuffer-setup-hook' (lambda () (make-local-variable 'kill-ring))) > Isn't it possible to have buffer local values for > variables defined at the C level? Yes, AFAIK.