unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "T.V Raman" <raman@google.com>
Cc: emacs-devel@gnu.org
Subject: Re: Native Compile: Example Of Possibly Spurious Warning
Date: Mon, 17 May 2021 09:01:54 +0300	[thread overview]
Message-ID: <83y2cducdp.fsf@gnu.org> (raw)
In-Reply-To: <20210516205102.286BDC21098@raman-glaptop.localdomain>

> From: "T.V Raman" <raman@google.com>
> Date: Sun, 16 May 2021 13:51:02 -0700 (PDT)
> 
> Here is an example.
> 
> eak/lisp/emacspeak-preamble.el: Error: Symbol's value as variable is
> void emacspeak-user-directory Disable showing Disable logging
> The above file contains this innocent looking defvar:
> (defvar emacspeak-user-directory (expand-file-name "~/.emacspeak/")
> "Emacspeak resources, e.g. pronunciation dicts.")
> 
> The only library it has required at that point is cl-lib
> 
> In the running emacs, the variable emacspeak-user-directory has the
> expected value:
> "/home/raman/.emacspeak/"
> 
> So why the warning above?

How can we know without seeing the Lisp source file(s) relevant to
this compilation?  The answer is somewhere in those files.

In general, native-compilation runs in a separate process that doesn't
inherit the environment and loaded packages of your interactive
session, so it is more sensitive to problems than when you
byte-compile the same source from your interactive session.  In
particular, the Emacs sub-process that runs native-compilation is run
in the batch mode, which doesn't load your init files.

So you could try byte-compiling the same file from the shell prompt in
batch mode, as an approximation to what native-compilation does; any
warning or error you see in this batch byte-compilation will also
happen in the async native-compilation.



  reply	other threads:[~2021-05-17  6:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 20:51 Native Compile: Example Of Possibly Spurious Warning T.V Raman
2021-05-17  6:01 ` Eli Zaretskii [this message]
2021-05-17 13:58   ` T.V Raman
2021-05-17 14:16     ` Eli Zaretskii
2021-05-17 19:22       ` Andrea Corallo via Emacs development discussions.
2021-05-17 20:20         ` T.V Raman
2021-05-17 16:12     ` T.V Raman
2021-05-17 19:25 ` Andrea Corallo via Emacs development discussions.

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83y2cducdp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.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.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).