all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Shahid <jvshahid@gmail.com>
To: rms@gnu.org
Cc: shea@shealevy.com, John Wiegley <johnw@gnu.org>, emacs-devel@gnu.org
Subject: Re: Propagating local variables?
Date: Sat, 19 May 2018 15:09:17 +0000	[thread overview]
Message-ID: <87603jn0ma.fsf@gmail.com> (raw)
In-Reply-To: <E1fJVCR-0003Sx-7T@fencepost.gnu.org>


Richard Stallman <rms@gnu.org> 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



  parent reply	other threads:[~2018-05-19 15:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 19:37 Propagating local variables? John Wiegley
2018-05-16  3:42 ` Roland Winkler
2018-05-16 17:34   ` Stefan Monnier
2018-05-16 18:59     ` John Wiegley
2018-05-16 20:49       ` Stefan Monnier
2018-05-16 22:46         ` John Wiegley
2018-05-17 14:45           ` Stefan Monnier
2018-05-16 21:02     ` Roland Winkler
2018-05-17  3:00 ` Richard Stallman
2018-05-17  5:16   ` John Wiegley
2018-05-18  2:32     ` Richard Stallman
2018-05-18  4:28       ` John Wiegley
2018-05-18 20:15         ` Shea Levy
2018-05-19  3:19         ` Richard Stallman
2018-05-19 15:09       ` John Shahid [this message]
2018-05-20  3:19         ` Richard Stallman
2018-05-17 12:18 ` Shea Levy
2018-05-17 14:27   ` Clément Pit-Claudel
2018-05-18  2:33     ` Richard Stallman
2018-05-18  3:18     ` Stefan Monnier
2018-05-19 12:06     ` Philipp Stephani
2018-05-20 19:09       ` Clément Pit-Claudel
2018-05-19 12:11 ` Philipp Stephani
2018-05-19 19:12   ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87603jn0ma.fsf@gmail.com \
    --to=jvshahid@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=johnw@gnu.org \
    --cc=rms@gnu.org \
    --cc=shea@shealevy.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.