From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#67142: 29.1; with-sqlite-transaction commits on exception rather than rolling back Date: Fri, 17 Nov 2023 10:08:36 +0100 Message-ID: References: <83pm09pz2n.fsf@gnu.org> <831qcoq0py.fsf@gnu.org> <87a5rc4vwy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1HWvJaU75tn5gcrD" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35982"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 67142@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 17 10:09:39 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 1r3ur3-0009H1-Mu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Nov 2023 10:09:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3uqW-0004tP-LB; Fri, 17 Nov 2023 04:09:04 -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 1r3uqU-0004sr-RD for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2023 04:09:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3uqU-0004LV-JQ for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2023 04:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r3uqU-0007bV-Fn for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2023 04:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Nov 2023 09:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67142 X-GNU-PR-Package: emacs Original-Received: via spool by 67142-submit@debbugs.gnu.org id=B67142.170021212829202 (code B ref 67142); Fri, 17 Nov 2023 09:09:02 +0000 Original-Received: (at 67142) by debbugs.gnu.org; 17 Nov 2023 09:08:48 +0000 Original-Received: from localhost ([127.0.0.1]:45122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3uqG-0007av-AY for submit@debbugs.gnu.org; Fri, 17 Nov 2023 04:08:48 -0500 Original-Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:40614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3uqD-0007ah-0m for 67142@debbugs.gnu.org; Fri, 17 Nov 2023 04:08:47 -0500 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4SWrfs56gJz9sTq; Fri, 17 Nov 2023 10:08:37 +0100 (CET) Content-Disposition: inline In-Reply-To: <87a5rc4vwy.fsf@gmail.com> 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:274494 Archived-At: --1HWvJaU75tn5gcrD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > I don't understand this part, sorry. Why do we need a symbol to > > return the result of the body? >=20 > db-var and func-var are uninterned symbols in the macro expansion but > the variables 'result' and 'commit' marked below aren't. If the intent > is not to expose these variables to the macro's BODY, the inner let > should also uninterned symbols right? Correct, this is what I was hinting at. As annoying as it is, when writing unhygienic macros one should use uninterned symbols to avoid exposing additional variables to the BODY argument. Alternatively, the pattern of `(let ((return (...))) ... return)` can be replaced with `(prog1 (...) ...)`. @Eli: The new patch looks better and closer to how the issue is solved in the Ruby sqlite3 gem. I'm still not sure about this use of `unwind-protect` being correct, but it does preserve the backtrace in case of an error better than when I used `(condition-case e (...) (error (apply #'signal e)))`. --1HWvJaU75tn5gcrD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAmVXLZAACgkQFmfJg6zC ifpX1wf/aFM0fRM0VZ85x6iwgzKW7uFNA8cDavSYGzLomB/lDwQohRvesO68h/eN I4HCXepLs5J2vmX4zg9D0vjWbawdJmo40oryDvbP3zdtQybf3ZK2UhZZT1f9Wpwd 0gnl9ToDUYW8YFJEmtukUAurU9tpqbJrS+WnRIExmYroS9Cy/QwlTbHVAc4bdMsF v2hAoYb9MpqNKZDfYOgJvyGQVYLHB6ANXmMP9VFOoKpERUQOTCp2UgFNgsT4upRt cSfXzLv84Wi3yB3m3j++Eg1PiGyFiNDYG1Uqkshqd1L55dDyp5DG8yopfSxulTLx ABJp5jbweNmLzT5oeTAv6G7WiuEVRw== =Gii1 -----END PGP SIGNATURE----- --1HWvJaU75tn5gcrD--