From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Shahid Newsgroups: gmane.emacs.devel Subject: Re: Propagating local variables? Date: Sat, 19 May 2018 15:09:17 +0000 Message-ID: <87603jn0ma.fsf@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1526742487 17955 195.159.176.226 (19 May 2018 15:08:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 May 2018 15:08:07 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: shea@shealevy.com, John Wiegley , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 19 17:08:02 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 1fK3Sk-0004bt-9l for ged-emacs-devel@m.gmane.org; Sat, 19 May 2018 17:08:02 +0200 Original-Received: from localhost ([::1]:43439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fK3Uo-0001Cc-E9 for ged-emacs-devel@m.gmane.org; Sat, 19 May 2018 11:10:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fK3UA-0001BZ-DQ for emacs-devel@gnu.org; Sat, 19 May 2018 11:09:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fK3U6-00071o-DV for emacs-devel@gnu.org; Sat, 19 May 2018 11:09:30 -0400 Original-Received: from mail-qt0-x22a.google.com ([2607:f8b0:400d:c0d::22a]:39420) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fK3U6-00070K-8Q; Sat, 19 May 2018 11:09:26 -0400 Original-Received: by mail-qt0-x22a.google.com with SMTP id f1-v6so14004017qtj.6; Sat, 19 May 2018 08:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=hH20PN2b/QWDEbyTNNZ0cDjwCtxmcAkaAKnZL9kkrSs=; b=lw2c0gcjnzv/suTi9TJXXUIunIIY7/CL6zBSBXtvG6F6zLCEH5CtCT3nifqbg/abCn h/eMLNBGsSTgBZ0zjsF0Ws9IZrRLTXExmM55cA3gb0axg6hIo2gMJ0cG5/mGFnCDUsAH HlUyYdfDhuJKtQA+ig7lJw+/r6dSrtGBCwUP3aK7YYEU5Crl8d9t7AIA4fsJQv1LvUnL K8Hfs9VKN8ngH4XQjfOBs1TR8XZKTB6nq+kLzD/y1R+ZMAieq+ru1oVfKgIH5/KFRSVt uQXtZaXpcr2bOSfDyIOSoInFTM/YAe5byIiXzQQbEjgbfF6+DrIFUsc46UEKY+paxiTc c6aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=hH20PN2b/QWDEbyTNNZ0cDjwCtxmcAkaAKnZL9kkrSs=; b=eaPMeFnVR5q7Yl8xEKnbVL7YbDrP+zz0/ZLEW4YA/3zziIMSCTCwDj/ePeF4jB7oxn QlYtcSAWlX+rHK/OAgkgoxjdC/ybRKwn6j3MmwOLzCk+eRBw93eoa8XmErrW6JC5Nl08 ktIQkyeM6TEb45ba1v7PXlr9Y6lvPJt+GaiBvzMjQoVcMkaDyygVlGTBKW8Kz+foeDN0 pHC9WZXfRog4e7PV+6oPHj6mq2N8JQh8IhjaQckoindtNntpkayuZPoeHIpCfzNNUbDs 9DTQ3SGHNs0Hc5d9+q1lF9lb6qzxEj1fIddKOAMlOBGCgNLagOgZA3YgK7mEKTyHu9cl aXfA== X-Gm-Message-State: ALKqPweJR8AHrs84U+7yloOCe+PYKoU0VArZHmECg3imdL+vox75qNzn O+lXXH2AHWviT/jVmh0lkF5kOlU7 X-Google-Smtp-Source: AB8JxZohzvtckKB+j8oEI+4OxxzYRlth8OuqhpRLiedUiKCJpF0LN3wiof7AcrTaY24DWZRFznTIaw== X-Received: by 2002:ac8:4293:: with SMTP id o19-v6mr12890866qtl.321.1526742565042; Sat, 19 May 2018 08:09:25 -0700 (PDT) Original-Received: from 6fd3b29cb092 (cpe-184-152-55-93.nyc.res.rr.com. [184.152.55.93]) by smtp.gmail.com with ESMTPSA id v14-v6sm6799904qto.72.2018.05.19.08.09.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 May 2018 08:09:23 -0700 (PDT) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22a 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:225440 Archived-At: Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > The parent is the buffer where you create the variables that will extend to > > any children spawned "on behalf" of that buffer. So, not every buffer you > > create while currently visiting that buffer, but those which match some kind > > of predicate. > > That makes sense to me. But I see two ways to do it: > > * choose which buffers are its children > based on filtering their names. > > * specify, when creating a buffer, what parent buffer (if any) it > should have. Out of curiosity, if we go down this path, are we willing to change functions such as `with-temp-buffer' to create a child buffer by default ? I recently had a use case for this feature. I wanted to set `process-environment' as a buffer-local variable for certain buffers. I achieved that using a mode-hook. This worked great with `call-process' but didn't work so well when `process-lines' was used. `process-lines' will create a new temp buffer and the buffer-local value is lost. Now that I think about it, may be `with-temp-buffer' can take another argument for the parent buffer that `process-lines' could use. Anyway, I just wanted to share my use case, which could benefit from the second option. cheers, js