From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: RE: [External] : The operation of default-value Date: Thu, 01 Dec 2022 23:35:33 +0000 Message-ID: References: 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="12270"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "'Help-Gnu-Emacs (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 Fri Dec 02 00:36:19 2022 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 1p0t6J-0002xF-B5 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 00:36:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0t5q-0005Pw-3E; Thu, 01 Dec 2022 18:35:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0t5n-0005Pa-SR for help-gnu-emacs@gnu.org; Thu, 01 Dec 2022 18:35:48 -0500 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0t5g-0004mg-4D for help-gnu-emacs@gnu.org; Thu, 01 Dec 2022 18:35:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1669937737; x=1670196937; bh=c0bF/RO0Jzc0Nb25rlfOFuGMnyHppwf3hyIePWGg0TU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=cjKVZ3noPF92dQR5LxnikYnex6vjdjBPR5rmVKlF6I0Ti05uGV0TOYJoZjCn27ait 56mQPwJBXPid2uoqidpuL/mtWyPuIi1C7raHw2PtHq9l/k9PlInWKk44KTnXE/Kjzq BT4ctI+mpOWQHfCruNWS2Sxb3Csx2SY4mahwPQxmTeh2VfNOSI2CLBW2/KMw0+l7vg 48p1OmrzNtsQTxibMt9EB4+k6rZ+v5TksbQIxIMmbDTTK/ZyuBfFqZguzyNKOkwQyl DLA+bNTkM+nUJN8ZrpexgJ9naHYAcj0zbMyQacmKEgc994egWfO1yCo2Ka7SbOHvqs I21JS3xGCRwzg== In-Reply-To: Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.43.25; envelope-from=heimeborgia@protonmail.com; helo=mail-4325.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141291 Archived-At: ------- Original Message ------- On Thursday, December 1st, 2022 at 11:16 PM, Drew Adams wrote: > > The documentation states that > >=20 > > "This is the value that is seen in buffers that > > do not have their own values for this variable. > > The default value is meaningful for variables > > with local bindings in certain buffers." >=20 >=20 > Good to see you are looking at the doc now! >=20 > Did you read the nodes previous to that one, > in the same chapter (Buffer-Local Variables)? > I think they answer your questions. >=20 > > When do buffer variables have their own values, > > and when do they not have them? >=20 >=20 > I think node `Creating Buffer-Local' explains this. >=20 > If you don't create/set a buffer-local value in > buffer A for a variable then its global, "default" > value applies in buffer A. It's as simple as that. Meaning that a package can change the buffer-local variable, with the default-value being different. Thusly, the variable used in the buffer is either the default value when the local value is nil, or the local value when they differ. Meaning that I cannot rely completely on default-value, because the local value might be set up differently. =20 > > How can one figure out what has been set or not (whether buffers have > > variable values or not)?. >=20 >=20 > Check whether (buffer-local-value THE-VAR) is the > same as (default-value THE-VAR). >=20 > Again, this is explained in the node that precedes > the node you quoted from. >=20 > I suggest starting at the beginning of chapter > Buffer-Local Variables, and reading from there.