From: Christopher Dimech <dimech@gmx.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, help-gnu-emacs@gnu.org
Subject: Re: RE: Auto Fill Comments
Date: Tue, 1 Dec 2020 00:22:11 +0100 [thread overview]
Message-ID: <trinity-31af3932-f8e2-4bae-bbc2-bf4769eae923-1606778531017@3c-app-mailcom-bs05> (raw)
In-Reply-To: <236fb79f-014c-412f-9c78-fd9c774a57fc@default>
That's a great example. We can have a function that sets fill-column
as buffer-local and hook it to programming mode, c-mode say. That would
be a useful example. And users can try it out and see things work.
Yes, it is repeating and RTFM, but with a serious code example to excite
people to write actual code after the prose.
Thank you so very much.
Christopher
> Sent: Monday, November 30, 2020 at 11:45 PM
> From: "Drew Adams" <drew.adams@oracle.com>
> To: "Christopher Dimech" <dimech@gmx.com>, "Michael Heerdegen" <michael_heerdegen@web.de>
> Cc: help-gnu-emacs@gnu.org
> Subject: RE: Auto Fill Comments
>
> > I understand that local variables are meant for buffer customization
> > that
> > one uses most often in mode hooks. There has been some
> > misunderstanding.
> >
> > By not very good I meant: Can we have a typical example and how it
> > would look like.
> > I mean, rather than with foo, bar, a, g, temp, body. For instance,
> > making a command
> > for some particular mode buffer, and a brief description of what is
> > achieved. Apologies
> > should I not understand how hard that can be. Hope my comment helps
> > transmit what I mean
> > better.
>
> It doesn't get any more specific than this, IMO:
>
> `C-x f' aka `M-x set-fill-column'.
>
> Tada! Variable `fill-column' just got its value
> updated for the current buffer.
>
> `C-h f' tells you that that command sets var
> `fill-column'.
>
> Clicking that var name in *Help* then tells you
> that the var:
>
> Automatically becomes buffer-local when set.
> ^^^^^^^^^^^^^
>
> That is, this particular variable is ALWAYS
> buffer-local - its value is separate for each
> buffer.
>
> What does "automatically" mean here? It means
> that to make it buffer-local you don't need to
> do anything - you have no choice: it's
> buffer-local in every buffer.
>
> Why would that be the case for `fill-column'?
> Because we figure it makes sense to always give
> it a buffer-local value, that's all.
>
> You can set the _default_ value for all buffers
> using Customize (as the doc string tells you).
>
> E.g., customize `fill-column' to 71, and if
> nothing sets it to something different in a
> given buffer then it'll be 71.
>
> Most variables that might have buffer-local
> values in some buffers do NOT automatically
> become buffer-local in every buffer. That is,
> they are not "automatically" buffer-local.
>
> They become buffer-local for a given buffer
> only if something explicitly makes them
> buffer-local there, e.g., using function
> `make-local-variable'.
>
> To make a variable ALWAYS (i.e.,
> "automatically") be buffer-local (i.e., in
> all buffers) you use the stronger function
> `make-variable-buffer-local'. The doc strings
> (`C-h f') of those two functions tell you all
> of this.
>
> (`make-local-variable' might be more precisely
> named `give-var-a-separate-value-in-THIS-buffer'.)
>
> And yes (sigh), I'm just repeating what the
> help and doc say better. RTFM really is your
> friend, you know. ;-)
>
next prev parent reply other threads:[~2020-11-30 23:22 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
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 [this message]
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-31af3932-f8e2-4bae-bbc2-bf4769eae923-1606778531017@3c-app-mailcom-bs05 \
--to=dimech@gmx.com \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.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).