From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Multiple M-x shells sharing input ring Date: Thu, 4 Sep 2014 14:33:06 -0700 (PDT) Message-ID: <5aed63a6-1ff4-46f5-a417-f2db62251da5@default> References: <87ppfbkw31.fsf@web.de> <7fba0cb5-c7a9-40ef-9de4-3191a6c52f3a@default> <87bnqvktkf.fsf@web.de> <6938458c-7116-458a-9e10-8397dfa5b25a@default> <87ha0njd4s.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409866425 15540 80.91.229.3 (4 Sep 2014 21:33:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Sep 2014 21:33:45 +0000 (UTC) To: Michael Heerdegen , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 04 23:33:38 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1XPeev-0000UM-G9 for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Sep 2014 23:33:37 +0200 Original-Received: from localhost ([::1]:54249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPeev-0000MS-2d for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Sep 2014 17:33:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPeec-0000K9-IH for help-gnu-emacs@gnu.org; Thu, 04 Sep 2014 17:33:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPeeT-0002BT-RX for help-gnu-emacs@gnu.org; Thu, 04 Sep 2014 17:33:18 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:34749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPeeT-0002BK-L2 for help-gnu-emacs@gnu.org; Thu, 04 Sep 2014 17:33:09 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s84LX81p028297 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Sep 2014 21:33:08 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s84LX78i000627 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Sep 2014 21:33:08 GMT Original-Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s84LX78A002176; Thu, 4 Sep 2014 21:33:07 GMT In-Reply-To: <87ha0njd4s.fsf@web.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99657 Archived-At: > > 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. =20 > > That's the usual way these things are done. >=20 > 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? >=20 > 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.