From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70049: 30.0.50; (server-running-p) in mode line freezes emacs Date: Thu, 28 Mar 2024 13:46:01 +0200 Message-ID: <8634sah952.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="757"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70049@debbugs.gnu.org To: "Pedro A. Aranda" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 12:47:48 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rpoEW-000AbU-Ja for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 12:47:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpoDw-0002Fi-Be; Thu, 28 Mar 2024 07:47:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpoDm-0002E3-G3 for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 07:47:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpoDm-0003iY-3R for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 07:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpoDm-00009k-H6 for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 07:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Mar 2024 11:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70049 X-GNU-PR-Package: emacs Original-Received: via spool by 70049-submit@debbugs.gnu.org id=B70049.1711626395501 (code B ref 70049); Thu, 28 Mar 2024 11:47:02 +0000 Original-Received: (at 70049) by debbugs.gnu.org; 28 Mar 2024 11:46:35 +0000 Original-Received: from localhost ([127.0.0.1]:39228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpoDL-00007y-EA for submit@debbugs.gnu.org; Thu, 28 Mar 2024 07:46:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpoDI-000079-Rf for 70049@debbugs.gnu.org; Thu, 28 Mar 2024 07:46:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpoDB-0003cT-25; Thu, 28 Mar 2024 07:46:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NF1r52Y9eV/A9v+QjMj4IKkyuvJbebDlT2VH0chnqg8=; b=aJFfShAclbqRWfLBDUQ8 YZABggQm023BhN2sUA38OAxecjeYR/fbuD/g4JDo/WyBTtpZWcppXR1/Ik1z/G3Sv7HoJiz3ea9gs qNIIVHlzx2jM0ljNzVmRlSijRcQBOu4T/YSQy7Elxx0JDnP+20F09mkfcrUNMx9Oub4p6J8XS+q2v 98eCvFeo49j1OBft7VXphKaphQRhpXa1dgiBz+OYuCapUPQ6zgA36RWM9gFxbNutd++FJ2rWl1xEH 1yH8e6dbN2iaUBswTc5Sako7S6UdEiTGcptN878VqOtFCZcgpTN+qfVUHVo+dtIBExhTmy7ByH0hN G/BkOiBeAV/qRg==; In-Reply-To: (paaguti@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282216 Archived-At: > Date: Thu, 28 Mar 2024 11:45:16 +0100 > From: "Pedro A. Aranda" > > 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.