From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id b4CTGyiCR2CpVQAA0tVLHw (envelope-from ) for ; Tue, 09 Mar 2021 14:11:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iH0LFyiCR2COJwAA1q6Kng (envelope-from ) for ; Tue, 09 Mar 2021 14:11:52 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7AF3721548 for ; Tue, 9 Mar 2021 15:11:51 +0100 (CET) Received: from localhost ([::1]:56478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJd5R-000378-GO for larch@yhetil.org; Tue, 09 Mar 2021 09:11:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJd3J-0001H0-0w for emacs-orgmode@gnu.org; Tue, 09 Mar 2021 09:09:37 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJd3G-0006Rt-2H for emacs-orgmode@gnu.org; Tue, 09 Mar 2021 09:09:36 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 44009440B1F; Tue, 9 Mar 2021 09:09:32 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DDD6E440B17; Tue, 9 Mar 2021 09:09:30 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1615298970; bh=0OvobmfHa4J+yUu//AyvF0aA1H7O7UFUDObY6MExsEE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ANdI4rBxDwFyFcHxb2XYX+CKA//oz679NldeKBqyeT+zvWsSAx7AbvkiwbY1Vwvj9 GCEYsqyvSiKAdRu8fTywQ0ak9hY81EpzikLTDowXxH90lpQBtCxHvf1cKiF1d+STXP QGo/F6cgfXEwKIdRUC04cNIEuv3n33+6+UofktRafKxTr0AwqA6ugRTQ1l1te0x5x9 66nuPl2RavnuqYXiHhqmR8jXTkroUIGQZPezqqpU4q7myIFFt7XRHS3MYEA+5NJrss WskrR54Ara2jX1fqisLI9B3G133ETRV8GCYL/9yFBEAiym22MQgQeLH8QrC6Orx2Wr I9viyNd0N3QpQ== Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D45BA12014C; Tue, 9 Mar 2021 09:09:30 -0500 (EST) From: Stefan Monnier To: Kyle Meyer Subject: Re: Using lexical-binding Message-ID: References: <87a6rsg0vb.fsf@kyleam.com> <87a6rjcv5w.fsf@kyleam.com> <87r1ks9plr.fsf@kyleam.com> <8735x4c2k5.fsf@kyleam.com> Date: Tue, 09 Mar 2021 09:09:30 -0500 In-Reply-To: <8735x4c2k5.fsf@kyleam.com> (Kyle Meyer's message of "Tue, 09 Mar 2021 00:35:06 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.105 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marco Wahl , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615299111; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qla+vI/diaoX1fS0AFektBYzt4GsHE6BMNmdPFMcuS0=; b=QCOAi8B1b+L9Qwuc+RjuF977lC5gM1J9bdpoM40nuEwX6//Nr7HSSUD+QN3MGNpBKdZK4J xsFtvXx3wvUuC+haorNU8Beb6PjbPm0O4aGmK67dlDQNiQdtfTAHmDE+EP0AMro0CdfhhA Je1CY4W7FCP6erTjx/Rn9hqIeSWPaOn2KYd1uQ7sKdvY0ZIVIYGlm8o9/u2vukTOh2Cnk6 Z/bvC3cu8mde4B4eb2cQGtVT6AP2e96925hF6FY/GWWRQG/7o7DxLYn1jS0XhMbAExyAER 6/aqi2i6q2b6cw0R51JWf/yAxaeekZsKx4e9+2yiy7XqHHxv1xwI8SJWjk0XgQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615299111; a=rsa-sha256; cv=none; b=EPntDfW7ESM1Co4/bdgwSbuGNv65U2uTNOin9eFkp4IaN5c3ql3MZpnxw8qKwgjf62eni4 4YVTMBbkR3mgEdaLoAsrrReigXYD6d59qwddGmBrBhcx+jF5jGjFG2wEMt3dHqfLM3TCBW aTLNTlcMfUhN5VPbSfqofRZlmuGM/lJNivMXY19JzBE9y46rh7q7aOouSytrdgkvNAyimC Vewy1CEFQNEPifFWkam+t1n30+mfcFhf7RuzDwT1Z7IoS/PidXaDQRWk+hB0M4Iud7RiUK BNibFWufwAF3R4F91Yd5lgSIULau1cr15Fa1M7jn0Rt5fwajnfGdEAmN/mheYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=iro.umontreal.ca header.s=mail header.b=ANdI4rBx; dmarc=fail reason="SPF not aligned (relaxed)" header.from=iro.umontreal.ca (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.28 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=iro.umontreal.ca header.s=mail header.b=ANdI4rBx; dmarc=fail reason="SPF not aligned (relaxed)" header.from=iro.umontreal.ca (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7AF3721548 X-Spam-Score: -1.28 X-Migadu-Scanner: scn0.migadu.com X-TUID: izW4PqQApufV Hi Kyle, >> Subject: [PATCH] * lisp/org-agenda.el: Use lexical-binding > [...] >> + (pcase type >> + ('agenda >> + (org-agenda-list current-prefix-arg)) > > Unfortunately Org's minimum Emacs version is still Emacs 24.3. Sorry 'bout that. I keep forgetting about this detail of `pcase` past. Any chance you could put this in the `Package-Requires:`? >> + (let* ((gprops (nth 1 series)) >> + (gvars (mapcar #'car gprops)) >> + (gvals (mapcar (lambda (binding) (eval (cadr binding) t)) gprops))) >> + (cl-progv gvars gvals (org-agenda-prepare name)) >> + ;; We need to reset agenda markers here, because when constructing a >> + ;; block agenda, the individual blocks do not do that. >> + (org-agenda-reset-markers) >> + (with-suppressed-warnings ((lexical match)) > > ... I believe with-suppressed-warnings isn't available until Emacs 27.1, > right? Ooh, right, and that is not just a little detail, I very much know about that. I don't have any excuse for this one (it's just a careless copy&paste). > Any objections to me squashing the below changes into your patch? Of course not. > +(if (fboundp 'with-suppressed-warnings) ; Introduced in Emacs 27.1. > + (defalias 'org-with-suppressed-warnings 'with-suppressed-warnings) > + (defmacro org-with-suppressed-warnings (_warnings &rest body) > + (declare (debug (sexp &optional body)) (indent 1)) > + `(progn ,@body))) Note that all the uses I introduced of `with-suppressed-warnings` only wrap a very small amount of code, so you could also replace them with `with-no-warnings` (added back in Emacs-22). Stefan