From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Auto Fill Comments Date: Thu, 26 Nov 2020 19:44:10 +0100 Message-ID: References: <87pn419aha.fsf@robertthorpeconsulting.com> <20201126160013.GD28931@tuxteam.de> <20201126182734.GA5175@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24006"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 26 19:46:50 2020 Return-path: Envelope-to: geh-help-gnu-emacs@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 1kiMI6-00067w-7z for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 19:46:50 +0100 Original-Received: from localhost ([::1]:38472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiMI5-0008Di-2P for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 13:46:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiMFg-0008DO-74 for help-gnu-emacs@gnu.org; Thu, 26 Nov 2020 13:44:20 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:56411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiMFe-0007PK-0u for help-gnu-emacs@gnu.org; Thu, 26 Nov 2020 13:44:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606416250; bh=tgpgdApSVZTxRo8tph94yQhz0tp/TbWK9RhCbHW5v/8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=NQQ5bwE4Q+KnW03SuRqUXOuhbnBPjI3YsYYKL+LB4y+lLvukQ38mx4xdg+aHYySSK MiOizRxHMgxf/7CWZlOohKeZC4zc3wPbPeoLK4ZLGh1ihtGW0dqNn4dKNpac1OKMbW yUOI6x7Pr4cyjHj7ywY+3NbD8jndZrJFMH22/H1c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs06.server.lan [172.19.170.174]) (via HTTP); Thu, 26 Nov 2020 19:44:10 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <20201126182734.GA5175@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:g1iY1KXBdkEAzk2xWNf924EWw/sH0ymFqJ9iB7yzXSUCpSlgJKzfYfmRqhXP4AdWKhFd7 VPzLZHhksQ9pHztKVojHJ8AEtEOCzAN+VGTDVVQXWfkHZbgY7DBQUzgC2DpF0WBpR7+suZSrWzWw 2vp/uUHyDPxcPxTMEviUg1VHxmpwi7/DdjtcluiPN7kKrLVdVEqbN6T3QrSsrUBUSdSEcMSoqdcQ f9/aiFmY5mAimMtJ0+aQ54g+886iXPLkRfIL2tMEvnxBVdDrkWdUvGHnEYJ0XuwVYMU5sKAnGzCQ xM= X-UI-Out-Filterresults: notjunk:1;V03:K0:moKztaHoH9g=:MQPh3MJSVb66KlnGetRu+0 a+j4PffTfwFuKONFIke6v9upj7d/cKzcqcWjuOsV2L0t8GAB0SGIjt/MulNEgT7moe7iJSY1X vKabnRFgAKRooNMkIKeQQXYjtRAf5O1SDZlQF1SCpxqlBm3Y8cBpsXFmK+SIVaUm0UFvWcW8J mqNXG5re200nPxEZwWuzqUMY8r2olwm+eFhYgTpqJbx9uxlMrRLYBYCXVD+LJvA9F5Q0tZzlM DW4/z0lwbRz5j/a8F3tDIuWioCZQJ0SgzjSqAkgA2i4E1+UPgeO2uQeXSMFnZZ5FJx/7UBAiF R4e86JiVkbI6y/hQT6dU9T6hwOx1Pv3oAhXzJ3FvagGwfTGoIU5ZbBscl4QOba0yyJHT2wCg+ QwWunTLlDaDsxu8uWmQNmrEFqw1zgexZtszG3YYyS3UhvOgF3FSk9wnOD18zPYVOAcLqAtfob znObJKCR3U4dwTvNwuThZAf5XcIeHPtTBRtMHgYUdpg7y97iOFaB9e1KTMmmVC1uKoE/VDB2T 42de4uYNP3LChbInZJ+kzm8Qbzt7uVsItFSCcJH6N/cAZcvmLhTvfHmorOIeJND71dHHe2D6r VFHGKD5g3v9Hc= Received-SPF: pass client-ip=212.227.15.18; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125575 Archived-At: > Sent: Thursday, November 26, 2020 at 7:27 PM > From: tomas@tuxteam.de > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu.org > Subject: Re: Auto Fill Comments > > On Thu, Nov 26, 2020 at 06:22:26PM +0100, Christopher Dimech wrote: > > [...] > > > Does that mean that setq-default also enables automatic filling? > > > > I need some explanation about setq, setq-default, and set-local. > > You should skim the manual's "Variables" section [1] > > In a nutshell, variables are a way to attach a value to a > name. In Emacs, there are different kinds of variables. > For our current purposes, we consider global variables > and buffer-local variables (there are more!). > > A global variable is seen from everywhere. If you set its > value while in buffer A, this change will be seen in every > other buffer. > > Buffer-local variables can have one value per-buffer. It > shadows the global variable (if there's any with the same > name). Most mode things are buffer local. The `fill-column' > is one example. You might want different values for it > in different buffers (say, you're editing two sources with > different styles in one session), that's why it is set up > as a buffer-local variable. > > So if you do (setq fill-column 72) in the context of buffer > A, only buffer A gets to see that. Had thought that setq was actually a global thing, not local. For local variables I was using "let" and "let*", but that seems a wrong understanding. > Setq-local (not set-local, as you wrote) is just a convenience, > which makes the named variables buffer-local and sets their > values (thus leaving possibly like-named global variables > alone). > > The setq-default is for setting one or more buffer-local > variables's default values. > > The gory details are in the Elisp manual [3]. There's also > an explanation for setq-default which is much better than > I could come up with here. > > Cheers > > [1] Online here: > For the user: > https://www.gnu.org/software/emacs/manual/html_node/emacs/Variables.= html#Variables > For the lisp programmer: > https://www.gnu.org/software/emacs/manual/html_node/elisp/Variables.= html#Variables > > although you /should/ have those manuals with your Emacs installatio= n. > This is preferrable, since they should correspond to your Emacs > version. > > [2] https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer_002= dLocal-Variables.html#Buffer_002dLocal-Variables >