emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Fix org.el compilation warnings


From: Kyle Meyer
Subject: Re: [O] Fix org.el compilation warnings
Date: Thu, 25 May 2017 22:53:52 -0400

Kaushal Modi <address@hidden> writes:

> On Thu, May 25, 2017, 7:59 PM Kyle Meyer <address@hidden> wrote:
>
>> Kaushal Modi <address@hidden> 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’s value as variable is void: org-comment-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
        ‘org-agenda-include-inactive-timestamps’
    
    In org--get-expected-indentation:
    org.el:22608:28:Warning: reference to free variable
        ‘org-element-greater-elements’
    
    In end of data:
    org.el:24980:1:Warning: the following functions are not known to be defined:
        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 patch
> 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?

-- 
Kyle



reply via email to

[Prev in Thread] Current Thread [Next in Thread]