From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Need message-fn arg back in ert-run-tests-interactively Date: Wed, 06 Sep 2023 21:21:27 -0400 Message-ID: References: Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2848"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rswgnu@gmail.com, emacs-devel@gnu.org, matsl@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 07 03:22:01 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qe3ia-0000RD-Cm for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Sep 2023 03:22:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qe3i6-0002Tv-GK; Wed, 06 Sep 2023 21:21:30 -0400 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 1qe3i4-0002K2-Hs for emacs-devel@gnu.org; Wed, 06 Sep 2023 21:21:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qe3i4-0002Yt-8I; Wed, 06 Sep 2023 21:21:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=ah8ZOBWdlZ/5RQwg6pVrkMDJyrrQqXdh8QrWjNC0Kwg=; b=Mq2yLlSXH04p Wa7wOz76Uof39EIcxmF/a4j0JLJxrC6tajwuAOrjy6QoBLsI0HC+mFM6PRTzxXosoe83kpZQoGAdd 5PJDf5FucSNowvjHHIUI7Sg31uv9LM0XEqhFy86WbjgzygW6+V8gYuvjFw2YlsjGIUggJ9aUMFzuK VrQngpmXzczGbb+J56LQ4E8ZEtk+QdjVOogHCgMIAFAeBH7iK0I7sfrhF/WUo5pdb5vG4H4VYIaRK eCFVzUe0uBuroMlRzU4dx+1E4bRtF8A2/hZ9dP0y/pBXrfzgWGih9UDnSGLoQAewGH+m5iOnaLcY8 0RmI0dJt82YCD7Kno+ag/Q==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qe3i3-0001o2-UU; Wed, 06 Sep 2023 21:21:27 -0400 In-Reply-To: (message from Stefan Kangas on Tue, 5 Sep 2023 15:43:57 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310227 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > You can use something like this: > (cl-letf (((symbol-function 'message) > (lambda (format-string &rest args) > ...))) > (ert-run-tests-interactively t)) It might work, but dynamically binding the function cell of a standard Emacs Lisp function is very unclean. Can wecome up with a cleaner way to do this job? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)