From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 55cdebc: Make Tramp compatible to recent progress-reporter-update Date: Sat, 15 Jun 2019 12:28:48 -0400 Message-ID: References: <20190615093820.29808.75496@vcs0.savannah.gnu.org> <20190615093822.02DC9209BF@vcs0.savannah.gnu.org> <87ef3v3wdv.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="83351"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 15 18:29:39 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hcBYg-000LYz-Oa for ged-emacs-devel@m.gmane.org; Sat, 15 Jun 2019 18:29:39 +0200 Original-Received: from localhost ([::1]:33454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcBYf-0008EF-CF for ged-emacs-devel@m.gmane.org; Sat, 15 Jun 2019 12:29:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45696) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcBY0-0008Dt-8O for emacs-devel@gnu.org; Sat, 15 Jun 2019 12:28:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcBXz-00007i-5d for emacs-devel@gnu.org; Sat, 15 Jun 2019 12:28:56 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21308) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hcBXy-00006T-V7 for emacs-devel@gnu.org; Sat, 15 Jun 2019 12:28:55 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9DFE3100B3B; Sat, 15 Jun 2019 12:28:52 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 79053100964; Sat, 15 Jun 2019 12:28:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1560616131; bh=e77ohqox4tZnw2GcSgv+z2zFs7P3/Z2vxMjP8O/Zhis=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kl4nJ+X8hpgZ6dfJ445h+txOVy9SLl0j7ROVKCYz5ha7ChhDbwkhPpJt+3Dq3/8ts 2nBvUwE9Fm67HD0aIf/BOh7jpj8AmF+yVw+3sQudetmkeEdbTDIjxDZHfTpLNVQZjk ky+uJ3ztWFqUZ4ZYhRr6VDRW5FKg4ddKCilwR7z0/1kpZEv2usTKu6EuPnP4NElULk qAltJfMtCNKAgOTZiJ9b08aH63d24cI04r82Zg5QRz9Rk8c5+FansCf0eFeASDgyRx 8gVndg9E9SE2JPbfMJBWn6ubg2HF7jIujiULelJVOg+7Nbtetn5SwtlsHN/zSqsFdW pJZxZAhhbpvQg== Original-Received: from alfajor (unknown [157.157.58.170]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C8100120BB3; Sat, 15 Jun 2019 12:28:50 -0400 (EDT) In-Reply-To: <87ef3v3wdv.fsf@gmx.de> (Michael Albinus's message of "Sat, 15 Jun 2019 13:45:16 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237698 Archived-At: >>> + (if (equal (tramp-compat-funcall 'func-arity #'progress-reporter-update) >>> + '(1 . 3)) >> This gives the wrong result if progress-reporter-update is advised >> (e.g. for `debug-on-entry`, or `trace-function`, or ...) > Do you know a better test? None is perfect. Other than looking at the Emacs version number, you can also do (condition-case (progress-reporter-update ...) (wrong-number-of-arguments (progress-reporter-update ...))) I find this latter one less troublesome in practice than testing arity, Stefan