From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dick.r.chiang@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#61875: 30.0.50; [PATCH] Fallout 339893f Date: Tue, 28 Feb 2023 14:21:24 -0500 Message-ID: <87y1ohiojv.fsf@dick> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35900"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.14 (Gnus v5.14) To: 61875@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 28 21:06:27 2023 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 1pX6F1-0009BB-Of for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Feb 2023 21:06:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX6Eo-0006XS-Ff; Tue, 28 Feb 2023 15:06:14 -0500 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 1pX6Ed-0006Un-0K for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 15:06:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pX6Ec-0006YO-NP for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 15:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pX6Ec-0002YI-9T for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 15:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: dick.r.chiang@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Feb 2023 20:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.16776147429779 (code B ref -1); Tue, 28 Feb 2023 20:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Feb 2023 20:05:42 +0000 Original-Received: from localhost ([127.0.0.1]:52064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX6EF-0002Xd-VW for submit@debbugs.gnu.org; Tue, 28 Feb 2023 15:05:42 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX5XV-0001GC-Cs for submit@debbugs.gnu.org; Tue, 28 Feb 2023 14:21:30 -0500 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 1pX5XU-0008Uc-No for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:21:28 -0500 Original-Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pX5XS-0006GC-Cj for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:21:28 -0500 Original-Received: by mail-qt1-x833.google.com with SMTP id ay9so11783322qtb.9 for ; Tue, 28 Feb 2023 11:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677612085; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=mu20RaitFeQgJQ5dW2z5uDc/xcNeC7yJvj3HKFVnJ5Q=; b=noIIAha7jKKoCffg7fTfUBU6wsY46GchFRQrC9ICVOjj2eZO3pEc+iqjvvyuTQNU+x MNxRsFPYjJQjPleQA/5fLIdCgHlhv1XM099vDr8DWJOHwhPndJVgPCpPCDCSQb7vkao0 SBOdffL1Z1V4sqc8sflF5wiy1yzDfyfIuPkm1EncjcVouDfBAR9RupnxVqF07c6Kz2oI ZzavrBSgZfaVkSZZEtNrF1Edgiy+blu0dqnh0bJINpQo4PNjdBSo/1bWa7nvouosOk1s Lmcmzr2308PR+zMycoMud/lZIvRGlausm5/u53e3k4VVcryVUYvT4NbU1FZNy67DZyWk xMEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677612085; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mu20RaitFeQgJQ5dW2z5uDc/xcNeC7yJvj3HKFVnJ5Q=; b=hejZ8QsPaLq2/CEhaiECkG6HED2fEUGjDjYcFZfjK6BSukF+j/tdTp62yqOvqMFXMN MzH8BVXFxAXJqoOnmZPIOau7MKL6JWWgFsZX/e0GWilCxqQeaiBwZ8sN4niEa6XAKChS OYcmc+WdjdaE7io9He+IbAprWJ7P52/qwED/EVQOCac1seHx4YehQ49VKuJICmxfsuIV YlhDS7gEM36sb+HMjrpsPEATXGfuB/inv86F0PmCLZ7mWlirjY4tPxBqRsb1QnYTxcph xOP+MMNdeGDE4ZRt0nCN+anNj3HSyqli6Xr+jn+QfnFd41Nl48PPOJrvn3D/+rot+7Kh AC1g== X-Gm-Message-State: AO0yUKWXLVXFa0FFGNCHG9X/lUTBQmYeJQM0Q3kINvFF1mLUDHQA/RPu +ZRcioONaBuHsK6+yUa2OtLzuvOsW/8= X-Google-Smtp-Source: AK7set+0DOaoXk9QFI0aPmdNP01G+jy8ftDihMuB1x53ic1utLpPcga7KI8CK6JJZMDd3BMMt/yoog== X-Received: by 2002:a05:622a:c2:b0:3bf:d359:1a1c with SMTP id p2-20020a05622a00c200b003bfd3591a1cmr7432727qtw.13.1677612085156; Tue, 28 Feb 2023 11:21:25 -0800 (PST) Original-Received: from localhost (pool-71-190-212-243.nycmny.fios.verizon.net. [71.190.212.243]) by smtp.gmail.com with ESMTPSA id a23-20020ac87217000000b003b62e8b77e7sm6858129qtp.68.2023.02.28.11.21.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 11:21:24 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::833; envelope-from=dick.r.chiang@gmail.com; helo=mail-qt1-x833.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: Tue, 28 Feb 2023 15:05:38 -0500 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:257012 Archived-At: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fallout-339893f.patch >From 7db3a36e3aa7ab1aba27258245eb7f02e46da354 Mon Sep 17 00:00:00 2001 From: dickmao 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 --=-=-= Content-Type: text/plain 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 --=-=-=--