From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: How do I bind a variable for the minibuffer's use? Date: Mon, 28 Mar 2016 14:59:34 -0400 Message-ID: References: <20160328184354.GA5095@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459191600 19541 80.91.229.3 (28 Mar 2016 19:00:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2016 19:00:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 28 20:59:50 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1akcOD-0006lZ-UU for ged-emacs-devel@m.gmane.org; Mon, 28 Mar 2016 20:59:50 +0200 Original-Received: from localhost ([::1]:42271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akcOC-0007YP-UA for ged-emacs-devel@m.gmane.org; Mon, 28 Mar 2016 14:59:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akcO9-0007YB-Or for emacs-devel@gnu.org; Mon, 28 Mar 2016 14:59:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akcO6-0007uz-Is for emacs-devel@gnu.org; Mon, 28 Mar 2016 14:59:45 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akcO6-0007us-Bp for emacs-devel@gnu.org; Mon, 28 Mar 2016 14:59:42 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1akcO4-0006iI-Jv for emacs-devel@gnu.org; Mon, 28 Mar 2016 20:59:40 +0200 Original-Received: from 107-179-153-73.cpe.teksavvy.com ([107.179.153.73]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Mar 2016 20:59:40 +0200 Original-Received: from monnier by 107-179-153-73.cpe.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Mar 2016 20:59:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 107-179-153-73.cpe.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:8CaFjD/RsQhVA3KB6QJ6/jGogaQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202346 Archived-At: > How do I bind a variable for the minibuffer? There can be several minibuffers, so you need to be more precise. > In particular, I want to bind text-property-default-nonsticky to > include '(separator . t). When/where is this property added and then used? > The way it is done at the moment (in query-replace-read-from) is simply > to bind that variable, in the hope that that binding will be the one > seen by the minibuffer. I guess the simplest way would be to use minibuffer-with-setup-hook where you setq-local those vars. This has the downside that those buffer-local settings may leak to the next use of the minibuffer, but it's probably harmless (and with any luck minibuffer-inactive-mode will kill those buffer-local settings as soon as you exit the minibuffer). Stefan