From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.bugs Subject: bug#20193: 25.0.50; declarative type specification for D-Bus args Date: Fri, 04 Sep 2015 11:33:20 +0900 Message-ID: References: <87bnjgat6z.fsf@gmx.de> <874mp628is.fsf@gmx.de> <87613wkhkm.fsf@gmx.de> <87d1y0apav.fsf@gmx.de> <87oahj95p9.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441334111 2223 80.91.229.3 (4 Sep 2015 02:35:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2015 02:35:11 +0000 (UTC) Cc: 20193@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 04 04:35:00 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZXgpN-0000to-Es for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Sep 2015 04:34:09 +0200 Original-Received: from localhost ([::1]:54054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXgpN-00089f-1U for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Sep 2015 22:34:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXgpK-00089S-2D for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXgpG-0001VC-S4 for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:34:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXgpG-0001V8-PJ for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZXgpF-0002xt-U7 for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 22:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daiki Ueno Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Sep 2015 02:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20193 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20193-submit@debbugs.gnu.org id=B20193.144133401411362 (code B ref 20193); Fri, 04 Sep 2015 02:34:01 +0000 Original-Received: (at 20193) by debbugs.gnu.org; 4 Sep 2015 02:33:34 +0000 Original-Received: from localhost ([127.0.0.1]:48325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXgon-0002xC-K5 for submit@debbugs.gnu.org; Thu, 03 Sep 2015 22:33:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55913) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXgol-0002x3-BO for 20193@debbugs.gnu.org; Thu, 03 Sep 2015 22:33:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXgoh-0001T7-Ns for 20193@debbugs.gnu.org; Thu, 03 Sep 2015 22:33:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXgoh-0001T3-KT; Thu, 03 Sep 2015 22:33:27 -0400 Original-Received: from du-a.org ([219.94.251.20]:35210 helo=dhcp-217-92.nrt.redhat.com) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZXgog-0002sz-VO; Thu, 03 Sep 2015 22:33:27 -0400 In-Reply-To: <87oahj95p9.fsf@gmx.de> (Michael Albinus's message of "Thu, 03 Sep 2015 12:07:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106140 Archived-At: Michael Albinus writes: > Daiki Ueno writes: > >>> For the second new test I'm not sure whether this is possible (the >>> documentation doesn't speak about), but it looks natural to me. >> >> Yes, this was actually a bug because of missing checks on the number of >> required arguments after `:type'. Fixed as: >> http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=scratch/dbusbind-type-tests&id=def5829c0769b142b3cc0d69a9ad58935a9f237f > > Well, dbus-test.el passes now, thanks. But there are still some cases > I'm not so happy with: > > plist-get > (dbus--test-create-message-with-args > '(:array) > '(:array :signature "u") > :type '(:array :uint32) > nil) > :signature) > > |- "asauau" > > I would expect "asauaub" Right, thanks for pointing that. > Maybe you could be a little bit more verbose about, and adapt the code? > When there is a :type argument, there must *always* be two additional > arguments? That makes sense. Moreover, I personally prefer not to mix implicit and explicit typing. So, I am currently thinking to collect type specifiers for all arguments as a list and put it in front of the actual arguments, like this: (dbus-message-internal ... :timeout 100 :type '((:array :string) (:array :uint32) (:array :uint32) :boolean) '("a") '(1) '(2) t) How does that sound? > As you see, even I (who has tried to understand the new syntax) am a > little bit confused. Yes, I am realizing how helpful it is to write unit tests, to smoke out such pitfalls before landing the feature :-) Regards, -- Daiki Ueno