From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OHY+LF+dNWBVSQAA0tVLHw (envelope-from ) for ; Wed, 24 Feb 2021 00:27:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4Kk0KF+dNWC0bAAA1q6Kng (envelope-from ) for ; Wed, 24 Feb 2021 00:27:11 +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 2065226FAE for ; Wed, 24 Feb 2021 01:27:11 +0100 (CET) Received: from localhost ([::1]:52168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEi1F-00023Y-BW for larch@yhetil.org; Tue, 23 Feb 2021 19:27:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEi0h-00023H-T8 for emacs-orgmode@gnu.org; Tue, 23 Feb 2021 19:26:37 -0500 Received: from out1.migadu.com ([2001:41d0:2:863f::]:12745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEi0d-000208-En for emacs-orgmode@gnu.org; Tue, 23 Feb 2021 19:26:35 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1614126387; h=from:from: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; bh=SE5vrA7Yx7HvcaiBNDqDjp+o+9T+i6J7qnDq4EiDoT0=; b=YOiKdaoYVvcdid7+3CMHvoOQcPuGv759q9JNYt/NcoRlfEKoUnsENELkPUY/gmSR9OK1dg nhUkFx5say2gvYF/rEPHvLKkT+RPFyHJlCESCm3rMObuSRxpkSxJEoDPKxOTGR9oB2Pylg +52yaBn7V6CBKoRmh510BCkqmuVn3A5zeNECztPv1lydnHXC30FmUg7rsh2ginc2ReBC4/ 3VhnHVSkUnwCheLl5kxxjSAMkPgq2nVyHszj+HTyHYs3tMO0W0UxugV0EcRHtIR8p3hEAT 7OEyYm5lSwMs6rfmkJw+bN7XlfADd/bFoAAh8Uas9Uq2XYWF94asx1IoGZLUtg== From: Kyle Meyer To: Stefan Monnier Subject: Re: Using lexical-binding In-Reply-To: References: Date: Tue, 23 Feb 2021 19:26:24 -0500 Message-ID: <87k0qywbtb.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=2001:41d0:2:863f::; envelope-from=kyle@kyleam.com; helo=out1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.57 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=YOiKdaoY; dmarc=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: 2065226FAE X-Spam-Score: -2.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: UxBFb/yi6EB8 Stefan Monnier writes: > As part of the on-going work to use lexical-binding in all the files > bundled with Emacs, I took a stab at converting org-agenda.el to > lexical-binding. Thank you. > [...] > Anyway, here's my first cut (the patch is made against the head of > Org's `master` rather than Emacs's `master`, since I suspect that could > make things easier for you). The commit message is basically empty > because it's not intended to be installed yet. I'm instead hoping for > some feedback, such as "tried it, works" or "burps all over the place", With a quick test of a few main commands, burps in one of four. Contents /tmp/scratch.org: --8<---------------cut here---------------start------------->8--- * TODO a :t: SCHEDULED: <2021-02-23 Tue> foo * DONE b * TODO c DEADLINE: <2021-02-23 Tue> --8<---------------cut here---------------end--------------->8--- Running with emacs 27.1 and -Q: (require 'org-agenda) (setq org-agenda-files '("/tmp/scratch.org")) (global-set-key (kbd "C-c a") #'org-agenda) ;; Commands: ;; (org-todo-list) ; works ;; (org-search-view nil "foo") ; works ;; (org-tags-view nil "+t") ; works ;; (org-agenda-list) ; fails: void-variable date There are also some `make test' failures: 7 unexpected results: FAILED test-org-agenda/diary-inclusion FAILED test-org-agenda/empty FAILED test-org-agenda/one-line FAILED test-org-agenda/scheduled-non-todo FAILED test-org-agenda/set-priority FAILED test-org-agenda/sticky-agenda-name FAILED test-org-agenda/sticky-agenda-name-after-reload > or "pretends everything is fine but doesn't do the right thing any > more", or (even better) actual feedback about the code itself and the > approach(es) I chose to use. While I'm not sure I can provide any useful feedback about approaches, I'll see if I can tweak your patch to resolve the org-agenda-list failure or any of the above test failures. > - I believe I have quashed all the compiler warnings (some had nothing > to do with lexical scoping), Hmm, I wonder why I'm not seeing the ones unrelated to the lexical scoping change. `make compile' and `make single' are quiet for me on Org's current master (d21d200bc) with Emacs 27. If I use an Emacs built from a recent Emacs commit (6172454ff3), I see a couple of "docstring wider than 80 characters" warnings (will fix), but nothing in org-agenda.el. > except for a reference to the function `add-to-diary-list` which I > can't find anywhere (is it some old function that has disappeared, > maybe?). It looks like add-to-diary-list became an obsolete alias for diary-add-to-list in Emacs 23.1 and was removed in Emacs 25.1, specifically 3f65970414 (Remove calendar code obsolete since at least version 23.1, 2014-10-05).