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: RE: Auto Fill Comments Date: Tue, 1 Dec 2020 00:22:11 +0100 Message-ID: References: <87zh324fa9.fsf@web.de> <837dq5ordu.fsf@gnu.org> <871rgd6jzk.fsf@web.de> <87r1oclvkp.fsf@web.de> <87blffzq7f.fsf@web.de> <87wny2r1a1.fsf@web.de> <236fb79f-014c-412f-9c78-fd9c774a57fc@default> 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="35876"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 01 00:24:41 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 1kjsXA-0009DB-QF for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 00:24:40 +0100 Original-Received: from localhost ([::1]:38092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjsX9-00075s-JM for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 18:24:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjsUs-00075i-Op for help-gnu-emacs@gnu.org; Mon, 30 Nov 2020 18:22:18 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:45947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjsUq-0005ku-OD for help-gnu-emacs@gnu.org; Mon, 30 Nov 2020 18:22:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606778531; bh=oWSUdmX9WkLDi+jJENZ+vibnRu7Nb72Ss+mjggngdDk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=aftTgPpmY184g06Mt6EEOWAebfT9gKOPET/gwgFJmDdMIoS9mXjdGX7MIkBdwvr6H wBU2McMvZZmLCLHL5T93lrrtE/0yuxTNEa8g9rCzMiUiYN/lRZAKmvXPf8z5E8Im7m lxRYFfXrwvr9h6NUJKuMsubBABXIYYNFjevfuh2U= 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-bs05.server.lan [172.19.170.173]) (via HTTP); Tue, 1 Dec 2020 00:22:11 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <236fb79f-014c-412f-9c78-fd9c774a57fc@default> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:pcpWMzJrPLMAfSexEHaE912U1Tt9PaXs4r9kGBfZsiy5iaDPIbJA8VI457OYFeWxX1RSp c4X8uabSlw3pRwdx9EfBIQB97fkP8wDtGR7qDD1qPYpDqqV9yW3U1aj5req1r+NDFFgdd+leflL4 A7iIdLm/w4AdAUOtBypVwZ4YpPolhRT4g6gdHafvMb9NluAvpAyW8OTNBcnZrwN/kxk29SgGC7l8 atW7b5JkugfXhb1meymXEroDQGxYcFulMpmPo9LrhoFmX94t2YJSrZp25rNPdU4mqlx8WcXvKwhv iU= X-UI-Out-Filterresults: notjunk:1;V03:K0:o0v6r2qtvBs=:6JykCIKS6MG7Vva6cUVarw 44Pe45kDkX+lcjeFcmeHVNBrQvKyBx1YWO06mHYMcoVS7W06Y2+q7ojwDOyOaodlkZJOpuvk1 QMyPEz/nbVhYTUDM66aT+hgF2//MfzKyRXfCr+pyxk04i/h3q5P+FpPSpgdWL+73ztdwo21ef 7QDn5vCXBlhrlMt2DU7ZquS93bgmKXKvqDuRRdQXktQnhSE0roPYirA1Oc4fz22THBlNWgNux giId0PS8a4Fa4I+TFdFapWiRo2G386FravifymAgGeRAOuLEpqiX0e38eMCiZ+vWWAT+uKuK9 lY8aGwckH5d6LBM1m+HmwjXvdZWo79g/gujJhlX9+3ZT1fSvf7vja5lJVH4VsYSzAlY6HMVEz DJNQpgeNUE3lwvUhp6zecYxT59Mb/JD0Wp4q18TGF1GDbume4jHAiL0QhdtDECgr08P/WCtYH hmx3mYYSPeWS7JcOgyEU079Zfrpq8fPKuTapeyCRj1KawHb42uFvxNoMMz5QhS67dpkweB1HA MZKBvqaFVtVrg9G6dzrXBbptRVkW2IEEEeYQquPp+y1eoFaw5RLUa+EQ9+XWVGhSzEmms04Ao wwd9mK3DuwaSY= Received-SPF: pass client-ip=212.227.15.19; 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:125781 Archived-At: 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" > To: "Christopher Dimech" , "Michael Heerdegen" > 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. ;-) >