all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#61875: 30.0.50; [PATCH] Fallout 339893f
@ 2023-02-28 19:21 dick.r.chiang
  2023-03-01 12:17 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: dick.r.chiang @ 2023-02-28 19:21 UTC (permalink / raw)
  To: 61875

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Fallout-339893f.patch --]
[-- Type: text/x-diff, Size: 5565 bytes --]

From 7db3a36e3aa7ab1aba27258245eb7f02e46da354 Mon Sep 17 00:00:00 2001
From: dickmao <dick.r.chiang@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)))
-\f
+
 (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))))))
-\f
+
 (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)))))))
 
-\f
+
 (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


[-- Attachment #2: Type: text/plain, Size: 756 bytes --]




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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#61875: 30.0.50; [PATCH] Fallout 339893f
  2023-02-28 19:21 bug#61875: 30.0.50; [PATCH] Fallout 339893f dick.r.chiang
@ 2023-03-01 12:17 ` Eli Zaretskii
  2023-03-01 12:35   ` dick
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-03-01 12:17 UTC (permalink / raw)
  To: dick.r.chiang; +Cc: 61875-done

> From: dick.r.chiang@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@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#61875: 30.0.50; [PATCH] Fallout 339893f
  2023-03-01 12:17 ` Eli Zaretskii
@ 2023-03-01 12:35   ` dick
  2023-03-01 16:17     ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: dick @ 2023-03-01 12:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 61875

EZ> We want to solve the more general problem.

You?  That's a first.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#61875: 30.0.50; [PATCH] Fallout 339893f
  2023-03-01 12:35   ` dick
@ 2023-03-01 16:17     ` Michael Albinus
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2023-03-01 16:17 UTC (permalink / raw)
  To: dick; +Cc: Eli Zaretskii, 61875

dick <dick.r.chiang@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-01 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28 19:21 bug#61875: 30.0.50; [PATCH] Fallout 339893f dick.r.chiang
2023-03-01 12:17 ` Eli Zaretskii
2023-03-01 12:35   ` dick
2023-03-01 16:17     ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.