From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 10:29:28 2017 Received: (at submit) by debbugs.gnu.org; 3 Jun 2017 14:29:28 +0000 Received: from localhost ([127.0.0.1]:53978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHA3U-0000aZ-IL for submit@debbugs.gnu.org; Sat, 03 Jun 2017 10:29:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHA3T-0000aL-3d for submit@debbugs.gnu.org; Sat, 03 Jun 2017 10:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHA3M-0008Oz-Nj for submit@debbugs.gnu.org; Sat, 03 Jun 2017 10:29:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHA3M-0008Oq-Jy for submit@debbugs.gnu.org; Sat, 03 Jun 2017 10:29:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHA3L-0001bs-5z for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 10:29:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHA3I-0008Ly-0M for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 10:29:19 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:33147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHA3H-0008Ks-Pv for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 10:29:15 -0400 Received: by mail-wr0-x242.google.com with SMTP id v104so3596951wrb.0 for ; Sat, 03 Jun 2017 07:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=R5S8CkhMLheQUm5cIdGY3BG7E5w1At3Naw3ZWGkcHv0=; b=sNMF/73taIEdEE2XlrasifkqH0S0WvJ9/lV7BF0IUumMCM/pMxGXZbqjhUxXorQ0+F EMuZQS7qXEznpb044MbRExz9+9q5ypWb1XES9MFgvXYiWCWikQxW60+gW60vWN4Vd0eJ Pn/0fJEOp4t4dhs4hG+a2jbvaO3gICV3uMxHUTlXS4DEq67jTgXKkFfSVvamo+C5pMN7 Vq4k1ATJv6BVW1SY0kSxceEmoBRlO55iFWuhmDHix07D+rhgftiWb5u0qNQAy/K6fVku sVgzNFKZbZGoZVvbvGADJM0XMSu1D1NDqIE5Gvr35D/YxkRYlOEkKjNc/zSd4y4g3hy6 s3rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=R5S8CkhMLheQUm5cIdGY3BG7E5w1At3Naw3ZWGkcHv0=; b=D+SFKFLmIL+rHXSxvdwKg8J83/n5WMDQflz0domkTkP90Ecoz4h2rc1XByv1n3Uyo1 07rCGY6SFhurH17F8/AU8zWxXbhtKIBEwnhytNtT0h23TfY/KdGjMhtbGfOTsk0MuatU fzDXtTjRCQJSzDTfwoAorhnYWGzfIAGsAkNwO8Ghkr9V5Pzbr0gSoGZyfPAtfHBAHsH+ AoYNsDK6U5jUCnzx9GycwN2wrfYASNz0HsFlvbed0IYlmip42v9ytfZp7bvTMPE8p0eq zcIXIDC+eKdz0IlpHEGy4DcIiSkRIY62QXaNIiNAYw88iZJN0v2+BG3OcJi3FcfHjS/C B3ew== X-Gm-Message-State: AODbwcC2v0NbVDm9E6anpQ56vsy1wc7G0O+jOnOgbp9pbd96sMuWarbs l+sDFUDvmXiSMT5U X-Received: by 10.223.129.6 with SMTP id 6mr3988564wrm.104.1496500153104; Sat, 03 Jun 2017 07:29:13 -0700 (PDT) Received: from gmail.com ([196.203.31.130]) by smtp.gmail.com with ESMTPSA id 4sm30516986wry.31.2017.06.03.07.29.12 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Jun 2017 07:29:12 -0700 (PDT) Date: Sat, 3 Jun 2017 15:29:11 +0100 From: Pierre Neidhardt To: bug-gnu-emacs@gnu.org Subject: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on Message-ID: <20170603142911.GB7275@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.8.3 (2017-05-23) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) With the following init file: (desktop-save-mode 1) (global-linum-mode) I visit "/usr/share/emacs/25.2/lisp/loaddefs.el" and everything is fine. I save the desktop session with `desktop-save-in-desktop-dir' and kill Emacs. On next start, this displays in the terminal Warning: due to a long standing Gtk+ bug http://bugzilla.gnome.org/show_bug.cgi?id=85715 Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost. Using an Emacs configured with --with-x-toolkit=lucid does not have this problem. Note: file is write protected and Emacs hangs for minutes at least, possibly forever, becoming a CPU hog. I then have to kill Emacs. The corresponding buffer entry in .emacs.desktop is the following: ;; Buffer section -- buffers listed in same order as in buffer list: (desktop-create-buffer 208 "/usr/share/emacs/25.2/lisp/loaddefs.el" "loaddefs.el" 'emacs-lisp-mode '(linum-mode) 1 '(nil nil) t nil '((buffer-file-coding-system . utf-8-unix)) '((mark-ring nil))) If I remove the entry or if I disable linum-mode by commenting the corresponding line in the init file, Emacs can start properly. In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) of 2017-04-22 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Load-path shadows: None found. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 10:56:27 2017 Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 14:56:27 +0000 Received: from localhost ([127.0.0.1]:53988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHATb-00032C-4r for submit@debbugs.gnu.org; Sat, 03 Jun 2017 10:56:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHATZ-00031y-Ht for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 10:56:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHATP-0002Sx-8x for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 10:56:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHATP-0002Sn-4u; Sat, 03 Jun 2017 10:56:15 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2733 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dHATN-0005lJ-A7; Sat, 03 Jun 2017 10:56:14 -0400 Date: Sat, 03 Jun 2017 17:56:00 +0300 Message-Id: <83fufhaznj.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <20170603142911.GB7275@gmail.com> (message from Pierre Neidhardt on Sat, 3 Jun 2017 15:29:11 +0100) Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 3 Jun 2017 15:29:11 +0100 > From: Pierre Neidhardt > > With the following init file: > > (desktop-save-mode 1) > (global-linum-mode) > > I visit "/usr/share/emacs/25.2/lisp/loaddefs.el" and everything is fine. > I save the desktop session with `desktop-save-in-desktop-dir' and kill > Emacs. > > On next start, this displays in the terminal > > Warning: due to a long standing Gtk+ bug > http://bugzilla.gnome.org/show_bug.cgi?id=85715 > Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost. > Using an Emacs configured with --with-x-toolkit=lucid does not have this problem. > Note: file is write protected > > and Emacs hangs for minutes at least, possibly forever, becoming a CPU hog. I > then have to kill Emacs. Not reproducible here. I suspect some memory-related issue, similar to like bug#26952, since this is Arch Linux. Can you try building the Emacs master branch? If my guess is correct, this problem will not exist there. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 12:22:55 2017 Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 16:22:55 +0000 Received: from localhost ([127.0.0.1]:54023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHBpH-0006oS-Lg for submit@debbugs.gnu.org; Sat, 03 Jun 2017 12:22:55 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:32869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHBpE-0006oF-UC for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 12:22:53 -0400 Received: by mail-wr0-f193.google.com with SMTP id v104so3757046wrb.0 for <27210@debbugs.gnu.org>; Sat, 03 Jun 2017 09:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZK4El5YoKChq9fcJ3JkLKX6fMAWxEObAXN33eUrCHek=; b=RK6XwrX8OuokrFLIforl0w5htR4F7UJeshlFrkaQkg1f9neDhZ39K5M9K8zH/mXrDO 55AzLBSsDQ+HC1QQouBrlTY/CXbDa9/pG1xkjWcUmJsyhiRfIAmhbLwQM6b7I9yr+LfC +zr/hkegMe/7ytbkvSK6juz17sqjgfGmIInEo+QSe+8qQehP0b6M0rask5jSJFXFTmiL QDhx4Jj+GDbx4WOxC0ACrB66jGqeaREakeLF/ZS1Fype72raCZae6aZsHm1GDTK1NcX5 BstrEWaG1B0WudzlpZzF1ByEOy/SP3YxUlWRr+lL5HjaQeb8rAwBcAFlAwS3eqVpex0c msIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZK4El5YoKChq9fcJ3JkLKX6fMAWxEObAXN33eUrCHek=; b=EttTi6xmJGRwWveV5ebCUzmB/6Artfvs6czY7mnxy1ZokN8pw0uHGkJZeMsAK3e0zK 9XlKc7x1xmLqz59mF6lhr2MLyxtLZrp/NDsR+QrDYP/lkMUyAW9IGvqVlR5vvKu67IQv 2OAy7sZbppU/ojUb3U34JR4XkUBHP9Mc+QtcKgUZGsRmpRXFyR1BJ/YNxmJ/oKmobFtM +4WOTrdSS8yxk3CerqnrJG3pHzi+3EhRT6YEN7l9c2tyoiI89tRkC+T5lcD9BK1W9scS saZaZ5y28BiJI5tSUTYM62JTIzi+5Rj7I08TV6gmOMbC03XrZ3kezibekSyKS87iVp33 oaFw== X-Gm-Message-State: AODbwcB7f50ior+nH6SJYlLao6/6vle7i4RY1U5Gr8SPbdi0rZhMR0TY dHecBjaRs4tRuA== X-Received: by 10.223.147.33 with SMTP id 30mr8473238wro.103.1496506966814; Sat, 03 Jun 2017 09:22:46 -0700 (PDT) Received: from gmail.com ([196.203.31.130]) by smtp.gmail.com with ESMTPSA id n2sm4941987wmd.16.2017.06.03.09.22.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Jun 2017 09:22:46 -0700 (PDT) Date: Sat, 3 Jun 2017 17:22:44 +0100 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on Message-ID: <20170603162244.GD7275@gmail.com> References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83fufhaznj.fsf@gnu.org> X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 17-06-03 17:56:00, Eli Zaretskii wrote: > > Date: Sat, 3 Jun 2017 15:29:11 +0100 > > From: Pierre Neidhardt > > > > With the following init file: > > > > (desktop-save-mode 1) > > (global-linum-mode) > > > > I visit "/usr/share/emacs/25.2/lisp/loaddefs.el" and everything is fine. > > I save the desktop session with `desktop-save-in-desktop-dir' and kill > > Emacs. > > > > On next start, this displays in the terminal > > > > Warning: due to a long standing Gtk+ bug > > http://bugzilla.gnome.org/show_bug.cgi?id=85715 > > Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost. > > Using an Emacs configured with --with-x-toolkit=lucid does not have this problem. > > Note: file is write protected > > > > and Emacs hangs for minutes at least, possibly forever, becoming a CPU hog. I > > then have to kill Emacs. > > Not reproducible here. I suspect some memory-related issue, similar > to like bug#26952, since this is Arch Linux. bug#26952 is on Debian, or am I missing something? Memory-wise, it keeps growing indeed, albeit at a very slow pace. Running for a minute it barely ate 1MB more. > Can you try building the Emacs master branch? If my guess is correct, > this problem will not exist there. I just did and the issue is still there. I am sorry I forgot to mention that the issue only happens when running `emacs --daemon`. -- Pierre Neidhardt From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 13:42:18 2017 Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 17:42:18 +0000 Received: from localhost ([127.0.0.1]:54076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHD44-0000Az-9B for submit@debbugs.gnu.org; Sat, 03 Jun 2017 13:42:16 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:36852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHD42-0000Af-Ku; Sat, 03 Jun 2017 13:42:14 -0400 Received: by mail-it0-f41.google.com with SMTP id m47so31847538iti.1; Sat, 03 Jun 2017 10:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=facTOYzunSnH1Lrf01yJn8AkwV/P++PT+r5/oxp5UPY=; b=dXMtb5NzqTaqsa5GRzCh1+7HgZcQwvrGyaqX/0BUikIz2q16dHu/r1brdMac1xCyc7 h1SjT2SOpOT/CFEzARwr5KORZVwNDmi2CBZItMPSF3Q+JIqDgTKrPhTd4muDJz141S1y UnPSgbqwum64u3XPHJIwkfpLvpwDdGLxqnhBvJ7ZzzwXc+/CwksDITTeGtP07wjOSDS7 4JXemT5XFgovm746iNbB4LjU1wDnUebWaGVmpRPi/r7AiOYtlhOLEFJpNS3unoarnj7m rHyMa9BMpJ57oq9qcspaFr1sXMtcW8DjFp/UPEw5pbjP4L3zXtUX+e44NdSec5wEwSc8 Be/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=facTOYzunSnH1Lrf01yJn8AkwV/P++PT+r5/oxp5UPY=; b=Y8ZtzqJRdYCRfCIkuDADnUl11piVgUUJnbIuzO20DIRyZH9PcVkBuCCuM+UCnfizC4 tv6zCbOoHYFFPVQK4Ne+EkozXgj4gZI5CoD29mMYBkWff7mfDyH4GXZ0Yy3zCsBaXpdv 4bMvIv3CWsxZHcV0xSgHYEtqIGUvmak1ZAnbJEvXV/fKKgCSTQnPeF1KH841PYrLzC1b TAYlvC7I5h6NkDEWtL0qnadMZO7TM9gQtafvA8PqYlz46TbMY5SJxjySnll3nP6qibrK LNTcauF61sAUsnkYCyPOFicjNBs4L/8sBpKhUlvPdARhD013Xr47caIYMI4Tfu7oLRnS 2lig== X-Gm-Message-State: AODbwcBt6F0exoZpDqTgHXXJCvMcsbLzdX9w6erHN7UgGlRyV3sse4IX wUMzfURkboeGYHg3 X-Received: by 10.107.173.73 with SMTP id w70mr3152678ioe.135.1496511728767; Sat, 03 Jun 2017 10:42:08 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id w70sm2708891itb.18.2017.06.03.10.42.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Jun 2017 10:42:07 -0700 (PDT) From: npostavs@users.sourceforge.net To: Pierre Neidhardt Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> Date: Sat, 03 Jun 2017 13:43:45 -0400 In-Reply-To: <20170603162244.GD7275@gmail.com> (Pierre Neidhardt's message of "Sat, 3 Jun 2017 17:22:44 +0100") Message-ID: <87a85p0xwu.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 27210 confirmed quit Pierre Neidhardt writes: > On 17-06-03 17:56:00, Eli Zaretskii wrote: >> > >> > With the following init file: >> > >> > (desktop-save-mode 1) >> > (global-linum-mode) >> > >> > I visit "/usr/share/emacs/25.2/lisp/loaddefs.el" and everything is fine. >> > I save the desktop session with `desktop-save-in-desktop-dir' and kill >> > Emacs. [...] >> > and Emacs hangs for minutes at least, possibly forever, becoming a CPU hog. I >> > then have to kill Emacs. > >> Can you try building the Emacs master branch? If my guess is correct, >> this problem will not exist there. > > I just did and the issue is still there. > > I am sorry I forgot to mention that the issue only happens when running `emacs --daemon`. I can reproduce this, the problem seems to be that window-start and window-end give the same answers as point-min and point-max respectively when in daemon mode. This causes linum-update-window to make overlays for every line in the buffer. (defun linum-update-window (win) "Update line numbers for the portion visible in window WIN." (goto-char (window-start win)) (let ((line (line-number-at-pos)) (limit (window-end win t)) [...] ;; Create an overlay (or reuse an existing one) for each ;; line visible in this window, if necessary. (while (and (not (eobp)) (< (point) limit)) (gdb) p current_buffer->name_ $11 = XIL(0x2ecd214) (gdb) xpr Lisp_String $12 = (struct Lisp_String *) 0x2ecd210 "loaddefs.el" (gdb) n 1614 buf = w->contents; (gdb) 1615 CHECK_BUFFER (buf); (gdb) 1616 b = XBUFFER (buf); (gdb) 1618 if (! NILP (update) (gdb) 1619 && (windows_or_buffers_changed (gdb) 1628 && !(noninteractive || FRAME_INITIAL_P (WINDOW_XFRAME (w)))) (gdb) 1662 XSETINT (value, BUF_Z (b) - w->window_end_pos); (gdb) 1664 return value; (gdb) p value $13 = make_number(1203513) (gdb) xbacktrace "window-end" (0xffff74f0) "linum-update-window" (0xffff7d68) "mapc" (0xffff7f88) "linum-update" (0xffff86d0) "linum-after-scroll" (0xffff8ec8) "set-window-buffer" (0xffff9130) "switch-to-buffer" (0xffff98e0) "desktop-restore-file-buffer" (0xffffa0f0) "desktop-create-buffer" (0xffffa930) "eval-buffer" (0xffffae80) "load-with-code-conversion" (0xffffb698) "load" (0xffffbac8) "desktop-read" (0xffffc370) 0x1510fd0 PVEC_COMPILED "run-hooks" (0xffffccd0) "command-line" (0xffffdb48) "normal-top-level" (0xffffe3c0) From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 14:03:36 2017 Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 18:03:36 +0000 Received: from localhost ([127.0.0.1]:54096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDOi-0002UI-6N for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:03:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDOg-0002U4-K8 for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 14:03:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHDOX-0007t7-Gi for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 14:03:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHDOX-0007sy-Dq; Sat, 03 Jun 2017 14:03:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2946 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dHDOV-00032K-5a; Sat, 03 Jun 2017 14:03:24 -0400 Date: Sat, 03 Jun 2017 21:02:58 +0300 Message-Id: <83efv1aqzx.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87a85p0xwu.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> <87a85p0xwu.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: npostavs@users.sourceforge.net > Cc: Eli Zaretskii , 27210@debbugs.gnu.org > Date: Sat, 03 Jun 2017 13:43:45 -0400 > > I can reproduce this, the problem seems to be that window-start and > window-end give the same answers as point-min and point-max respectively > when in daemon mode. This causes linum-update-window to make overlays > for every line in the buffer. So you are saying this just takes a lot of time, but will eventually end? If so, what is the bug here? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 14:39:20 2017 Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 18:39:20 +0000 Received: from localhost ([127.0.0.1]:54132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDxI-0003Jw-4R for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:39:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDxH-0003Jl-7k for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 14:39:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHDxB-0001PX-9l for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 14:39:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHDx5-0001Gp-9q; Sat, 03 Jun 2017 14:39:07 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2971 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dHDx3-0005qT-Le; Sat, 03 Jun 2017 14:39:06 -0400 Date: Sat, 03 Jun 2017 21:38:43 +0300 Message-Id: <83d1akc3ws.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <83efv1aqzx.fsf@gnu.org> (message from Eli Zaretskii on Sat, 03 Jun 2017 21:02:58 +0300) Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> <87a85p0xwu.fsf@users.sourceforge.net> <83efv1aqzx.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 03 Jun 2017 21:02:58 +0300 > From: Eli Zaretskii > Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com > > > I can reproduce this, the problem seems to be that window-start and > > window-end give the same answers as point-min and point-max respectively > > when in daemon mode. This causes linum-update-window to make overlays > > for every line in the buffer. > > So you are saying this just takes a lot of time, but will eventually > end? If so, what is the bug here? Or maybe we should do the below? diff --git a/lisp/linum.el b/lisp/linum.el index 8baa263..06165f2 100644 --- a/lisp/linum.el +++ b/lisp/linum.el @@ -112,7 +112,8 @@ linum-mode (define-globalized-minor-mode global-linum-mode linum-mode linum-on) (defun linum-on () - (unless (minibufferp) + (unless (or (minibufferp) + (and (daemonp) (null (frame-parameter nil 'client)))) (linum-mode 1))) (defun linum-delete-overlays () From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 15:52:39 2017 Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 19:52:39 +0000 Received: from localhost ([127.0.0.1]:54167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHF6E-0004xj-Vp for submit@debbugs.gnu.org; Sat, 03 Jun 2017 15:52:39 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:33941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHF6D-0004xX-Gr for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 15:52:37 -0400 Received: by mail-it0-f68.google.com with SMTP id d68so16406995ita.1 for <27210@debbugs.gnu.org>; Sat, 03 Jun 2017 12:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=BgAmFvEjG5PEYwi7rKJ8ae0E5Zbm9r56YdZcO2aEKZQ=; b=GUD3zDQFmxgE88UCiTk+wzFYrTn+19XB2nMMIEcYrcSOAe9TcltTo5y+RfR7UiXtAw z+T0f8d67LdYVLi7fR/dQkeDMHMg1hB/hHhaTTRMPvam1oZpUG4IWiQjLa0qpkEDVtO5 qJLZr+tbLm0UaZMTIXgv7/yh4LFnftqAyed3Y8jFT3TN0vnWmZ4fh29qpkv2JBFVRDoM HlQjRZF/avEDc/k8ZV4ElXPrl/8o2CDPBiz8XNmK0Y8i5hn8u1QAVNWmnBDZHrQaQPcj lcMRq+j0AkLyTo5YkgLZ13jdtlgOsqe8DodiF0/9KtrJ7ICZtB2i4wh5g+RQcl1acrWP onMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=BgAmFvEjG5PEYwi7rKJ8ae0E5Zbm9r56YdZcO2aEKZQ=; b=ivvMgc7qaMneCx6fONGbQ8FWl7eUnRi1//j1/jpCEFDUdI72UZYlnYDaXrCN5Cemym i/TpjKrVH2v60oYWkhtKfHJQut0HsQfoWiW3emjQ81klXqHnM1J34/DRgbWE70mlmDUI 3e8FJEKPdbmyH9mT8wauarsTV6O7nL++YCAKs3Nw8Oq9EA51eySXJopE0LRqTsSlOqCA ysGHnQ4OrHQfKfXx1e88oHq9bPqe2vTCAVaQA7XzyylJx/4j/IZI+kUKBp35ef+MbUEm 2Chyc+KcFMUsn9FL/IdQSZFm3cUnhKNjZAByeWUgQJSI7PQk6WwSszbAKo4D0FOTFEXs iWeg== X-Gm-Message-State: AODbwcBX6Hq3PxJaCnNaupvDvdWsCvPmOw9jV3tM/oIffGD+vLBr5s0L 50RV5+UOotjgfw== X-Received: by 10.36.39.3 with SMTP id g3mr5141664ita.8.1496519551935; Sat, 03 Jun 2017 12:52:31 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id d185sm2858473ioe.38.2017.06.03.12.52.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Jun 2017 12:52:31 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> <87a85p0xwu.fsf@users.sourceforge.net> <83efv1aqzx.fsf@gnu.org> <83d1akc3ws.fsf@gnu.org> Date: Sat, 03 Jun 2017 15:52:10 -0400 In-Reply-To: <83d1akc3ws.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Jun 2017 21:38:43 +0300") Message-ID: <877f0s26j9.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Eli Zaretskii writes: > Or maybe we should do the below? > > diff --git a/lisp/linum.el b/lisp/linum.el > index 8baa263..06165f2 100644 > --- a/lisp/linum.el > +++ b/lisp/linum.el > @@ -112,7 +112,8 @@ linum-mode > (define-globalized-minor-mode global-linum-mode linum-mode linum-on) > > (defun linum-on () > - (unless (minibufferp) > + (unless (or (minibufferp) > + (and (daemonp) (null (frame-parameter nil 'client)))) > (linum-mode 1))) It feels like the proper solution should be modified src/frame.c @@ -903,7 +903,7 @@ make_initial_frame (void) tty_frame_count = 1; fset_name (f, build_pure_c_string ("F1")); - SET_FRAME_VISIBLE (f, 1); + SET_FRAME_VISIBLE (f, 0); f->output_method = terminal->type; f->terminal = terminal; Because the hidden "F1" frame clearly isn't actually visible (and we don't need to show line numbers on it). But that just triggers Bug#26912 "desktop-clear with emacs as daemon results in error on C-x 5 0" even without desktop-clear, so it's not an acceptable solution by itself at least. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 19:06:03 2017 Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 23:06:03 +0000 Received: from localhost ([127.0.0.1]:54323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHI7P-0002x4-37 for submit@debbugs.gnu.org; Sat, 03 Jun 2017 19:06:03 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:34355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHI7N-0002wZ-64 for 27210@debbugs.gnu.org; Sat, 03 Jun 2017 19:06:01 -0400 Received: by mail-it0-f47.google.com with SMTP id m47so9971020iti.1 for <27210@debbugs.gnu.org>; Sat, 03 Jun 2017 16:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lgs4IojSGxPLuTpTz6BYjLuQpPUHNt3ig09aTU4BEFA=; b=EnWXKkUydKjos48YUyxo5wnr3C2vF1SM657e+DLQzy9EYWjs/5zgoSQtV53mK+sVf0 32h+7ybBXhBHOGw4JrlsTtMriaEuiSJXGD+fRctv1DFDy9Frp2JDo/IfcscM6Px8PqE2 3xlVijQEUtN8Zi8YljZLpdZr8U/L3AscQFOXq1qxAMWG8WGjklmF1aOlc+YuZJQk902b +/O5YjLHqeObxFN/n2zmxQShBmEujyozaR3JWfimMO7uMnAqbJtdZwDSlBYdNaniy1f6 d3de1EJRNve+dpeJGvmzptLg7ncl4Od/6rAv0rUO1TNtY0h5XF+xH9MJ21GL1ROpevz9 2Gfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=lgs4IojSGxPLuTpTz6BYjLuQpPUHNt3ig09aTU4BEFA=; b=a1+DLdjSgTeFU1xm0m7MCowAKgE6SPYDAf8Gj2TfMT4DlpDbWw7orUPpnV12HcTA+5 8J1rs0PoRHdLAm0aXroMEQmN2jhoEO1QKo8QfPebQ9LInztoGTMuueQXQuG/rKdmwBPM XYaDLaTwO3k8mknBKfZ64qNa3T+ww+Erxw1ziJt/EHTycTbNBoQWveMLM1G9DmKW0uXC eZAJNovG1kFog1vExq4nLqBmafbilVeQuT4Pi10fXZuYLkJYyJyuAxzas4nl6IRMFe5H vS/LTxJHy37/s3mOJadv9luZ6lj0WcwJh0tXzSDG3aX1EitpfbQFEw06/2MhLiGyKfwZ iX0w== X-Gm-Message-State: AODbwcACDZhgWDTT37oSX9pYDoIPqIx+pUWh6CcRQVnFyiSsjkPCRcnR sCTr6Nmoj3d4EQ== X-Received: by 10.107.11.137 with SMTP id 9mr13801039iol.86.1496531155556; Sat, 03 Jun 2017 16:05:55 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id b10sm11861938iod.33.2017.06.03.16.05.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Jun 2017 16:05:54 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> <87a85p0xwu.fsf@users.sourceforge.net> <83efv1aqzx.fsf@gnu.org> <83d1akc3ws.fsf@gnu.org> <877f0s26j9.fsf@users.sourceforge.net> Date: Sat, 03 Jun 2017 19:07:31 -0400 In-Reply-To: <877f0s26j9.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 03 Jun 2017 15:52:10 -0400") Message-ID: <874lvw1xho.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain npostavs@users.sourceforge.net writes: > Because the hidden "F1" frame clearly isn't actually visible (and we > don't need to show line numbers on it). But that just triggers > Bug#26912 "desktop-clear with emacs as daemon results in error on C-x 5 > 0" even without desktop-clear, so it's not an acceptable solution by > itself at least. I've expanded on this approach, it seems to work, though it's possible I'm overlooking some other place that assumes the initial frame is visible. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Make-the-initial-frame-invisible-when-in-daemon-m.patch Content-Description: patch >From 129862e0621bf16e20ecc433e427b66626ba9bb8 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 3 Jun 2017 17:59:17 -0400 Subject: [PATCH v1] Make the initial frame invisible when in daemon mode (Bug#27210) * src/emacs.c (main): When starting as a daemon, add `daemonp' parameter to the initial frame. * src/frame.c (make_initial_frame): Set the initial frame as nonvisible when running in daemon mode. (other_frames): Return true if one of the other frames has a non-nil `daemonp' frame parameter. (delete_frame): Don't allow deleting a frame with a `daemonp' parameter. --- src/emacs.c | 3 +++ src/frame.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 49ebb81767..04bdf9ecdb 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1170,6 +1170,8 @@ main (int argc, char **argv) #endif /* MSDOS */ if (dname_arg) daemon_name = xstrdup (dname_arg); + Fmodify_frame_parameters (Qnil, Fcons (Fcons (Qdaemonp, Fdaemonp ()), + Fframe_parameters (Qnil))); } #if defined HAVE_PTHREAD && !defined SYSTEM_MALLOC \ @@ -2486,6 +2488,7 @@ syms_of_emacs (void) DEFSYM (Qrisky_local_variable, "risky-local-variable"); DEFSYM (Qkill_emacs, "kill-emacs"); DEFSYM (Qkill_emacs_hook, "kill-emacs-hook"); + DEFSYM (Qdaemonp, "daemonp"); #ifndef CANNOT_DUMP defsubr (&Sdump_emacs); diff --git a/src/frame.c b/src/frame.c index 4d17a071dc..4c670b5c7a 100644 --- a/src/frame.c +++ b/src/frame.c @@ -903,7 +903,7 @@ make_initial_frame (void) tty_frame_count = 1; fset_name (f, build_pure_c_string ("F1")); - SET_FRAME_VISIBLE (f, 1); + SET_FRAME_VISIBLE (f, !IS_DAEMON); f->output_method = terminal->type; f->terminal = terminal; @@ -1605,7 +1605,10 @@ other_frames (struct frame *f, bool invisible, bool force) && (force /* Allow deleting the terminal frame when at least one X frame exists. */ - || (FRAME_WINDOW_P (f1) && !FRAME_WINDOW_P (f)))))) + || (FRAME_WINDOW_P (f1) && !FRAME_WINDOW_P (f)) + /* Allow deleting the last frame if a + "daemon frame" exists. */ + || !NILP (Fframe_parameter (frame1, Qdaemonp)))))) return true; } } @@ -1685,6 +1688,8 @@ delete_frame (Lisp_Object frame, Lisp_Object force) else error ("Attempt to delete the only frame"); } + else if (IS_DAEMON && !NILP (Fframe_parameter (frame, Qdaemonp))) + error ("Attempt to delete daemon's frame"); XSETFRAME (frame, f); -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 10:15:40 2017 Received: (at 27210) by debbugs.gnu.org; 4 Jun 2017 14:15:40 +0000 Received: from localhost ([127.0.0.1]:55914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHWJg-0002lG-JJ for submit@debbugs.gnu.org; Sun, 04 Jun 2017 10:15:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHWJf-0002l3-IO for 27210@debbugs.gnu.org; Sun, 04 Jun 2017 10:15:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHWJZ-0001OW-4d for 27210@debbugs.gnu.org; Sun, 04 Jun 2017 10:15:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHWJR-0001JZ-Sk; Sun, 04 Jun 2017 10:15:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3443 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dHWJR-0000PN-0G; Sun, 04 Jun 2017 10:15:25 -0400 Date: Sun, 04 Jun 2017 17:15:14 +0300 Message-Id: <837f0rc00d.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <874lvw1xho.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> <87a85p0xwu.fsf@users.sourceforge.net> <83efv1aqzx.fsf@gnu.org> <83d1akc3ws.fsf@gnu.org> <877f0s26j9.fsf@users.sourceforge.net> <874lvw1xho.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com > Date: Sat, 03 Jun 2017 19:07:31 -0400 > > > Because the hidden "F1" frame clearly isn't actually visible (and we > > don't need to show line numbers on it). But that just triggers > > Bug#26912 "desktop-clear with emacs as daemon results in error on C-x 5 > > 0" even without desktop-clear, so it's not an acceptable solution by > > itself at least. > > I've expanded on this approach, it seems to work, though it's possible > I'm overlooking some other place that assumes the initial frame is > visible. > > >From 129862e0621bf16e20ecc433e427b66626ba9bb8 Mon Sep 17 00:00:00 2001 > From: Noam Postavsky > Date: Sat, 3 Jun 2017 17:59:17 -0400 > Subject: [PATCH v1] Make the initial frame invisible when in daemon mode > (Bug#27210) > > * src/emacs.c (main): When starting as a daemon, add `daemonp' > parameter to the initial frame. > * src/frame.c (make_initial_frame): Set the initial frame as > nonvisible when running in daemon mode. > (other_frames): Return true if one of the other frames has a non-nil > `daemonp' frame parameter. > (delete_frame): Don't allow deleting a frame with a `daemonp' > parameter. I'm bothered by the possible unintended consequences of this, as we are only starting to collect experience with the daemon, desktop restoring, the various globalized modes, and the initial frame. This bug report is AFAIR the only one where that combination causes some issues. If similar cases will at some point start piling up, then I'd agree we might need a common solution for them, but until then... it sounds overkill to decide that the initial daemon frame be marked as invisible, for the sake of this single use case. And don't forget that the initial frame is invisible in non-daemon sessions as well, until some point during startup. There are more than 70 references to FRAME_VISIBLE_P in the C sources, and another 2 dozen references to frame-visible-p in Lisp sources -- sounds to me like a lot of potential for breaking stuff. My alternative proposal is much simpler, is localized to linum.el, and in a nutshell tests exactly the same condition, since any frame in a daemon session that can be visible is by definition a client frame. Do you see any disadvantages with installing that instead? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 11:07:30 2017 Received: (at 27210) by debbugs.gnu.org; 4 Jun 2017 15:07:30 +0000 Received: from localhost ([127.0.0.1]:55949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHX7q-0003wt-Ii for submit@debbugs.gnu.org; Sun, 04 Jun 2017 11:07:30 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:34168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHX7o-0003wg-HF for 27210@debbugs.gnu.org; Sun, 04 Jun 2017 11:07:29 -0400 Received: by mail-it0-f54.google.com with SMTP id m47so11355929iti.1 for <27210@debbugs.gnu.org>; Sun, 04 Jun 2017 08:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=J/p+adquBljxtFoKf5rsmxn3K7uriimGAh8ctxXzmSk=; b=bF8YO7IpActk03yfhkgygp2sgIBiZcwxAjHZCx9uIkf3Y+6tNIIQoMgbGasCbS4fgr Y+sCy2xmAqQQQsf8br9kh9HwVOj57A6+WMVW07aH5OW/GRAGgHKrRvtD/fYdQyBzp/pM OxEWLyzhZSJQEWMFCkm9mbYWMCjmm48VA6qvrRzhrB9klM9YjkiTVd/p0Vl2n41SVZNf BgAytF3Nrbc7aMd12DMpcgXbw8gxC807Y/GowGXQ0cSaQggN/fUMusTqKqM/V3DN7bY4 2zM1A2YYo3UIV/SyoJoOSkRj4+Nhqu42RGlfWwZG7klvzlBF/+sEx6aEw0PJy9jzCa+a ObTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=J/p+adquBljxtFoKf5rsmxn3K7uriimGAh8ctxXzmSk=; b=edErbEgeE+5OlqdgSIr1DHfXV/7434C/LxRulkSzKZAXyjJtithPgaGxuZcNarVs3I g//cAYVUAmpHHID7SXmYKsZ8aJdrdTpglF/b+n2/t/HNtiZLiQ92zeqix0Hq+N65gUqz i3/AbXEztxsZzZvcPxuJCRh7jf5QsTYLh4b4fB8YVvJ4uN2Kkg0/rP0soSCgv4kdx4vX mPm/nG52mizu8KTjB+eENeuF+ckofdFuADAa+Kh5iesSe7LiiExhZtk8cOIEAVAVK3Re 2xp5KHz2PO6cVedXNn3Vl19Xk3WoDcbqTbBtprIk1W63ZPQs3hGAqGjQa3rUWf2m9yJk avmg== X-Gm-Message-State: AODbwcAJGEnHxGklRqs3jH3ns/K6i4FRnTOxw8OZg8EjEinVv7RcMcJf 2++gm5+LjLbQsw== X-Received: by 10.107.59.137 with SMTP id i131mr19082297ioa.21.1496588842447; Sun, 04 Jun 2017 08:07:22 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id i93sm12886905iod.49.2017.06.04.08.07.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Jun 2017 08:07:21 -0700 (PDT) From: npostavs@users.sourceforge.net To: Eli Zaretskii Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> <87a85p0xwu.fsf@users.sourceforge.net> <83efv1aqzx.fsf@gnu.org> <83d1akc3ws.fsf@gnu.org> <877f0s26j9.fsf@users.sourceforge.net> <874lvw1xho.fsf@users.sourceforge.net> <837f0rc00d.fsf@gnu.org> Date: Sun, 04 Jun 2017 11:08:59 -0400 In-Reply-To: <837f0rc00d.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 04 Jun 2017 17:15:14 +0300") Message-ID: <87efuzzt6c.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27210 Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Eli Zaretskii writes: > And don't forget that the initial frame is invisible in non-daemon > sessions as well, until some point during startup. I don't understand, is this an objection? It only seems to support making the daemon frame invisible as well (i.e., the approach in my patch). > There are more than 70 references to FRAME_VISIBLE_P in the C sources, > and another 2 dozen references to frame-visible-p in Lisp sources -- > sounds to me like a lot of potential for breaking stuff. > > My alternative proposal is much simpler, is localized to linum.el, and > in a nutshell tests exactly the same condition, since any frame in a > daemon session that can be visible is by definition a client frame. > Do you see any disadvantages with installing that instead? The only disadvantage is that we still have this invisible daemon frame which is marked as visible. I agree it's okay to apply your patch now and see if we get some other similar problems later. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 12:32:00 2017 Received: (at 27210-done) by debbugs.gnu.org; 4 Jun 2017 16:32:00 +0000 Received: from localhost ([127.0.0.1]:56006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHYRc-0007mG-Ca for submit@debbugs.gnu.org; Sun, 04 Jun 2017 12:32:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHYRb-0007m3-51 for 27210-done@debbugs.gnu.org; Sun, 04 Jun 2017 12:31:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHYRV-0003BC-3B for 27210-done@debbugs.gnu.org; Sun, 04 Jun 2017 12:31:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHYRO-00037E-91; Sun, 04 Jun 2017 12:31:46 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3633 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dHYRN-0003Xa-89; Sun, 04 Jun 2017 12:31:45 -0400 Date: Sun, 04 Jun 2017 19:31:34 +0300 Message-Id: <83zidnaf4p.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <87efuzzt6c.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> <87a85p0xwu.fsf@users.sourceforge.net> <83efv1aqzx.fsf@gnu.org> <83d1akc3ws.fsf@gnu.org> <877f0s26j9.fsf@users.sourceforge.net> <874lvw1xho.fsf@users.sourceforge.net> <837f0rc00d.fsf@gnu.org> <87efuzzt6c.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27210-done Cc: 27210-done@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: npostavs@users.sourceforge.net > Cc: 27210@debbugs.gnu.org, ambrevar@gmail.com > Date: Sun, 04 Jun 2017 11:08:59 -0400 > > Eli Zaretskii writes: > > > And don't forget that the initial frame is invisible in non-daemon > > sessions as well, until some point during startup. > > I don't understand, is this an objection? Sorry for being unclear: I meant to point out that a non-daemon startup initially has such a frame as well, and we never heard any complaints about that. Which might mean that some of the code routinely run during startup expects to find that frame marked visible. > > My alternative proposal is much simpler, is localized to linum.el, and > > in a nutshell tests exactly the same condition, since any frame in a > > daemon session that can be visible is by definition a client frame. > > Do you see any disadvantages with installing that instead? > > The only disadvantage is that we still have this invisible daemon frame > which is marked as visible. I agree it's okay to apply your patch now > and see if we get some other similar problems later. OK, I've pushed the change. Let's keep an eye on similar problems if they pop up. From unknown Sun Aug 17 10:17:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 03 Jul 2017 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator