From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Question on pcase Date: Tue, 27 Oct 2015 15:47:59 +0100 Message-ID: <87h9lcid0g.fsf@web.de> References: <871tcngdv2.fsf@gmail.com> <87k2qe1u09.fsf@web.de> <83r3kmrtat.fsf@gnu.org> <87r3kl22zk.fsf@web.de> <837fmdzpf2.fsf@gnu.org> <87oafp659p.fsf@web.de> <831tclzly9.fsf@gnu.org> <87fv115t20.fsf@web.de> <87io5tzkt8.fsf@gmail.com> <87fv0xd2jr.fsf@web.de> <87egggya6e.fsf@gmail.com> <87twpcidyl.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445957633 12972 80.91.229.3 (27 Oct 2015 14:53:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Oct 2015 14:53:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 27 15:53:44 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Zr5d9-0006lB-TE for ged-emacs-devel@m.gmane.org; Tue, 27 Oct 2015 15:53:44 +0100 Original-Received: from localhost ([::1]:60225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr5d9-0000DK-F4 for ged-emacs-devel@m.gmane.org; Tue, 27 Oct 2015 10:53:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr5Xu-0001oD-Ji for emacs-devel@gnu.org; Tue, 27 Oct 2015 10:48:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr5Xp-0003ca-1P for emacs-devel@gnu.org; Tue, 27 Oct 2015 10:48:18 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr5Xo-0003cL-G6 for emacs-devel@gnu.org; Tue, 27 Oct 2015 10:48:12 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zr5Xl-00039i-Ql for emacs-devel@gnu.org; Tue, 27 Oct 2015 15:48:09 +0100 Original-Received: from ip-90-186-3-87.web.vodafone.de ([90.186.3.87]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Oct 2015 15:48:09 +0100 Original-Received: from michael_heerdegen by ip-90-186-3-87.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Oct 2015 15:48:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-186-3-87.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:5k1z1wT7JK8vg7KxgwIG5dOrxcw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192728 Archived-At: Michael Heerdegen writes: > Hmm, as I said before, it's impossible in the general case to separate a > `pcase' pattern into a side effect free matching part and a > binding/setting part. That's because when variable binding is done, > bindings established while performing the matching need to be in effect; > look at the example at the end to see what I mean. Of course could you use temporary vars to delay the actual settings until you want to establish them. However, the computation of the values that will be bound can't be separated from the predicate F that is returned by `abo-transform-pcase-pattern', unless you want to rerun the matching code with all potential side effects. But AFAIU `abo-transform-pcase-pattern' should be sufficient for your purpose. Michael.