From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [IDEA] Add function clean-buffer Date: Sat, 09 Sep 2023 10:00:42 +0300 Message-ID: <83o7ibvnj9.fsf@gnu.org> References: <87il8qx50p.fsf@breatheoutbreathe.in> <87ledm6i68.fsf@posteo.net> <87a5u0tmwd.fsf@breatheoutbreathe.in> <83cyyv342w.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25544"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, rms@gnu.org, emacs-devel@gnu.org, mail+gh@daniel-mendler.de To: Joseph Turner , Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 09 09:01:50 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qeryX-0006T1-OX for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Sep 2023 09:01:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qerxn-0008Gq-Dl; Sat, 09 Sep 2023 03:01:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qerxj-0008GR-Av for emacs-devel@gnu.org; Sat, 09 Sep 2023 03:00:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qerxh-00009s-GY; Sat, 09 Sep 2023 03:00:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sTbdqITzxHIb5kG40TrbKdybo7B9vhk4WTut3Wywd4c=; b=e7DZx2jG+/kA 5fyrE2q4wT1/7g/CO+WxE9vATMJyVeXtzOcwHn50sKrzba8nT/zEGc/je0p7y7+B8mtMEzN83T1xq BV/q+9AXEDY+2ZjX7N/L+jNEjG46ZBUQekCgWHpOUHc07a++6+TqV770a/lWIJPfTE5pYsssU8C8m EyVqfAWDcTFmv1l86S9cS1EWNrvujLK+HpG31CuOwklDbpUlCZA9vJDBcf47SLUFI2rJgwLWeDIXz LTdZPXyUI0Zs674Y1DYKn6q1Da/f9D+nHwLV9Rg2e66YrzFxJpoa30FPtIxMXEGEejuKPGsIxfCsj G+KNg7PZw614JL/MAxw9MQ==; In-Reply-To: (message from Joseph Turner on Fri, 08 Sep 2023 17:59:53 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310388 Archived-At: > Date: Fri, 08 Sep 2023 17:59:53 -0700 > From: Joseph Turner > CC: emacs-devel@gnu.org, mail+gh@daniel-mendler.de > > >Why make this command kill local variables? > >Most buffer-local variables come from the major mode. > >Is it really desirable to reliminate the major mode? > > > >Eliminating the major mode is what `fundamental-mode' does. > >Text properties are usually related to the major mode, > >often due to Font Lock mode. > > > >Should `fundamental-mode' eliminate text properties? Or perhaps only > >some text properties? > > > >Should `clean-buffer' eliminate only the text properties and overlays > >that do NOT come from the major mode? > > I'm also concerned that clean-buffer is too vague a function name, and so the scope of its behavior is not clear. I can see that some programs may want to "clean a buffer" by eliminating text properties and overlays but not killing local variables, whereas others may want to do all three and potentially something else. > > At this point, I'm open to letting this patch go ignored. Stefan, what is your view on this?