bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#19401: 25.0.50; metar.el (metar-convert-temperature) wrong type argu


From: Ulf Jasper
Subject: bug#19401: 25.0.50; metar.el (metar-convert-temperature) wrong type argument stringp nil
Date: Thu, 18 Dec 2014 18:00:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Mark Oteiza <mvoteiza@udel.edu> writes:

> The same; emacs from master and metar 0.1 from ELPA.  It works at this
> time when CODES in (metar-decode) is:
>
>   "KPHL 181354Z 29012KT 10SM BKN041 03/M07 A3010 RMK AO2 SLP190 T00281067"
>
> but for some reason the following from yesterday was bad input for metar.el:
>
>   "KPHL 172054Z 28015G23KT 10SM BKN046 10/M01 A2993 RMK AO2 PK WND 28029/2044 
> SLP135 T01001006 53013"

It appears that the temperature value -1 °C ("M01") is causing the error

    (metar-convert-temperature "M07") => (-7 . degC)
    (metar-convert-temperature "M01") => error (wrong-type-argument stringp nil)

I suspect that this is the result of `math-mul-symb-fancy' (which
metar.el calls via calc-units) treating "-1" in a special way

    (math-mul-symb-fancy -7 '(var degC var-degC)) => (* -7 (var degC var-degC))
    (math-mul-symb-fancy -1 '(var degC var-degC)) => (neg (var degC var-degC))

I have never looked at the calc library before and feel unable to cope
with it.  Hopefully someone else can stand in.

ulf

    





reply via email to

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