From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Fix org.el compilation warnings Date: Thu, 25 May 2017 22:53:52 -0400 Message-ID: <87inkouy4f.fsf@kyleam.com> References: <87mva0v66x.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dE5O5-0005Q6-1O for emacs-orgmode@gnu.org; Thu, 25 May 2017 22:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dE5O0-0007W8-7A for emacs-orgmode@gnu.org; Thu, 25 May 2017 22:54:01 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:58122 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dE5Nz-0007Vk-Vy for emacs-orgmode@gnu.org; Thu, 25 May 2017 22:53:56 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi , emacs-org list Kaushal Modi writes: > On Thu, May 25, 2017, 7:59 PM Kyle Meyer wrote: > >> Kaushal Modi writes: >> >> > I was trying to fix the org.el compilation warnings. >> >> I don't see any compiler warnings when I run 'make compile' with either >> master (2960dc971) or maint (89bd7ad87) on Emacs 25.2. >> > > Those warnings were on master using the latest build of emacs from master. > > I was compiling just org.el, may be that's why? Ah, right ... 'make compile' uses a single Emacs instance, while 'make single' uses a separate Emacs instance for each file. With 'make single' on master, I get a compile error due to the eval-when-compile's added in 53ee147f4 (Add support for new switches to org-get-heading, 2017-01-17) and 6dc6eb3b0 (Fix failing test, 2017-01-19). In toplevel form: org.el:7914:51:Error: Symbol=E2=80=99s value as variable is void: org-c= omment-string If I wrap (defconst org-comment-string ...) in eval-and-compile to get rid of those, I see your reported warning and a few others (but not the others that you reported): In org-at-timestamp-p: org.el:17946:40:Warning: reference to free variable =E2=80=98org-agenda-include-inactive-timestamps=E2=80=99 =20=20=20=20 In org--get-expected-indentation: org.el:22608:28:Warning: reference to free variable =E2=80=98org-element-greater-elements=E2=80=99 =20=20=20=20 In end of data: org.el:24980:1:Warning: the following functions are not known to be def= ined: org-table-sort-lines, org-duration-from-minutes I think all of these should be addressed. > But even then, shouldn't the free variable warning, that I fix in the pat= ch > I just provided, be fixed? Your patch is only the appropriate fix if we're confident that org-agenda will be loaded at the time that the org-agenda-include-inactive-timestamps code path of org-at-timestamp-p is executed. Otherwise, we're just silencing a warning about a possible run-time void variable error. Have you looked this? --=20 Kyle