From: Mark Oteiza <mvoteiza@udel.edu>
To: 19401@debbugs.gnu.org, Mario Lang <mlang@delysid.org>,
Wolfgang Jenkner <wjenkner@inode.at>
Subject: bug#19401: 25.0.50; metar.el (metar-convert-temperature) wrong type argument stringp nil
Date: Tue, 29 Dec 2015 15:26:49 -0500 [thread overview]
Message-ID: <87wprx57cm.fsf@udel.edu> (raw)
In-Reply-To: <85sifem7yq.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Wed, 14 Jan 2015 02:47:28 +0100")
Wolfgang Jenkner <wjenkner@inode.at> writes:
> On Tue, Jan 13 2015, Wolfgang Jenkner wrote:
>
>> Please note that this patch assumes that the patch from (Bug#19582) has
>> been applied.
>
> Actually, the following patch (on top of the last one) might be enough
> for metar to avoid the need for that fix from bug#19582, and so to
> remain compatible with older (than the future trunk ;-) emacs versions.
>
>>From ad084a9b35e79f3524e4ef01137cf256c0509266 Mon Sep 17 00:00:00 2001
> From: Wolfgang Jenkner <wjenkner@inode.at>
> Date: Wed, 14 Jan 2015 02:31:01 +0100
> Subject: [PATCH] [metar] Add a work-around for bug#19582.
>
> * packages/metar/metar.el (metar-convert-unit): Rewrite expr if it
> starts with the `neg' operator. Technically, this is wrong because
> various functions in calc-units expect already simplified
> expressions. In practice, it should work around the above bug.
> ---
> packages/metar/metar.el | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/packages/metar/metar.el b/packages/metar/metar.el
> index 9575313..a05a353 100644
> --- a/packages/metar/metar.el
> +++ b/packages/metar/metar.el
> @@ -249,6 +249,9 @@ It must have the signature of `math-convert-units', which is the default."
> (unless (symbolp new-unit)
> (setq new-unit (intern new-unit)))
> (let ((expr (math-simplify (math-read-expr value))))
> + ;; Sneakily work around bug#19582.
> + (when (eq (car-safe expr) 'neg)
> + (setq expr `(* -1 ,(cadr expr))))
> (cl-assert (or (math-zerop expr)
> (not (memq (math-single-units-in-expr-p expr) '(nil wrong))))
> nil
It looks to me that the patch in bug#19401 that Wolfgang's patches
depend on has been applied some time ago. I find the issue in emacs 24
and 25 to be fixed with both metar.el patches applied.
prev parent reply other threads:[~2015-12-29 20:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 21:15 bug#19401: 25.0.50; metar.el (metar-convert-temperature) wrong type argument stringp nil Mark Oteiza
2014-12-18 14:29 ` Ulf Jasper
2014-12-18 14:51 ` Mark Oteiza
2014-12-18 17:00 ` Ulf Jasper
2015-01-13 14:34 ` Wolfgang Jenkner
2015-01-13 17:57 ` Ulf Jasper
2015-01-13 20:11 ` Wolfgang Jenkner
2016-02-19 18:04 ` Wolfgang Jenkner
2016-02-26 15:50 ` Wolfgang Jenkner
2016-02-29 19:28 ` Wolfgang Jenkner
2015-01-14 1:47 ` Wolfgang Jenkner
2015-12-29 20:26 ` Mark Oteiza [this message]
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=87wprx57cm.fsf@udel.edu \
--to=mvoteiza@udel.edu \
--cc=19401@debbugs.gnu.org \
--cc=mlang@delysid.org \
--cc=wjenkner@inode.at \
/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.