From unknown Fri Aug 08 15:17:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12687: 24.2.50; calc volume units conversion Resent-From: Edmund Kademan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Oct 2012 22:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12687@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135068710311296 (code B ref -1); Fri, 19 Oct 2012 22:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Oct 2012 22:51:43 +0000 Received: from localhost ([127.0.0.1]:52302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPLPp-0002w3-2F for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:51:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56042) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPL2N-0002Mf-Td for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:27:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPL0n-0003jh-RF for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:25:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPL0n-0003jN-OA for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:25:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPL0m-0005fo-1K for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPL0k-0003fC-Ir for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:47 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]:50417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPL0k-0003cl-C6 for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:46 -0400 Received: by mail-vb0-f41.google.com with SMTP id v13so1290783vbk.0 for ; Fri, 19 Oct 2012 15:25:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type :x-gm-message-state; bh=m5riIMC+rpIxVwVu4ZCwnW0+SASPvHS3lSiFYrWoAM8=; b=Cp1Yu0Hm+p42jnp6TqWe0SAE7wajbmg0zEDmQxBXNtlkL/1ojZln1p8DUru7vNePvi didILO6rZhg7nCAD71hu1e8/3v30xkFQXKtL/6Ke8hgfMupS9K598OCin/Ngckwo8Fib iGcg0UxsWa3pREf06M74fTbALS8+5QzTVFdB/I8NAsozb8M5g/mXzTjP5j41T1TXpN+y o+BcV8BBKBT6gZ6U4BplaNoQo50OwTled1P2++tBlhVYdZMy3va/ZAXFe1YOA1xH0+yK 8B9s9DDS7cc4Cyp5Y41VPhjsS+3xXEsP/MnPEYE+i/mWF9MF42IQIbUn3N0M7du3YzJ0 7btA== Received: by 10.58.59.36 with SMTP id w4mr3756236veq.26.1350685543908; Fri, 19 Oct 2012 15:25:43 -0700 (PDT) Received: from dl (rrcs-50-75-78-61.nys.biz.rr.com. [50.75.78.61]) by mx.google.com with ESMTPS id dq8sm2160430vdc.4.2012.10.19.15.25.40 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 15:25:42 -0700 (PDT) Received: from ejk by dl with local (Exim 4.76) (envelope-from ) id 1TPL0d-0005g3-BL for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:39 -0400 From: Edmund Kademan Date: Fri, 19 Oct 2012 18:25:39 -0400 Message-ID: <876266cd5o.fsf@dl.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-Gm-Message-State: ALoCoQn5SxgdrBC/axdD7mTdUVcEoVXZOixFWxte6YQZSCQAZMvDdR/VpStGPXDmLDWzXCLQq1hI X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Mailman-Approved-At: Fri, 19 Oct 2012 18:51:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) emacs -Q C-x ** ;start calc 'gal RET ;enter 1 gallon uc ;try to convert to new units At this point calc should prompt for new units, but it does not. A workaround for me is to redefine the math-get-standard-units function: *** calc-units.el 2012-10-19 17:35:54.000000000 -0400 --- calc-units-changed.el 2012-10-19 18:14:30.000000000 -0400 *************** *** 383,390 **** (defun math-get-standard-units (expr) "Return the standard units in EXPR." ! (math-simplify-units ! (math-extract-units (math-to-standard-units expr nil)))) (defun math-get-units (expr) --- 383,390 ---- (defun math-get-standard-units (expr) "Return the standard units in EXPR." ! (math-extract-units ! (math-simplify-units (math-to-standard-units expr nil)))) (defun math-get-units (expr) In GNU Emacs 24.2.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-10-19 on dl Windowing system distributor `The X.Org Foundation', version 11.0.11103000 System Description: Ubuntu 12.04.1 LTS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From unknown Fri Aug 08 15:17:25 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Edmund Kademan Subject: bug#12687: closed (Re: bug#12687: 24.2.50; calc volume units conversion) Message-ID: References: <87wqylepzb.fsf@gmail.com> <876266cd5o.fsf@dl.i-did-not-set--mail-host-address--so-tickle-me> X-Gnu-PR-Message: they-closed 12687 X-Gnu-PR-Package: emacs Reply-To: 12687@debbugs.gnu.org Date: Sat, 20 Oct 2012 04:20:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1350706802-7045-1" This is a multi-part message in MIME format... ------------=_1350706802-7045-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12687: 24.2.50; calc volume units conversion which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 12687@debbugs.gnu.org. --=20 12687: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12687 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1350706802-7045-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12687-done) by debbugs.gnu.org; 20 Oct 2012 04:19:48 +0000 Received: from localhost ([127.0.0.1]:52502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPQXL-0001pB-I6 for submit@debbugs.gnu.org; Sat, 20 Oct 2012 00:19:48 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:63414) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPQXJ-0001oz-1J for 12687-done@debbugs.gnu.org; Sat, 20 Oct 2012 00:19:45 -0400 Received: by mail-ob0-f172.google.com with SMTP id v19so1007318obq.3 for <12687-done@debbugs.gnu.org>; Fri, 19 Oct 2012 21:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:reply-to:cc:date:message-id :user-agent:mime-version:content-type; bh=tYCrwuQ17/3KHTQuIsmbfgt2tJk5yjxVtOciV5QiJ6U=; b=yzTV2kgI0TQNViF8Qn8BwpgALim6QhZVq8wYH2pUlIh7xLiL7Gdy/LqQv+MhXVPtn2 /FdCmIV6rmLaRNin9K43WHvKmHx+1y9G4U+vcAzxfhDlOkffi4FCaAGabYPBzOLRtsIi Fe7tWCq5wrVv71yEv5kdn1DALosgsJ8xu25jTATNmvmSuoL8LqswVz3wi3mTPG/qu4da +42yuK0AEQo6HsRedDV/vMXt9bJTllT2ft/W5cUmrSl2bU2dVvXJ/y8AQAWs4mp+BPdw eEg9jn8ECv6p3oPfyehXhlqql7P9zmTeAn6pDGS6sIs7rc8DNT139CU23JuLkhXv5a5q mNwg== Received: by 10.60.169.244 with SMTP id ah20mr2783647oec.123.1350706685210; Fri, 19 Oct 2012 21:18:05 -0700 (PDT) Received: from belanger-home (184-155-88-117.cpe.cableone.net. [184.155.88.117]) by mx.google.com with ESMTPS id hc1sm3513669obc.7.2012.10.19.21.18.03 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 21:18:04 -0700 (PDT) From: Jay Belanger To: Edmund Kademan Subject: Re: bug#12687: 24.2.50; calc volume units conversion References: <876266cd5o.fsf@dl.i-did-not-set--mail-host-address--so-tickle-me> Date: Fri, 19 Oct 2012 23:18:00 -0500 Message-ID: <87wqylepzb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12687-done Cc: jay.p.belanger@gmail.com, 12687-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: jay.p.belanger@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) > emacs -Q > C-x ** ;start calc > 'gal RET ;enter 1 gallon > uc ;try to convert to new units > > At this point calc should prompt for new units, but it does not. Oh; thanks for catching this! > A workaround for me is to redefine the math-get-standard-units > function: That works for this case (but for the wrong reasons ... for example, if you convert gallons to liters and then convert gallons again, it won't offer liters as a default). The problem was that `math-extract-units' wasn't dealing with powers of units (and the standard units for volume are m^3). This has been fixed in bzr. Thanks again, Jay ------------=_1350706802-7045-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Oct 2012 22:51:43 +0000 Received: from localhost ([127.0.0.1]:52302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPLPp-0002w3-2F for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:51:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56042) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPL2N-0002Mf-Td for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:27:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPL0n-0003jh-RF for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:25:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPL0n-0003jN-OA for submit@debbugs.gnu.org; Fri, 19 Oct 2012 18:25:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPL0m-0005fo-1K for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPL0k-0003fC-Ir for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:47 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]:50417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPL0k-0003cl-C6 for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:46 -0400 Received: by mail-vb0-f41.google.com with SMTP id v13so1290783vbk.0 for ; Fri, 19 Oct 2012 15:25:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type :x-gm-message-state; bh=m5riIMC+rpIxVwVu4ZCwnW0+SASPvHS3lSiFYrWoAM8=; b=Cp1Yu0Hm+p42jnp6TqWe0SAE7wajbmg0zEDmQxBXNtlkL/1ojZln1p8DUru7vNePvi didILO6rZhg7nCAD71hu1e8/3v30xkFQXKtL/6Ke8hgfMupS9K598OCin/Ngckwo8Fib iGcg0UxsWa3pREf06M74fTbALS8+5QzTVFdB/I8NAsozb8M5g/mXzTjP5j41T1TXpN+y o+BcV8BBKBT6gZ6U4BplaNoQo50OwTled1P2++tBlhVYdZMy3va/ZAXFe1YOA1xH0+yK 8B9s9DDS7cc4Cyp5Y41VPhjsS+3xXEsP/MnPEYE+i/mWF9MF42IQIbUn3N0M7du3YzJ0 7btA== Received: by 10.58.59.36 with SMTP id w4mr3756236veq.26.1350685543908; Fri, 19 Oct 2012 15:25:43 -0700 (PDT) Received: from dl (rrcs-50-75-78-61.nys.biz.rr.com. [50.75.78.61]) by mx.google.com with ESMTPS id dq8sm2160430vdc.4.2012.10.19.15.25.40 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 15:25:42 -0700 (PDT) Received: from ejk by dl with local (Exim 4.76) (envelope-from ) id 1TPL0d-0005g3-BL for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 18:25:39 -0400 From: Edmund Kademan To: bug-gnu-emacs@gnu.org Subject: 24.2.50; calc volume units conversion Date: Fri, 19 Oct 2012 18:25:39 -0400 Message-ID: <876266cd5o.fsf@dl.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-Gm-Message-State: ALoCoQn5SxgdrBC/axdD7mTdUVcEoVXZOixFWxte6YQZSCQAZMvDdR/VpStGPXDmLDWzXCLQq1hI X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 19 Oct 2012 18:51:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) emacs -Q C-x ** ;start calc 'gal RET ;enter 1 gallon uc ;try to convert to new units At this point calc should prompt for new units, but it does not. A workaround for me is to redefine the math-get-standard-units function: *** calc-units.el 2012-10-19 17:35:54.000000000 -0400 --- calc-units-changed.el 2012-10-19 18:14:30.000000000 -0400 *************** *** 383,390 **** (defun math-get-standard-units (expr) "Return the standard units in EXPR." ! (math-simplify-units ! (math-extract-units (math-to-standard-units expr nil)))) (defun math-get-units (expr) --- 383,390 ---- (defun math-get-standard-units (expr) "Return the standard units in EXPR." ! (math-extract-units ! (math-simplify-units (math-to-standard-units expr nil)))) (defun math-get-units (expr) In GNU Emacs 24.2.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-10-19 on dl Windowing system distributor `The X.Org Foundation', version 11.0.11103000 System Description: Ubuntu 12.04.1 LTS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) ------------=_1350706802-7045-1--