From: Christopher Dimech <dimech@gmx.com>
To: tomas@tuxteam.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: Auto Fill Comments
Date: Thu, 26 Nov 2020 19:44:10 +0100 [thread overview]
Message-ID: <trinity-e374e86a-0c1e-4936-be3d-cceef6d0d436-1606416249978@3c-app-mailcom-bs06> (raw)
In-Reply-To: <20201126182734.GA5175@tuxteam.de>
> Sent: Thursday, November 26, 2020 at 7:27 PM
> From: tomas@tuxteam.de
> To: "Christopher Dimech" <dimech@gmx.com>
> 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 installation.
> This is preferrable, since they should correspond to your Emacs
> version.
>
> [2] https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer_002dLocal-Variables.html#Buffer_002dLocal-Variables
>
next prev parent reply other threads:[~2020-11-26 18:44 UTC|newest]
Thread overview: 155+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 17:05 Auto Fill Comments Christopher Dimech
2020-11-24 19:42 ` daniela-spit
2020-11-24 19:52 ` Christopher Dimech
2020-11-24 20:02 ` daniela-spit
2020-11-24 20:53 ` Christopher Dimech
2020-11-25 0:56 ` Christopher Dimech
2020-11-27 4:40 ` Dante Catalfamo
2020-11-27 4:56 ` Christopher Dimech
2020-11-27 5:47 ` Arthur Miller
2020-11-25 7:11 ` Robert Thorpe
2020-11-25 7:59 ` Christopher Dimech
2020-11-26 3:56 ` Christopher Dimech
2020-11-26 15:13 ` daniela-spit
2020-11-26 15:23 ` Christopher Dimech
2020-11-26 16:00 ` tomas
2020-11-26 17:22 ` Christopher Dimech
2020-11-26 17:35 ` daniela-spit
2020-11-26 18:27 ` tomas
2020-11-26 18:44 ` Christopher Dimech [this message]
2020-11-26 19:19 ` Christopher Dimech
2020-11-26 20:16 ` tomas
2020-11-26 20:29 ` Christopher Dimech
2020-11-26 20:44 ` Christopher Dimech
2020-11-26 21:14 ` Christopher Dimech
2020-11-26 21:51 ` Drew Adams
2020-11-27 0:47 ` Christopher Dimech
2020-11-27 1:57 ` arthur miller
2020-11-27 2:20 ` Christopher Dimech
2020-11-27 3:04 ` arthur miller
2020-11-27 3:46 ` Jean Louis
2020-11-27 6:27 ` Arthur Miller
2020-11-27 6:34 ` Christopher Dimech
2020-11-27 7:02 ` Arthur Miller
2020-11-27 7:15 ` Christopher Dimech
2020-11-27 7:29 ` Arthur Miller
2020-11-27 7:00 ` Jean Louis
2020-11-27 7:10 ` Christopher Dimech
2020-11-27 8:26 ` Arthur Miller
2020-11-27 13:26 ` Jean Louis
2020-11-27 7:33 ` Eli Zaretskii
2020-11-27 2:15 ` Drew Adams
2020-11-27 2:41 ` Christopher Dimech
2020-11-27 3:21 ` Drew Adams
2020-11-27 5:47 ` Jean Louis
2020-11-27 6:06 ` Christopher Dimech
2020-11-27 6:21 ` Jean Louis
2020-11-27 6:27 ` Christopher Dimech
2020-11-27 6:34 ` Jean Louis
2020-11-27 6:35 ` Arthur Miller
2020-11-27 3:32 ` Jean Louis
2020-11-27 5:32 ` Drew Adams
2020-11-27 6:02 ` Jean Louis
2020-11-27 7:28 ` Eli Zaretskii
2020-11-27 7:59 ` Christopher Dimech
2020-11-27 8:11 ` Robert Pluim
2020-11-27 9:07 ` Christopher Dimech
2020-11-27 8:25 ` Eli Zaretskii
2020-11-27 9:11 ` Christopher Dimech
2020-11-27 8:51 ` Arthur Miller
2020-11-27 9:23 ` Christopher Dimech
2020-11-27 13:44 ` Jean Louis
2020-11-27 16:02 ` tomas
2020-11-27 17:41 ` Christopher Dimech
2020-11-27 17:53 ` tomas
2020-11-27 18:07 ` Christopher Dimech
2020-11-27 18:45 ` Christopher Dimech
2020-11-27 21:16 ` tomas
2020-11-27 21:32 ` Christopher Dimech
2020-11-27 19:03 ` Arthur Miller
2020-11-27 19:39 ` Christopher Dimech
2020-11-27 21:26 ` Arthur Miller
2020-11-27 21:40 ` Christopher Dimech
2020-11-27 22:15 ` Michael Heerdegen
2020-11-27 22:38 ` Christopher Dimech
2020-11-28 1:06 ` Jean Louis
2020-11-28 1:24 ` Christopher Dimech
2020-11-27 22:55 ` Christopher Dimech
2020-11-28 1:08 ` Jean Louis
2020-11-28 1:45 ` Christopher Dimech
2020-11-28 2:54 ` Jean Louis
2020-11-28 7:46 ` Eli Zaretskii
2020-11-28 12:05 ` Christopher Dimech
2020-11-28 15:58 ` Andy Moreton
2020-11-28 16:15 ` Eli Zaretskii
2020-11-28 16:29 ` Christopher Dimech
2020-11-29 0:08 ` Arthur Miller
2020-11-29 0:21 ` Christopher Dimech
2020-11-29 0:25 ` Arthur Miller
2020-11-29 0:44 ` Christopher Dimech
2020-11-29 1:15 ` Michael Heerdegen
2020-11-29 2:24 ` Christopher Dimech
2020-11-29 2:56 ` Michael Heerdegen
2020-11-29 3:21 ` Christopher Dimech
2020-11-29 23:41 ` Michael Heerdegen
2020-11-30 0:06 ` Christopher Dimech
2020-11-30 1:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-30 1:49 ` Christopher Dimech
2020-11-30 2:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-30 8:58 ` tomas
2020-11-30 10:09 ` Christopher Dimech
2020-11-30 10:41 ` tomas
2020-11-30 11:47 ` Jean Louis
2020-11-30 12:43 ` Christopher Dimech
2020-11-30 2:38 ` Drew Adams
2020-11-30 3:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-01 18:47 ` Andreas Eder
2020-11-30 6:45 ` Jean Louis
2020-11-30 21:19 ` Michael Heerdegen
2020-11-30 22:14 ` Christopher Dimech
2020-11-30 22:26 ` tomas
2020-11-30 22:32 ` Stefan Monnier
2020-11-30 23:44 ` Christopher Dimech
2020-12-01 8:45 ` tomas
2020-11-30 22:45 ` Drew Adams
2020-11-30 23:22 ` Christopher Dimech
2020-12-01 8:42 ` tomas
2020-12-01 15:50 ` Christopher Dimech
2020-12-01 16:35 ` Jean Louis
2020-12-01 18:14 ` Christopher Dimech
2020-12-01 19:33 ` Michael Heerdegen
2020-12-01 19:56 ` Christopher Dimech
2020-12-01 21:42 ` Michael Heerdegen
2020-12-01 22:13 ` Christopher Dimech
2020-12-01 22:55 ` Christopher Dimech
2020-12-01 23:16 ` Michael Heerdegen
2020-12-01 23:27 ` Christopher Dimech
2020-12-02 4:49 ` Jean Louis
2020-12-01 16:07 ` Christopher Dimech
2020-11-30 23:12 ` Michael Heerdegen
2020-11-30 23:38 ` Christopher Dimech
2020-11-29 7:52 ` Yuri Khan
2020-11-29 18:43 ` Christopher Dimech
2020-11-28 12:08 ` Christopher Dimech
2020-11-28 7:33 ` Eli Zaretskii
2020-11-28 12:02 ` Christopher Dimech
2020-11-29 0:05 ` Arthur Miller
2020-11-27 19:06 ` Drew Adams
2020-11-27 19:43 ` Christopher Dimech
2020-11-27 16:25 ` Arthur Miller
2020-11-27 13:31 ` Jean Louis
2020-11-27 16:42 ` Arthur Miller
2020-11-27 17:00 ` Jean Louis
2020-11-27 17:54 ` Christopher Dimech
2020-11-27 18:40 ` Arthur Miller
2020-11-27 18:47 ` Christopher Dimech
2020-11-27 18:30 ` Arthur Miller
2020-11-27 8:48 ` tomas
2020-11-27 13:27 ` Jean Louis
2020-11-27 14:20 ` Stefan Monnier
2020-11-26 20:45 ` Stefan Monnier
2020-11-26 20:45 ` Stefan Monnier
[not found] <<trinity-3a306896-e4f9-4747-b475-4220d2926968-1606237554995@3c-app-mailcom-bs16>
[not found] ` <<87pn419aha.fsf@robertthorpeconsulting.com>
[not found] ` <<trinity-60beb4e8-9aad-4720-921c-26bcd854bea8-1606291146852@3c-app-mailcom-bs13>
[not found] ` <<trinity-bd917da6-8593-496f-ad5d-e94bd80ab4d1-1606362968280@3c-app-mailcom-bs15>
[not found] ` <<trinity-ecec5438-da9c-4746-9cdd-e73d756d9733-1606403627268@3c-app-mailcom-bs15>
[not found] ` <<trinity-5525c10b-09da-40b7-a9d8-ad6d12d86a62-1606404187770@3c-app-mailcom-bs15>
[not found] ` <<20201126160013.GD28931@tuxteam.de>
[not found] ` <<trinity-0fef3278-2e4b-4baa-a18e-44d71359e02c-1606411346268@3c-app-mailcom-bs06>
[not found] ` <<20201126182734.GA5175@tuxteam.de>
[not found] ` <<trinity-e374e86a-0c1e-4936-be3d-cceef6d0d436-1606416249978@3c-app-mailcom-bs06>
[not found] ` <<54331aa0-6a9a-4809-9f2d-88deee31558b@default>
[not found] ` <<trinity-878f6b95-e9e7-4431-959d-bbf323277c4c-1606438028794@3c-app-mailcom-bs06>
[not found] ` <<AM0PR06MB65775932B66B36CFDBB1813696F80@AM0PR06MB6577.eurprd06.prod.outlook.com>
[not found] ` <<83o8jjp83z.fsf@gnu.org>
2020-11-27 17:51 ` Drew Adams
2020-11-27 18:00 ` Jean Louis
2020-11-27 19:00 ` Drew Adams
2020-11-28 0:59 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-e374e86a-0c1e-4936-be3d-cceef6d0d436-1606416249978@3c-app-mailcom-bs06 \
--to=dimech@gmx.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tomas@tuxteam.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).