From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Propagating local variables? Date: Wed, 16 May 2018 16:49:56 -0400 Message-ID: References: <87fu2se06r.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1526503683 300 195.159.176.226 (16 May 2018 20:48:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 16 May 2018 20:48:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 16 22:47:59 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fJ3L4-0008Qx-6h for ged-emacs-devel@m.gmane.org; Wed, 16 May 2018 22:47:58 +0200 Original-Received: from localhost ([::1]:39842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ3NB-0004sU-8o for ged-emacs-devel@m.gmane.org; Wed, 16 May 2018 16:50:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ3N4-0004qj-Fg for emacs-devel@gnu.org; Wed, 16 May 2018 16:50:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ3N0-0008Gr-Iy for emacs-devel@gnu.org; Wed, 16 May 2018 16:50:02 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:38576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ3N0-0008GI-E4 for emacs-devel@gnu.org; Wed, 16 May 2018 16:49:58 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w4GKnuXf003486; Wed, 16 May 2018 16:49:56 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 880F36612B; Wed, 16 May 2018 16:49:56 -0400 (EDT) In-Reply-To: (John Wiegley's message of "Wed, 16 May 2018 11:59:06 -0700") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6287=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6287> : inlines <6640> : streams <1786934> : uri <2642417> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:225350 Archived-At: > SM> I think most other "multi-buffer" packages tend to treat one of their > SM> buffers as a kind of "master" and have all others point to it, so they can > SM> lookup shared local variables via something like (buffer-local-value > SM> my-parent-buffer 'varname). > If you're the author of all the code that relates to that buffer, sure. But I > can't expect shell.el to reference the buffer-local `process-environment' of > my Coq buffer in order to setup the right PATH for that project-specific > sub-shell. I only mentioned it as a mechanism to share a variable among various buffers. We could decide that shell.el obeys a `parent-buffer` variable (presumably set by some other package) when non-nil by fetching the buffer-local `process-environment' of that buffer. Stefan