From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.bugs Subject: bug#6915: Please consider making left-margin-width etc buffer local instead of major mode local Date: Thu, 26 Aug 2010 18:20:26 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1282862419 20387 80.91.229.12 (26 Aug 2010 22:40:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Aug 2010 22:40:19 +0000 (UTC) Cc: 6915@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 27 00:40:18 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ool74-0006PG-SN for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Aug 2010 00:40:18 +0200 Original-Received: from localhost ([127.0.0.1]:47043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ool6y-0003z6-GJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Aug 2010 18:39:56 -0400 Original-Received: from [140.186.70.92] (port=60233 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ool6k-0003ys-59 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 18:39:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ool6T-00084x-Cx for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 18:39:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59553) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ool6T-00084t-BI for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 18:39:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Ookni-0007hT-Pp; Thu, 26 Aug 2010 18:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: MON KEY Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2010 22:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6915 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6915-submit@debbugs.gnu.org id=B6915.128286114429585 (code B ref 6915); Thu, 26 Aug 2010 22:20:02 +0000 Original-Received: (at 6915) by debbugs.gnu.org; 26 Aug 2010 22:19:04 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ookml-0007h8-5a for submit@debbugs.gnu.org; Thu, 26 Aug 2010 18:19:03 -0400 Original-Received: from mail-ww0-f42.google.com ([74.125.82.42]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ookmj-0007gj-1f for 6915@debbugs.gnu.org; Thu, 26 Aug 2010 18:19:01 -0400 Original-Received: by wwc33 with SMTP id 33so31359wwc.3 for <6915@debbugs.gnu.org>; Thu, 26 Aug 2010 15:20:26 -0700 (PDT) Original-Received: by 10.227.138.7 with SMTP id y7mr9562238wbt.133.1282861226618; Thu, 26 Aug 2010 15:20:26 -0700 (PDT) Original-Received: by 10.216.65.140 with HTTP; Thu, 26 Aug 2010 15:20:26 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: qsMDxWs0g1hqKk3wrH0a-mIBrdo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 26 Aug 2010 18:20:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39775 Archived-At: On Thu, Aug 26, 2010 at 9:05 AM, Juanma Barranquero wrote: > On Thu, Aug 26, 2010 at 14:40, Lennart Borgman > wrote: > >> If there is only one major mode in the buffer this is perhaps the case, yes. > > This is what happens now, and in the foreseeable future, in the vast > majority of buffers. Or do you anticipate the need to use mumamo in > all kinds of buffers? What utility is there in that? Supporting the extension of the existing featues mumamo offers would be extremely wrong-headed without extending a lexical-scoping feature to Emacs lisp first b/c it would only further obviate an (over) reliance on variables being buffer-local and permanent local. And, _if_ true lexical-scoping were an Emacs lisp feature most of the concepts embodied by "mumamo" would no longer be relevant b/c closures and capturing environments could take care of state. This is the cruxt of my beef w/ Lennarts increasingly incessant clamor for more permanet buffer-locals to satisfy the (oft hypothetical) needs of mumamo type features. Where his solution might work to solve _one_ problem it glosses over the bigger ones. IOW Lennart should be advocationg for inclusion of Miles Bader lexical scoping for Emacs rather than privelging only the variables he wants/needs according to some arbitrary determination of whether a variable is primarily an aspect of buffer-content vs. major-mode functionality... > >> Emacs was not very good prepared for several major modes in a buffer. > > Agreed. > It wasn't prepared for it because they were called "Major Modes" not: "Modes which affect Modes which affect Modes w/ turtles all the way down" Note, the latter _is_ the ideal (mine anyways). Unfortunately, implemention of such a system within Emacs was rejected long ago (it basically requires Common Lisp's CLOS/MOP). Attempting to retrofit "turtles all the way down" isn't possible without access to lots of turtles. Regardless, unrestrained permanent-localism isn't the correct means with which to acquire those turtles. >> I suppose this will change in the future, but we are not there yet. > > Why? > Because Stefan is practically giving away permanent-locals. Or haven't you heard? >> - Emulator mode buffer local variable. >> - Modified state buffer local variables. > > I lack context (or knowledge) to understand what you mean here. Don't be coy, he doesn't mean anything... Its vacuous. > >> I try to move this a bit forward by pointing to cases where a major >> mode local variable probably is seen by users more like something >> belonging to the buffer contents. > No you don't/didn't, you discuss your view of what the "user" wants as it relates to a relatively small realm of Emacs usage. > Yes, I understand, but I think here is where I disagree. A priori, I > don't know why margins would be related more to buffer contents than > to buffer mode. > >> Yes, of course mumamo can take care of these cases, but it comes at a cost. The fact is that it can't "take care of these cases". If it could you wouldn't persist in requesting ever more permanent-locals. The cost is essentially the rest of Emacs and Emacs users should yield to your perspective on Emacs functionality w/re to how well it can function with multiple major modes in a single buffer despite that most Emacs buffers _are not_ of this type. > > Making variables permanent buffer-local also has a cost. Surprise and > bugs, if the user or other modes weren't expecting it, for example. > This isn't a problem... just add more permanent-locals!!! >> (And it definitively can not be taken care of the way that was >> suggested in the answer you are commenting on.) Indeed. > > I trust you on this. I wouldn't. He has mis-interpreted the problem-space as being somehow constrained to the interaction of multiple major modes and a select set of buffer local variables. The reality is that the "problem" pervades all of Emacs. Though, when it is presented as such he punts. > But perhaps what is lacking is something at the Emacs API level. > Yes, real lexical-scoping. Also, symbol level namespacing would be nice :) > > What I mean is that making permanent buffer-local every variable that > mumamo needs so isn't necessarily the best answer. > It _is_ the best answer so long as no one objects to permanent local bloat. And Lennart has demonstrated that his readily able to employ Maslows hammer in this regards. http://en.wikipedia.org/wiki/Law_of_the_instrument Stem the tide. > Juanma > -- /s_P\