GNU bug report logs - #61875
30.0.50; [PATCH] Fallout 339893f

Previous Next

Package: emacs;

Reported by: dick.r.chiang <at> gmail.com

Date: Tue, 28 Feb 2023 20:06:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61875 in the body.
You can then email your comments to 61875 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61875; Package emacs. (Tue, 28 Feb 2023 20:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to dick.r.chiang <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 28 Feb 2023 20:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dick.r.chiang <at> gmail.com
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: 30.0.50; [PATCH] Fallout 339893f
Date: Tue, 28 Feb 2023 14:21:24 -0500
[0001-Fallout-339893f.patch (text/x-diff, inline)]
From 7db3a36e3aa7ab1aba27258245eb7f02e46da354 Mon Sep 17 00:00:00 2001
From: dickmao <dick.r.chiang <at> gmail.com>
Date: Tue, 28 Feb 2023 14:16:53 -0500
Subject: [PATCH] Fallout 339893f

make TEST_INTERACTIVE=no test/lisp/server-tests
make TEST_INTERACTIVE=yes test/lisp/server-tests

* lisp/server.el (server-eval-and-print): Whitespace.
* test/lisp/server-tests.el (server-tests/wait-until): Drain
process output.
(server-tests/with-server): Whitespace.
(server-tests/server-start/sets-minor-mode): Whitespace.
(server-tests/server-start/stop-prompt-with-client,
server-tests/emacsclient/create-frame,
server-tests/server-force-stop/keeps-frames): Pass.
---
 lisp/server.el            | 15 +++++----------
 test/lisp/server-tests.el | 16 ++++++++--------
 2 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/lisp/server.el b/lisp/server.el
index 35b38ef8fa6..9321bf4a3a7 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -854,16 +854,11 @@ server-mode
   ;; Fixme: Should this check for an existing server socket and do
   ;; nothing if there is one (for multiple Emacs sessions)?
   (server-start (not server-mode)))
