bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70049: 30.0.50; (server-running-p) in mode line freezes emacs


From: Pedro Andres Aranda Gutierrez
Subject: bug#70049: 30.0.50; (server-running-p) in mode line freezes emacs
Date: Thu, 28 Mar 2024 17:03:36 +0100

Hey,

When I say freeze, I mean it becomes irresponsive and does not respond to Ctrl-G and GNOME detects the situation, opening a 'force quit' dialog. It also happens in macOS, and there I can only force quit emacs. I've opened this bug, because there was something similar around putting a VC indicator in the mode-line. 

It might not be solvable, but at least I think it is worth discussing and documenting. Who knows if this could not end in a DONT-DO sort of document, which might also be of some merit and use.

Happy easter, /PA


On Thu, 28 Mar 2024 at 12:46, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Thu, 28 Mar 2024 11:45:16 +0100
> From: "Pedro A. Aranda" <paaguti@gmail.com>
>
> Place the following file as init.el in a directory (e.g. ~/.demacs.d)
>
>
> ---- cut here ----
> ;; Mode line settings
>
> (defun server-running-indicator()
>    (when (server-running-p) "S "))
> ;;  (unless (null server-process) "S "))
>
> ;; (setq-default mode-line-right-align-edge 'right-fringe)
> (setq-default mode-line-format
>                (list
>                       '(:eval (propertize (server-running-indicator)
>                                           'face 'mode-line-buffer-id))
>
>                       mode-line-modified
>                       " "
>                       mode-line-buffer-identification
>                       " "
>                       mode-line-position))
> ---- cut here ----
>
> run emacs as
> /usr/bin/emacs --init-directory ~/.demacs.d
>
> On the emacs window, click on the lower left corner and resize it with
> the mouse. No hangs are observed.
>
> Now, active server-mode with
> M-x server-mode
>
> Try again to resize the emacs window with the mouse. Emacs freezes.

I seem to be unable to reproduce this.

Does the freeze happen only if you resize the frame?  What if you just
drag the mode line to resize the window?

And when you say "freezes", does it mean Emacs uses 100% of a CPU's
execution unit, or does it mean it waits for something doing nothing?

Btw, in general, having arbitrary expressions in mode-line's :eval
form might definitely cause problems, since the mode line is called by
redisplay.


--
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet


reply via email to

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