all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Jay Belanger <jay.p.belanger@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Compiled file behaves differently than the uncompiled file (Was Re: bug#19582)
Date: Wed, 28 Jan 2015 09:42:02 +0100	[thread overview]
Message-ID: <87d25zcn51.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87fvavcy3j.fsf_-_@gmail.com> (Jay Belanger's message of "Tue, 27 Jan 2015 22:45:20 -0600")

Jay Belanger <jay.p.belanger@gmail.com> writes:

> Wolfgang Jenkner <wjenkner@inode.at> writes:
> ...
>> In emacs -Q, do `M-x calc' then convert, say 1m, to cm, i.e.,
>>
>> ' 1 m <return> u c c m <return>
>>
>> This gives `100 cm' on top of the stack (a plain integer scalar).
>>
>> Next, start another emacs -Q instance, do `M-x calc' and then, before
>> anything else, `M-: (load-library "calc-units")'.
>>
>> Now the same conversion exercise as before gives `100. cm' on the stack
>> instead (a calc float).
>
> The float appears because Calc does units simplifications differently if the
> calc-units.elc file is loaded too soon.  I'm not sure why.  I could
> probably narrow the problem down a little more, but not too far since
> the problem is in the elc file, not the el file.
>
> If the calc-units.elc file is loaded when it is supposed to be, the
> float doesn't
> appear.
> If the calc-units.elc file is loaded right away, then the float appears.
> If the calc-units.el file is loaded right away, then the float doesn't appear.
>
> What could cause the elc file to behave differently than the el file?

One obvious candidate is
(eval-when-compile
  (require 'calc-alg))

This will _not_ be loaded by calc-unit.elc, but it will be loaded by
calc-unit.el.

So try loading it before calc-unit.elc and see whether that makes a
difference.

-- 
David Kastrup



  reply	other threads:[~2015-01-28  8:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 14:22 bug#19582: 25.0.50; [PATCH] Calc: glitches with negation of units Wolfgang Jenkner
2015-01-13 15:55 ` Jay Belanger
2015-01-13 16:01   ` Wolfgang Jenkner
2015-01-13 16:06     ` Jay Belanger
2015-01-13 16:25       ` Wolfgang Jenkner
2015-01-13 16:34         ` Jay Belanger
2015-01-13 16:48           ` Jay Belanger
2015-01-15 23:55       ` Wolfgang Jenkner
2015-01-18 16:29         ` Wolfgang Jenkner
2016-02-23 11:23         ` Lars Ingebrigtsen
2015-01-13 19:39     ` Wolfgang Jenkner
2015-01-13 21:57       ` Jay Belanger
2015-01-28  4:45       ` Compiled file behaves differently than the uncompiled file (Was Re: bug#19582) Jay Belanger
2015-01-28  8:42         ` David Kastrup [this message]
2015-01-28 13:33           ` Jay Belanger
2015-01-28 15:11       ` bug#19582: 25.0.50; [PATCH] Calc: glitches with negation of units Jay Belanger

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

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

  git send-email \
    --in-reply-to=87d25zcn51.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jay.p.belanger@gmail.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.