unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: help-gnu-emacs@gnu.org, Emanuel Berg <moasenwood@zoho.eu>
Subject: Re: Is there a way of setting a variable only when it exists?
Date: Tue, 15 Mar 2022 11:12:05 +0300	[thread overview]
Message-ID: <YjBKVTIBILry9sY4@protected.localdomain> (raw)
In-Reply-To: <878rtbveu1.fsf@mbork.pl>

* Marcin Borkowski <mbork@mbork.pl> [2022-03-15 10:45]:
> 
> On 2022-03-15, at 07:58, Jean Louis <bugs@gnu.support> wrote:
> 
> > * Marcin Borkowski <mbork@mbork.pl> [2022-03-15 09:28]:
> >> What if it's an internal Emacs variable which might become a user option
> >> one day (I submitted a bug report about it) and then my customization
> >> silently disappears?  It's the "silently" part I want to guard
> >> against...
> >
> > I am trying to understand:
> >
> > - what is user option?
> 
> It is defined in the Emacs manual.

,----
| User Option
|      A user option is a face (q.v.) or a variable (q.v.) that exists so
|      that you can customize Emacs by setting it to a new value.  *Note
|      Easy Customization::.
`----

Definition in glossary is incomplete, as one can fully understand it
only by reading Easy Customization:

> 49.1 Easy Customization Interface
> =================================

> Emacs has many “settings” which you can change.  Most settings are
> “customizable variables” (*note Variables::), which are also called
> “user options”. 

Thus what you mean are customizable variables.

> > Now, if variable becomes in future "user option" most probably your
> > settings will still be kept in place, your customization will not
> > silently disappear unless you delete it from your files.
> >
> > Did I understand it all well?
> 
> No.  If an internal variable (= one whose name contains two dashes)
> becomes a user option, its name will most probably change.

That is what you mean. That is harder to track. You would need to
watch NEWS, manual and `git log' to track such changes.

I am using database and I have some variables used in HTML templates
where by column variables_name has its name and variables_value has
the value. Though each variables has its unique ID. This enables the
possibility to change the variables_name to anything else, and still
retain the tracking to its original ID. Finding previous variable is
obtained by using rudimentary database backed version control system.
Though that is quite different concept, though very clear and
well structured.

Emacs does not have structured way to remember all variables ever
defined so to track them, then to track their previous names and so
on. 

One way to go would be by using recently included SQLite database in
Emacs Development version.

If every internal variable would get its unique ID in the SQLite
database, then renaming variable would be very easy, and its tracking
would become easier. Though it is a different concept that is not live
yet.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



  reply	other threads:[~2022-03-15  8:12 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14  6:00 Is there a way of setting a variable only when it exists? Marcin Borkowski
2022-03-14 12:52 ` Eli Zaretskii
2022-03-14 13:16 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-03-14 13:48   ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15  6:17     ` Marcin Borkowski
2022-03-15  6:50       ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15  6:58       ` Jean Louis
2022-03-15  7:45         ` Marcin Borkowski
2022-03-15  8:12           ` Jean Louis [this message]
2022-03-15  7:49         ` tomas
2022-03-15  8:13           ` Jean Louis
2022-03-15  8:36             ` tomas
2022-03-15  9:28               ` Jean Louis
2022-03-15 10:01                 ` tomas
2022-03-15 11:29                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15  8:14           ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15 15:33         ` [External] : " Drew Adams
2022-03-15 15:38       ` Drew Adams
2022-03-16 18:32         ` Marcin Borkowski
2022-03-16  0:47       ` Michael Heerdegen
2022-03-16 18:33         ` Marcin Borkowski
2022-03-16  6:02       ` Tomas Nordin
2022-03-16  6:37         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-16 18:34         ` Marcin Borkowski
2022-03-15  6:48     ` Jean Louis
2022-03-14 22:09 ` Michael Heerdegen
2022-03-15  6:16   ` Marcin Borkowski
2022-03-15  7:05     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-16  0:25     ` Michael Heerdegen
2022-03-16 18:33       ` Marcin Borkowski
2022-03-16 19:25         ` Michael Heerdegen
2022-03-18  5:58           ` Marcin Borkowski
2022-03-16 20:35         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-17 20:47           ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-03-18  5:59             ` Marcin Borkowski
2022-03-18 17:59           ` Jean Louis
2022-03-19  9:25             ` Emanuel Berg via Users list for the GNU Emacs text editor

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=YjBKVTIBILry9sY4@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@mbork.pl \
    --cc=moasenwood@zoho.eu \
    /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).