all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: 66742@debbugs.gnu.org
Subject: bug#66742: 30.0.50; transient-mark-mode is not enabled after re-dumping Emacs
Date: Thu, 26 Oct 2023 11:11:38 +0200	[thread overview]
Message-ID: <m2msw53fzp.fsf@Pro.fritz.box> (raw)
In-Reply-To: <8734xz2guk.fsf@localhost> (Ihor Radchenko's message of "Wed, 25 Oct 2023 09:26:11 +0000")

Ihor Radchenko <yantar92@posteo.net> writes:

> Steps to reproduce:
>
> 1. ./src/emacs -Q --batch -l ~/Downloads/dump.el 
> With dump.el:
>
> (dump-emacs-portable "/tmp/emacs-dumped.dmp")
>
> 2. ./src/emacs -Q --dump-file="/tmp/emacs-dumped.dmp"
>
> 3. C-<SPC> C-p C-p
>
> Expected: active region is highlighted
> Observed: Transient mark mode is not enabled and thus active region is
>           not highlighted.

Just an analyis.

AFAICS, this one comes from a special handling of some custom variables.
In function command-line, we have

  ;; Re-evaluate predefined variables whose initial value depends on
  ;; the runtime context.  But delay the warning about
  ;; `user-emacs-directory' being inaccessible until after processing
  ;; the init file and the command-line arguments, in case the user
  ;; customized `user-emacs-directory-warning' to nil via those.
  (let ((user-emacs-directory-warning nil))
    (when (listp custom-delayed-init-variables)
      (mapc #'custom-reevaluate-setting
            ;; Initialize them in the same order they were loaded, in
            ;; case there are dependencies between them.
            (reverse custom-delayed-init-variables))))
  (setq custom-delayed-init-variables t)

The list of custom-delayed-init-variables is built by function
custom-initialize-delay. If you grep for that, you'll finds a number of
declarations containing an :initialize with the delaying function.

In a re-dumped Emacs, the variable is not a list, so nothing is done. In
the particular case of transient-mark-mode, the default value, which is
set in C, is nil, so it keeps that value.





  reply	other threads:[~2023-10-26  9:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25  9:26 bug#66742: 30.0.50; transient-mark-mode is not enabled after re-dumping Emacs Ihor Radchenko
2023-10-26  9:11 ` Gerd Möllmann [this message]
2023-10-26 11:42   ` Ihor Radchenko
2023-10-26 12:06     ` Eli Zaretskii
2023-10-26 12:44       ` Ihor Radchenko
2023-10-26 13:10         ` Eli Zaretskii
2023-10-26 13:15           ` Eli Zaretskii
2023-10-27  9:04             ` Ihor Radchenko
2023-10-27 10:37               ` Eli Zaretskii
2023-10-27 10:53                 ` Ihor Radchenko
2023-10-27 10:56                   ` Eli Zaretskii
2023-10-27 10:59                   ` Mauro Aranda
2023-10-27 11:08                     ` Ihor Radchenko
2023-10-26 13:25           ` Ihor Radchenko
2023-10-26 13:31             ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2msw53fzp.fsf@Pro.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=66742@debbugs.gnu.org \
    --cc=yantar92@posteo.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.