From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gilles Newsgroups: gmane.emacs.bugs Subject: bug#47334: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode Date: Tue, 23 Mar 2021 01:30:36 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39322"; mail-complaints-to="usenet@ciao.gmane.io" To: 47334@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 23 02:15:33 2021 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 1lOVdt-000A6e-F7 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Mar 2021 02:15:33 +0100 Original-Received: from localhost ([::1]:49428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOVds-00078d-DN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Mar 2021 21:15:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOVdO-00078V-Mr for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 21:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOVdO-0002rE-Eq for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 21:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOVdO-0005Np-9A for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 21:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gilles Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Mar 2021 01:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47334 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161646208720650 (code B ref -1); Tue, 23 Mar 2021 01:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Mar 2021 01:14:47 +0000 Original-Received: from localhost ([127.0.0.1]:59178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOVd9-0005Mz-7I for submit@debbugs.gnu.org; Mon, 22 Mar 2021 21:14:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOUx3-0004Nj-FZ for submit@debbugs.gnu.org; Mon, 22 Mar 2021 20:31:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOUx3-00049s-8r for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 20:31:17 -0400 Original-Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]:38726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOUx0-0007op-GL for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 20:31:16 -0400 Original-Received: by mail-qv1-xf2e.google.com with SMTP id t5so9645011qvs.5 for ; Mon, 22 Mar 2021 17:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ssSh7z8T0DdRE359uInBDMtJplUlsGXKjlMvtQ8ZztQ=; b=Z9w2pq68rmYCSCqTFamyqHnDSJ2FKSnWaaFOJTf5mFeH7TwlH1x25o56dEqLhuQVto v8vjd1cwFcngNz/rVOw88cI9ogswYRY7GR2AZcy669YnZPk8ZWiEeWpKBm5oGl8y7C2G ZvJdfrMKMNqSgq5YCRqs/KGFYnlYKmGtor92I8mbPHVdqs2B+cQzEiHd3BgKPZivmMOS 88Z+rDRkMs1qGJbJQXdeA/+oXDcXdlZaLGMGOruutD/OSICbIkCNSPgOkB4OCcRYMYly EEKU9FJaV65QsAK5nHnIEiuMpWbLDPFmg97uhhcbC1Mw5VylxqCbbYg2dbFdxvElY4yw n9QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ssSh7z8T0DdRE359uInBDMtJplUlsGXKjlMvtQ8ZztQ=; b=XN4wGA6bTFfsSsAw/VVoRr6uENQY2jAc7+5Awd88DvQQshuvmZo1AC5F5zySYjPhm4 WAnv0soBCQ5X2IYx7hnZ3vAtOqcXmx7MyhHG3ps+dXqj7Yk4rolAqPznsb175vSArkcs YY43fGenVwrXeDVMaCy3v1l6o3iWe5DCwY5YQImY8/oxsuE6Sng2j07tXuLUgGkx7Oti dgxUnnfxXvh7MkhoOqIWRtFcgrxQbUc30CcIu0nT6+tcyLi3Z21notaGROsVAw9S9o0/ HytOTx6o6SueIZewStsRDdRWCpLTwdutYHAl+bnaDE4V7zqi7/9q79aPu73ykLD1JHCO TWdQ== X-Gm-Message-State: AOAM530eQ6MvuwMfglDyopCABOlaBGZ/z1YiJOYNGSc8VesRwXDHeRmE E44eLxn9CDHbwhsESiOEyeGLEi81h9Zi5j6GxkUjIYy1MiUqtg== X-Google-Smtp-Source: ABdhPJxk33Hec/8LKrdkXdkWv4YIaeso3hwn0mXb6kY1rqYzMPnzD5RYd/vWYhHt8w1eMZPujsaDi3sivAholsuITq8= X-Received: by 2002:a05:6214:20ad:: with SMTP id 13mr2314559qvd.35.1616459472674; Mon, 22 Mar 2021 17:31:12 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=gilles.peskine@gmail.com; helo=mail-qv1-xf2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 22 Mar 2021 21:14:46 -0400 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" Xref: news.gmane.io gmane.emacs.bugs:202876 Archived-At: When restoring a desktop session where a buffer has highlight-changes-mode enabled, if Emacs is starting in daemon mode, it locks up before opening the socket. There is no error message. If Emacs is not starting in daemon mode, or if the desktop session file does not list highlight-changes-mode, everything is fine. I have observed this problem both with Emacs 27.1 on macOS and with Emacs 26.3 on Ubuntu 20.04. Below I give the server an explicit name for convenience but this is optional to reproduce the bug. Here is a precise recipe to reproduce. (Lines beginning with a letter are shell commands; lines beginning with `|` are terminal output.) mkdir -p /var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d cd /var/tmp/bugs/emacs-daemon-desktop-highlight-changes echo "(setq desktop-restore-frames nil)" >.emacs.d/init.el echo "(desktop-save-mode)" >>.emacs.d/init.el HOME=$PWD emacs --no-site-file -nw .emacs.d/init.el # C-x C-c y ; Exit, saving the session cp .emacs.d/.emacs.desktop desktop.ok.el HOME=$PWD emacs --no-site-file --daemon=foo | Wrote /var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d/.emacs.desktop.lock | Desktop: 1 frame, 1 buffer restored. | Starting Emacs daemon. emacsclient -s foo -c -nw # C-x b RET ; Switch to init.el # M-x highlight-changes-mode RET # M-x kill-emacs RET cp .emacs.d/.emacs.desktop desktop.bad.el HOME=$PWD emacs --no-site-file --daemon=foo At this point, there are two Emacs processes (the original one and its daemon child), but they do not reach the point of creating the server socket. No message is displayed on the terminal. On the other hand, if I kill the Emacs processes and run ``HOME=$PWD emacs --no-site-file -nw``, Emacs starts normally. Here are the working (desktop.ok.el) and non-working (desktop.bad.el) versions of .emacs.desktop from above. ---------------------------------------------------------------- ;; -*- mode: emacs-lisp; lexical-binding:t; coding: utf-8-emacs; -*- ;; -------------------------------------------------------------------------- ;; Desktop File for Emacs ;; -------------------------------------------------------------------------- ;; Created Tue Mar 23 00:57:14 2021 ;; Desktop file format version 208 ;; Emacs version 27.1 ;; Global section: (setq desktop-saved-frameset nil) (setq desktop-missing-file-warning nil) (setq tags-file-name nil) (setq tags-table-list nil) (setq search-ring nil) (setq regexp-search-ring nil) (setq register-alist nil) (setq file-name-history nil) ;; Buffer section -- buffers listed in same order as in buffer list: (desktop-create-buffer 208 "/var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d/init.el" "init.el" 'emacs-lisp-mode '(eldoc-mode) 1 '(nil nil) nil nil '((buffer-display-time 24665 11993 439843 0) (buffer-file-coding-system . prefer-utf-8-unix)) '((mark-ring nil))) ---------------------------------------------------------------- ;; -*- mode: emacs-lisp; lexical-binding:t; coding: utf-8-emacs; -*- ;; -------------------------------------------------------------------------- ;; Desktop File for Emacs ;; -------------------------------------------------------------------------- ;; Created Tue Mar 23 00:58:04 2021 ;; Desktop file format version 208 ;; Emacs version 27.1 ;; Global section: (setq desktop-saved-frameset nil) (setq desktop-missing-file-warning nil) (setq tags-file-name nil) (setq tags-table-list nil) (setq search-ring nil) (setq regexp-search-ring nil) (setq register-alist nil) (setq file-name-history nil) ;; Buffer section -- buffers listed in same order as in buffer list: (desktop-create-buffer 208 "/var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d/init.el" "init.el" 'emacs-lisp-mode '(eldoc-mode highlight-changes-mode) 1 '(nil nil) nil nil '((buffer-display-time 24665 12038 824402 0) (buffer-file-coding-system . prefer-utf-8-unix) (highlight-changes-mode . t)) '((mark-ring nil))) ---------------------------------------------------------------- In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2020-08-12 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.2.3 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER Important settings: value of $LC_CTYPE: UTF-8 value of $LANG: en_FR.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 44980 8398) (symbols 48 5927 1) (strings 32 15288 1607) (string-bytes 1 506711) (vectors 16 10173) (vector-slots 8 126873 5444) (floats 8 20 38) (intervals 56 191 0) (buffers 1000 11))