all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Michael Heerdegen <michael_heerdegen@web.de>, help-gnu-emacs@gnu.org
Subject: RE: Multiple M-x shells sharing input ring
Date: Thu, 4 Sep 2014 14:33:06 -0700 (PDT)	[thread overview]
Message-ID: <5aed63a6-1ff4-46f5-a417-f2db62251da5@default> (raw)
In-Reply-To: <87ha0njd4s.fsf@web.de>

> > There are not only two alternatives: permanent-local and global.
> > The normal way to handle what you describe is to make the variable
> > local in each buffer where it should be local.  It can even be
> > made automatically local everywhere (`make-variable-buffer-local').
> >
> > And any mode derived from comint mode that happens to want a
> > separate history can easily obtain that, even if the variable
> > is not declared automatically local.  Nothing prevents scheme
> > mode or whatever from doing `make-buffer-local' in its buffers.  
> > That's the usual way these things are done.
> 
> Yes, but if you want to have a shared input history for all shell
> buffers, and another shared history for all interactive scheme
> buffers, using a global var is not good enough either.

True.  But nothing says that scheme mode cannot use a different
global variable.  Just because it is derived from comint mode does
not mean that it needs to stay in lockstep with other comint-mode
(or derived-p) buffers.

> >  Permanent locals are appropriate for...
>
> It doesn't say that it's inappropriate for all other cases ;-)

Oh, come on.

> > And even if it does that, that just makes the variable buffer-
> > local.  What prevents one from then killing that local variable
> > and using the global one instead?
> 
> Nothing, but I just think a per-mode input history could be more
> useful.

OK.  But see above.  I don't disagree with the per-mode part.

But starting with per-comint-mode is not a bad start.  Any mode
derived from comint-mode could then, if it needed, use its own
separate variable - for all of its buffers (shared).  Or it
could use a separate history for each of its buffers, as is the
case now.  (Or for some but not others.)

Anyway, I think we've probably beat this request to death. ;-)
It should be clear now that Joseph can get any combination of
behaviors he wants, and there are different ways to do that.



  reply	other threads:[~2014-09-04 21:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  8:54 Multiple M-x shells sharing input ring Joseph Xu
2014-09-04 14:58 ` Subhan Michael Tindall
2014-09-04 15:55   ` Joseph Xu
2014-09-04 19:46 ` Michael Heerdegen
2014-09-04 20:09   ` Drew Adams
2014-09-04 20:40     ` Michael Heerdegen
2014-09-04 20:58       ` Drew Adams
2014-09-04 21:21         ` Michael Heerdegen
2014-09-04 21:33           ` Drew Adams [this message]
2014-09-05  7:33             ` Joseph Xu
     [not found]       ` <mailman.8284.1409864361.1147.help-gnu-emacs@gnu.org>
2014-09-04 21:09         ` Stefan Monnier
2014-09-04 21:20           ` Drew Adams

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=5aed63a6-1ff4-46f5-a417-f2db62251da5@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.