[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way of setting a variable only when it exists?

From: Jean Louis
Subject: Re: Is there a way of setting a variable only when it exists?
Date: Tue, 15 Mar 2022 11:12:05 +0300
User-agent: Mutt/2.2.0 (2022-02-12)

* Marcin Borkowski <> [2022-03-15 10:45]:
> On 2022-03-15, at 07:58, Jean Louis <> wrote:
> > * Marcin Borkowski <> [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

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


Take action in Free Software Foundation campaigns:

In support of Richard M. Stallman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]