-
+
 (defun server-eval-and-print (expr proc)
   "Eval EXPR and send the result back to client PROC."
-  ;; While we're running asynchronously (from a process filter), it is likely
-  ;; that the emacsclient command was run in response to a user
-  ;; action, so the user probably knows that Emacs is processing this
-  ;; emacsclient request, so if we get a C-g it's likely that the user
-  ;; intended it to interrupt us rather than interrupt whatever Emacs
-  ;; was doing before it started handling the process filter.
-  ;; Hence `with-local-quit' (bug#6585).
+  ;; with-local-quit to interrupt this emacsclient request, and not
+  ;; whatever Emacs was doing before it (Bug#6585).
   (let ((v (with-local-quit (eval (car (read-from-string expr)) t))))
     (when proc
       (with-temp-buffer
@@ -1659,7 +1654,7 @@ server-kill-buffer
 	   (let ((server-kill-buffer-running t))
 	     (when server-process
 	       (server-buffer-done (current-buffer) t))))))
-
+
 (defun server-edit (&optional arg)
   "Switch to next server editing buffer; say \"Done\" for current buffer.
 If a server buffer is current, it is marked \"done\" and optionally saved.
@@ -1983,7 +1978,7 @@ server-eval-at
 	    (read (decode-coding-string (server-unquote-arg answer)
 					'emacs-internal)))))))
 
-
+
 (provide 'server)
 
 ;;; server.el ends here
diff --git a/test/lisp/server-tests.el b/test/lisp/server-tests.el
index ffafa74925f..499dc0a22c2 100644
--- a/test/lisp/server-tests.el
+++ b/test/lisp/server-tests.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
-;; This file is part of GNU Emacs.
+;; This file is NOT part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ server-tests/wait-until
       (when (> (float-time (time-since start))
                server-tests/max-wait-time)
         (ert-fail (format "timed out waiting for %S to be non-nil" ',form)))
-      (sit-for 0.1))))
+      (accept-process-output nil 0.1))))
 
 (defun server-tests/start-client (args)
   "Run emacsclient, passing ARGS as arguments to it."
@@ -85,8 +85,8 @@ server-tests/with-server
          (let ((inhibit-message t))
            (server-start t t))
          (delete-directory temporary-file-directory t)
-         (should (null server-process))
-         (should (null server-clients))))))
+         (should-not server-process)
+         (should-not server-clients)))))
 
 (defmacro server-tests/with-client (client-symbol args exit-status &rest body)
   "Start an Emacs client with ARGS and evaluate BODY.
@@ -123,14 +123,14 @@ server-tests/server-start/sets-minor-mode
     (should (eq server-mode t))
     (should (memq 'server-mode global-minor-modes)))
   ;; Make sure stopping the server deactivates the minor mode.
-  (should (eq server-mode nil))
+  (should-not server-mode)
   (should-not (memq 'server-mode global-minor-modes)))
 
 (ert-deftest server-tests/server-start/stop-prompt-with-client ()
   "Ensure that stopping the server prompts when there are clients."
   (skip-unless server-tests/can-create-frames-p)
   (server-tests/with-server
-    (server-tests/with-client emacsclient '("-c") 'exit
+    (server-tests/with-client emacsclient `(,(if noninteractive "-t" "-c")) 'exit
       (should (length= (frame-list) 2))
       (cl-letf* ((yes-or-no-p-called nil)
                  ((symbol-function 'yes-or-no-p)
@@ -164,7 +164,7 @@ server-tests/emacsclient/create-frame
   (skip-unless server-tests/can-create-frames-p)
   (let ((starting-frame-count (length (frame-list))))
     (server-tests/with-server
-      (server-tests/with-client emacsclient '("-c") nil
+      (server-tests/with-client emacsclient `(,(if noninteractive "-t" "-c")) nil
       (should (length= (frame-list) (1+ starting-frame-count)))
       (should (eq (process-status emacsclient) 'run))
       (should (eq (frame-parameter (car (frame-list)) 'client)
@@ -195,7 +195,7 @@ server-tests/server-force-stop/keeps-frames
          terminal)
     (unwind-protect
         (server-tests/with-server
-          (server-tests/with-client emacsclient '("-c") 'exit
+          (server-tests/with-client emacsclient `(,(if noninteractive "-t" "-c")) 'exit
             (should (eq (process-status emacsclient) 'run))
             (should (length= (frame-list) (1+ starting-frame-count)))
 
-- 
2.38.1

[Message part 2 (text/plain, inline)]

In Commercial Emacs 0.3.1snapshot c5740af in dev (upstream 30.0.50,
x86_64-pc-linux-gnu) built on dick
Repository revision: c5740afac357fe88df82bf10b577d8e603363b2e
Repository branch: dev
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Ubuntu 22.04.1 LTS

Configured using:
 'configure WERROR_CFLAGS=-Werror --prefix=/home/dick/.local
 --with-tree-sitter'
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
TREE_SITTER LCMS2 LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11
XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 01 Mar 2023 12:18:01 GMT) Full text and rfc822 format available.

Notification sent to dick.r.chiang <at> gmail.com:
bug acknowledged by developer. (Wed, 01 Mar 2023 12:18:02 GMT) Full text and rfc822 format available.

Message #10 received at 61875-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: dick.r.chiang <at> gmail.com
Cc: 61875-done <at> debbugs.gnu.org
Subject: Re: bug#61875: 30.0.50; [PATCH] Fallout 339893f
Date: Wed, 01 Mar 2023 14:17:36 +0200
> From: dick.r.chiang <at> gmail.com
> Date: Tue, 28 Feb 2023 14:21:24 -0500
> 
> >From 7db3a36e3aa7ab1aba27258245eb7f02e46da354 Mon Sep 17 00:00:00 2001
> From: dickmao <dick.r.chiang <at> gmail.com>
> Date: Tue, 28 Feb 2023 14:16:53 -0500
> Subject: [PATCH] Fallout 339893f
> 
> make TEST_INTERACTIVE=no test/lisp/server-tests
> make TEST_INTERACTIVE=yes test/lisp/server-tests
> 
> * lisp/server.el (server-eval-and-print): Whitespace.
> * test/lisp/server-tests.el (server-tests/wait-until): Drain
> process output.
> (server-tests/with-server): Whitespace.
> (server-tests/server-start/sets-minor-mode): Whitespace.
> (server-tests/server-start/stop-prompt-with-client,
> server-tests/emacsclient/create-frame,
> server-tests/server-force-stop/keeps-frames): Pass.

We want to solve the more general problem.  See the discussion on
emacs-devel.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61875; Package emacs. (Wed, 01 Mar 2023 16:04:02 GMT) Full text and rfc822 format available.

Message #13 received at 61875 <at> debbugs.gnu.org (full text, mbox):

From: dick <dick.r.chiang <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61875 <at> debbugs.gnu.org
Subject: Re: bug#61875: 30.0.50; [PATCH] Fallout 339893f
Date: Wed, 01 Mar 2023 07:35:11 -0500
EZ> We want to solve the more general problem.

You?  That's a first.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61875; Package emacs. (Wed, 01 Mar 2023 16:18:02 GMT) Full text and rfc822 format available.

Message #16 received at 61875 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: dick <dick.r.chiang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 61875 <at> debbugs.gnu.org
Subject: Re: bug#61875: 30.0.50; [PATCH] Fallout 339893f
Date: Wed, 01 Mar 2023 17:17:27 +0100
dick <dick.r.chiang <at> gmail.com> writes:

Hi Dick,

> EZ> We want to solve the more general problem.
>
> You?  That's a first.

You have been warned: no personal attacks any more.

I herewith ban you from the debbugs.gnu.org mailing lists. If you
believe you're able to communicate kind, you could ask me in four weeks
to remove this ban.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Mar 2023 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.