unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: 43919@debbugs.gnu.org
Subject: bug#43919: 27.1.50; Customize save may add (sort-fold-case t t)
Date: Sun, 11 Oct 2020 08:54:08 +0300	[thread overview]
Message-ID: <878scd48an.fsf@iki.fi> (raw)

[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]

This issue shows when initialization file has (custom-set-variables ...)
with sort-fold-case set, like this:

    (custom-set-variables
     '(sort-fold-case t))

Saving some other variable through the customize interface will add
additional "t" symbol to the sort-fold-case form:

    (custom-set-variables
     ;; Other variables...
     '(sort-fold-case t t))

Some other customize changes change the form back to (sort-fold-case t),
that is, with single "t" symbol.

Everything seems to be working but this behavior is harmful when Emacs
initialization files are in version control system (like Git) and
sort-fold-case variable keeps changing back and forth.

You can reproduce the bug with this recipe:

 1. Create ~/.emacs.el file with the following content (also attached
    file).

        (custom-set-variables
         '(sort-fold-case t))

 2. Start Emacs.

 3. Use customize interface to change and save some other variable, for
    example:

        M-x customize-variable RET show-trailing-whitespace RET

    Change variable's value to "t" and save it "for future sessions".

 4. Now the custom-set-variables form in ~/.emacs.el file looks like
    this:

        (custom-set-variables
         '(show-trailing-whitespace t)
         '(sort-fold-case t t))

    See the added "t" in sort-fold-case.


[-- Attachment #2: .emacs.el --]
[-- Type: application/emacs-lisp, Size: 519 bytes --]

             reply	other threads:[~2020-10-11  5:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11  5:54 Teemu Likonen [this message]
2020-10-11 13:04 ` bug#43919: 27.1.50; Customize save may add (sort-fold-case t t) Mauro Aranda
2020-10-13  1:32   ` Lars Ingebrigtsen

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=878scd48an.fsf@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=43919@debbugs.gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).