emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>, emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Fix org.el compilation warnings
Date: Fri, 26 May 2017 18:14:37 +0000	[thread overview]
Message-ID: <CAFyQvY2cXi1KyKH5SbU2UwxSh0sJVE=hQ8wMr9-wBQ1uU_ukUg@mail.gmail.com> (raw)
In-Reply-To: <87inkouy4f.fsf@kyleam.com>

[-- Attachment #1: Type: text/plain, Size: 2510 bytes --]

Below update is after I updated to the latest org master:

On Thu, May 25, 2017 at 10:53 PM Kyle Meyer <kyle@kyleam.com> wrote:

> Ah, right ... 'make compile' uses a single Emacs instance, while 'make
> single' uses a separate Emacs instance for each file.
>

I wasn't even doing that. I was doing M-x byte-compile-file and selecting
org.el.

That gives me (without applying your patch):

Compiling file
/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/org-mode/lisp/org.el
at Fri May 26 14:04:52 2017

In org-goto-map:
org.el:7412:9:Warning: function org-goto-map used to take 0+ arguments, now
    takes 0

In org-todo:
org.el:12398:12:Warning: function org-todo used to take 0+ arguments, now
    takes 0-1

In org-store-log-note:
org.el:13635:8:Warning: function org-store-log-note used to take 0+
arguments,
    now takes 0

In org-at-timestamp-p:
org.el:17909:40:Warning: reference to free variable
    ‘org-agenda-include-inactive-timestamps’

In org-self-insert-command:
org.el:19910:32:Warning: function org-self-insert-command used to take 0+
    arguments, now takes 1

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
>

I get that too.


> 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?


No, I didn't.. your bound-and-true-p patch makes more sense.

So.. should we consider the warnings output by simple byte-compile-file?
Even if not, the warnings do not make sense.. just taking this example:

In org-goto-map:
org.el:7412:9:Warning: function org-goto-map used to take 0+ arguments, now
    takes 0

Nowhere is org-goto-map defined to take 0+ arguments (meaning have
"&optional arg" as signature) and then redefined to have 0 arguments (which
is the actual case). Wondering why the compiler thinks that. I had a quick
look at byte-compile-arglist-warn function that outputs this warning.. but
couldn't understand the logic for sig1 in there.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 3712 bytes --]

  parent reply	other threads:[~2017-05-26 18:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 22:31 Fix org.el compilation warnings Kaushal Modi
2017-05-25 23:59 ` Kyle Meyer
2017-05-26  0:35   ` Kaushal Modi
2017-05-26  2:53     ` Kyle Meyer
2017-05-26  4:32       ` [PATCH] Silence byte-compiler under "make single" Kyle Meyer
2017-05-26 18:14       ` Kaushal Modi [this message]
2017-05-26 20:45         ` Fix org.el compilation warnings Kyle Meyer
2017-05-26 22:31           ` Kaushal Modi
2017-05-26 23:17             ` syncing with Emacs (was: Fix org.el compilation warnings) Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY2cXi1KyKH5SbU2UwxSh0sJVE=hQ8wMr9-wBQ1uU_ukUg@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).