From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Proposal: `buffer-offer-save' be made a permanent-local Date: Mon, 14 Jun 2010 11:18:02 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1276507256 30164 80.91.229.12 (14 Jun 2010 09:20:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Jun 2010 09:20:56 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: MON KEY Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 14 11:20:54 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@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 1OO5oz-0001rh-6I for ged-emacs-devel@m.gmane.org; Mon, 14 Jun 2010 11:20:54 +0200 Original-Received: from localhost ([127.0.0.1]:56781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OO5ot-0006Zv-5w for ged-emacs-devel@m.gmane.org; Mon, 14 Jun 2010 05:19:03 -0400 Original-Received: from [140.186.70.92] (port=33583 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OO5oh-0006Um-Rr for emacs-devel@gnu.org; Mon, 14 Jun 2010 05:18:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OO5oF-0003CA-BV for emacs-devel@gnu.org; Mon, 14 Jun 2010 05:18:24 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:57342) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OO5oF-0003C3-7V for emacs-devel@gnu.org; Mon, 14 Jun 2010 05:18:23 -0400 Original-Received: by gwaa18 with SMTP id a18so2035678gwa.0 for ; Mon, 14 Jun 2010 02:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=UaC9V9IlXJ9tFovM7CzCdcys9AuiHbuYyTe2RN1c0go=; b=kj+othSVXQYRQKJq2BNwC7ZVYj86/ZFsvFqoXgviK8WAACxBkuEEsvIajS4Ky7q9pE YF+s7IAJNx6nKofFIhoAdj3yW+jt9M18YIZguypshy546duDsdglsjVIBns9WL3YO+41 jvzh6sQ7VEgQ9Ud3sarR8cp0IPsd0RgWO4TCQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=oD+vuIayPMm6bs72j0RWn/Xfe8/2RopHgwCT+SMJA+UT5y8O9RCvGgKtshssdPUX8N rhBjbd5y+lIHhVvAL2zNesmSmwgxbtuI8nsptrMNIq3UZft0AbKEmGdL5d6r21Iz85QW nBrq20oYCXax7q8VUaWw8hSksCaCGYgHkJFr8= Original-Received: by 10.100.244.9 with SMTP id r9mr4384513anh.131.1276507102157; Mon, 14 Jun 2010 02:18:22 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Mon, 14 Jun 2010 02:18:02 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125897 Archived-At: On Mon, Jun 14, 2010 at 10:48 AM, MON KEY wrote: > > In this thread below RMS establishes a clear recipe for how he > suggest to address exactly this sort of issue: > > ,---- > | =C2=A0Here's a possible implementation. > | > | =C2=A01. Put a property on hook variables to identify them for this > | =C2=A0special processing. > | > | =C2=A02. Put another property (as you suggested) on hook functions > | =C2=A0to indicate they should be preserved. > | > | =C2=A03. Now it is possible for kill-all-local-variables > | =C2=A0to identify hook variables, scan their local values, > | =C2=A0and preserve specific hooks. > `---- > =C2=A0http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg00366.html No. This is for a more complicated problem. It might be more easy to understand with a small picture. In this discussion we can think of variable scope versus buffers in a hierarchy like this: 1) * global variable values 2) ** buffer local variable that are permanently local 3) *** buffer local variable that are not permantly local 3, the lowest level are variables associated with major modes. If there are several major modes in a buffer those variable will change with the point in the buffer. 2 are the buffer level. Those variable are associated with the buffer instead of the major mode. If the major mode is changed the permanently local does not change. They never change with the point in the buffer. The situation that RMS tried to handle was when a hook variable was local and some members of it should be independent of the major mode, but not the whole list of variables in the hook. This is something in between 2 and 3 above. > | I think it is very unclean to dynamically change `permanent-local' > | properties. =C2=A0That's the sort of thing that we are sure to regret. That is what we are trying to avoid by making buffer-offer-save permanently local. > So, what is wrong with the solution RMS proposed. Nothing, but it does not fit here.