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 20:19:39 +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="21541"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 26 20:23:17 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 1kiMrM-0005Uj-Ob for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 20:23:16 +0100 Original-Received: from localhost ([::1]:58390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiMrL-0001cv-Fy for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 14:23:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiMo3-0001cX-K8 for help-gnu-emacs@gnu.org; Thu, 26 Nov 2020 14:19:51 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:57807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiMnz-0002S0-9K for help-gnu-emacs@gnu.org; Thu, 26 Nov 2020 14:19:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606418379; bh=+PKR7hhTtO3w86lf4Z3zIEDuahmnbcjizSWnF5oTh8o=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=HpA9pTaNt2+d5LGwpmdTLTMa99ny0gIZd6Bry3UpGuem26AvaWEcM0nBho2GbRy/Q IeY0QGxT3tkoW6XnV3U1Ryv+ck0kmO43a1t2mldKS0dHfnlh9H1CA9DpQ3EWIkN8OQ Y+i+5LBcmnN302cT6DP7kUGeYwc0KcT8gUOodwxQ= 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 20:19:39 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:Xc+aTPw0/8Wyw5FXUQcDSdQrws4Tp7eKUIfcTxY0gvQ0hr09EH57su9dQg/x0c/n828aE vaEPf/XvtUYIw4pQoznqqdFP7iWPFLRlrSU6p65YxCAGwdDHddHopG3GNnciPsY/3zOHmdkbt7rS TPu29/pdFz+orDLtATO9m64Q5iD+YDvA+mM9+xPNtjY7B5Jn74fyGiHqkdp15ONaAXVy/x5fMwLA L0cCz1VTEDuYTQSFnbi3ATm5N+k6LFrcYcFSgz0ljkBnBeHHVJmKLf++9hXueNQNKZdsVfeMsrK6 rs= X-UI-Out-Filterresults: notjunk:1;V03:K0:cv+mhcexBdc=:r/7CahEjI/lz2mXDqr9N+O NZsTnbskxLgqj3XqxqIQ0Zl3CrGw3uBhh9G7DklmAXlD8elDVo8cSnmRArDNhDJKQspcODrbQ JYsb5EJRrSDWntgfeYH0nVMdU6eK+NHNKnw0l8WQBbc5B9onmLiROn/5npbend99nvUOVpLSu aQKitz5axTSYV7pto+2sieOsbQYO55eecR2pHpXY6DGXCwKmThiIK/Qmjb6vIJBYLkVdNKIZU noR+bfeLrPyiUw4DNLqD5G2eFycUqXqTvONok2Dg8/diX56T8XG+q6t7d1Rbo6vDSCCF6Bxvq Hz72aOzy3uvSOBjhXc2gcczAgq4EAenirAp/oE7FXE4zbI5LLucXWw8Vgi0YGFVDkKKH7I28K NGEr88SPM4sNB6s1Ipzo1jcAIe9DKcwVAw8aZmiyLR7TyzJkMInq/FQMpV0haKeHg3spkOdkv j0Mh2L8IDkKfdqSjVncNJM6OnTfzFYYR6JcjonmXbnB0Kxy6O+RpULq7I5Vhgt3VQmDRajEiK 0U1ePwqDUoeSgMu0XOt3OjEkaEY/FPa+2saebJie+MLRVfRjY3Q4jSOLx61e3UQnVjDk2ZtQL joV6KOzUV7YXI= 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:125578 Archived-At: If I do (setq comment-auto-fill-only-comments t) but then change my mind and want to have auto fill for the whole buffer, what should I do? > Sent: Thursday, November 26, 2020 at 7:44 PM > From: "Christopher Dimech" > To: tomas@tuxteam.de > Cc: help-gnu-emacs@gnu.org > Subject: Re: Auto Fill Comments > > > 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/Variable= s.html#Variables > > For the lisp programmer: > > https://www.gnu.org/software/emacs/manual/html_node/elisp/Variable= s.html#Variables > > > > although you /should/ have those manuals with your Emacs installat= ion. > > This is preferrable, since they should correspond to your Emacs > > version. > > > > [2] https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer_0= 02dLocal-Variables.html#Buffer_002dLocal-Variables > > > >