From unknown Tue Aug 19 05:11:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18469 <18469@debbugs.gnu.org> To: bug#18469 <18469@debbugs.gnu.org> Subject: Status: 24.4.50; quick-calc: Insert result into the current buffer Reply-To: bug#18469 <18469@debbugs.gnu.org> Date: Tue, 19 Aug 2025 12:11:04 +0000 retitle 18469 24.4.50; quick-calc: Insert result into the current buffer reassign 18469 emacs submitter 18469 Christopher Schmidt severity 18469 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 13 14:41:18 2014 Received: (at submit) by debbugs.gnu.org; 13 Sep 2014 18:41:18 +0000 Received: from localhost ([127.0.0.1]:40412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSsG5-0003Iz-0w for submit@debbugs.gnu.org; Sat, 13 Sep 2014 14:41:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33129) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSsG1-0003Ir-Vm for submit@debbugs.gnu.org; Sat, 13 Sep 2014 14:41:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSsFv-0002bH-2u for submit@debbugs.gnu.org; Sat, 13 Sep 2014 14:41:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSsFu-0002bD-Vs for submit@debbugs.gnu.org; Sat, 13 Sep 2014 14:41:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSsFq-000540-FX for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2014 14:41:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSsFk-0002ad-Rh for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2014 14:41:02 -0400 Received: from ristopher.com ([81.4.108.209]:54160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSsFk-0002aY-HX for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2014 14:40:56 -0400 Received: by ristopher.com (Postfix, from userid 0) id B355020650; Sat, 13 Sep 2014 14:40:54 -0400 (EDT) From: Christopher Schmidt To: bug-gnu-emacs@gnu.org Subject: 24.4.50; quick-calc: Insert result into the current buffer Message-ID: <87r3zfpdn1@ristopher.com> Mail-Followup-To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Sat, 13 Sep 2014 14:40:54 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain severity: wishlist There is this nifty feature of quick-calc (C-x * q): (info "(calc)Quick Calculator") If you finish your formula by typing (or `C-j') instead of , the result is inserted immediately into the current buffer rather than going into the kill ring. This should be mentioned in the doc string. In fact, considering that inserting the result of a quick calculation into the current is an elementary use case, quick-calc's prefix arg should be dedicated to enabling this feature. --=-=-= Content-Type: text/x-diff Content-Disposition: inline --- doc/misc/ChangeLog +++ doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-13 Christopher Schmidt + + * calc.texi (Quick Calculator): + Mention prefix argument of `quick-calc'. (Bug#) + 2014-09-04 Paul Eggert Less chatter in 'make' output. --- doc/misc/calc.texi +++ doc/misc/calc.texi @@ -10168,9 +10168,10 @@ explicit alternative to @kbd{$} notation, or to yank the result into the Calculator stack after typing @kbd{C-x * c}. -If you finish your formula by typing @key{LFD} (or @kbd{C-j}) instead -of @key{RET}, the result is inserted immediately into the current -buffer rather than going into the kill ring. +If you give a prefix argument to @kbd{C-x * q} or finish your formula +by typing @key{LFD} (or @kbd{C-j}) instead of @key{RET}, the result is +inserted immediately into the current buffer rather than going into +the kill ring. Quick Calculator results are actually evaluated as if by the @kbd{=} key (which replaces variable names by their stored values, if any). --- etc/ChangeLog +++ etc/ChangeLog @@ -1,5 +1,7 @@ 2014-09-13 Christopher Schmidt + * NEWS: Mention prefix argument of `quick-calc'. (Bug#) + * NEWS: Mention nil `calendar-mode-line-format' will not modify the mode line of the calendar buffer. (Bug#18467) --- etc/NEWS +++ etc/NEWS @@ -116,6 +116,11 @@ ** Macro `minibuffer-with-setup-hook' takes (:append FUN) to mean appending FUN to `minibuffer-setup-hook'. +** Calc + +*** If `quick-calc' is called with a prefix argument, insert the +result of the calculation into the current buffer. + ** Calendar and diary +++ --- lisp/ChangeLog +++ lisp/ChangeLog @@ -1,5 +1,9 @@ 2014-09-13 Christopher Schmidt + * calc/calc.el (quick-calc): + * calc/calc-aent.el (calc-do-quick-calc): + New argument INSERT. (Bug#) + * calendar/calendar.el (calendar-update-mode-line): Do not overwrite mode-line-format if calendar-mode-line-format is nil. (Bug#18467) --- lisp/calc/calc-aent.el +++ lisp/calc/calc-aent.el @@ -52,7 +52,8 @@ "The history list for quick-calc.") ;;;###autoload -(defun calc-do-quick-calc () +(defun calc-do-quick-calc (&optional insert) + (interactive "P") (require 'calc-ext) (calc-check-defines) (if (eq major-mode 'calc-mode) @@ -108,7 +109,8 @@ (setq buf long)))) (calc-handle-whys) (message "Result: %s" buf))) - (if (eq last-command-event 10) + (if (or insert + (eq last-command-event 10)) (insert shortbuf) (kill-new shortbuf))))) --- lisp/calc/calc.el +++ lisp/calc/calc.el @@ -147,7 +147,7 @@ (declare-function calc-edit-finish "calc-yank" (&optional keep)) (declare-function calc-edit-cancel "calc-yank" ()) (declare-function calc-locate-cursor-element "calc-yank" (pt)) -(declare-function calc-do-quick-calc "calc-aent" ()) +(declare-function calc-do-quick-calc "calc-aent" (&optional insert)) (declare-function calc-do-calc-eval "calc-aent" (str separator args)) (declare-function calc-do-keypad "calc-keypd" (&optional full-display interactive)) (declare-function calcFunc-unixtime "calc-forms" (date &optional zone)) @@ -1549,10 +1549,12 @@ (and kbuf (bury-buffer kbuf)))))) ;;;###autoload -(defun quick-calc () - "Do a quick calculation in the minibuffer without invoking full Calculator." - (interactive) - (calc-do-quick-calc)) +(defun quick-calc (&optional insert) + "Do a quick calculation in the minibuffer without invoking full Calculator. +With prefix argument INSERT, insert the result in the current +buffer. Otherwise, the result is copied into the kill ring." + (interactive "P") + (calc-do-quick-calc insert)) ;;;###autoload (defun calc-eval (str &optional separator &rest args) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 13 17:06:59 2014 Received: (at submit) by debbugs.gnu.org; 13 Sep 2014 21:06:59 +0000 Received: from localhost ([127.0.0.1]:40427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSuX5-0006pU-4O for submit@debbugs.gnu.org; Sat, 13 Sep 2014 17:06:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53933) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSuX0-0006pI-SQ for submit@debbugs.gnu.org; Sat, 13 Sep 2014 17:06:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSuWu-0001pU-VO for submit@debbugs.gnu.org; Sat, 13 Sep 2014 17:06:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSuWu-0001pQ-Sn for submit@debbugs.gnu.org; Sat, 13 Sep 2014 17:06:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSuWp-0000tK-RP for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2014 17:06:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSuWl-0001o9-2p for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2014 17:06:43 -0400 Received: from ristopher.com ([81.4.108.209]:54167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSuWk-0001o5-Sx for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2014 17:06:39 -0400 Received: by ristopher.com (Postfix, from userid 0) id 017A620650; Sat, 13 Sep 2014 17:06:36 -0400 (EDT) From: Christopher Schmidt To: bug-gnu-emacs@gnu.org Subject: Re: bug#18469: 24.4.50; quick-calc: Insert result into the current buffer In-Reply-To: <87r3zfpdn1@ristopher.com> (Christopher Schmidt's message of "Sat, 13 Sep 2014 14:40:54 -0400 (EDT)") Message-ID: <877g17xmb1@ristopher.com> References: <87r3zfpdn1@ristopher.com> Mail-Followup-To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: text/plain Date: Sat, 13 Sep 2014 17:06:36 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Christopher Schmidt writes: > ;;;###autoload > -(defun calc-do-quick-calc () > +(defun calc-do-quick-calc (&optional insert) > + (interactive "P") ^^^^^^^^^^^^^^^^^ FWIW the interactive form here is unnecessary. I missed removing this one before preparing the patch. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 28 20:42:52 2014 Received: (at 18469-done) by debbugs.gnu.org; 29 Oct 2014 00:42:52 +0000 Received: from localhost ([127.0.0.1]:38074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XjHLf-0004S2-W5 for submit@debbugs.gnu.org; Tue, 28 Oct 2014 20:42:52 -0400 Received: from mail-ob0-f177.google.com ([209.85.214.177]:47808) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XjHLc-0004Rj-Et for 18469-done@debbugs.gnu.org; Tue, 28 Oct 2014 20:42:48 -0400 Received: by mail-ob0-f177.google.com with SMTP id m8so1489376obr.36 for <18469-done@debbugs.gnu.org>; Tue, 28 Oct 2014 17:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:reply-to:cc:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=V34OUQeMz6rknkGEKrF1/YQN2Z54Ceqb0OHPo1VZJz8=; b=jyHNX/KzbvgvkLAG0mQtnZnvELhc3F2ENH7Isv4A+tgmHt15Vi77b06+bZdbaKLUzF 3NcS433qpshPv2Bqy2wad/dzup59Ct4Pmg+vQEoFgLEKKjmQwmQ2kOPqHpUxi5bDigmN Th65gIyrID+n+29fTaLkR7w8KpHJ/L58mZvdF7Mimp1eVdOWMm0MXQEbeQP4e5AYuHlP GK53PqrB4IHobFXUmQTmd2d2DwYiohh8ygZtKgvjT9dFnLm4KrrJNxhR+ydQ1R3g7brG ICILxoZ9YLXyn5V/IuCMz1xIh4Ogj7BGn5PLiSshXpF/tfjwmj0238q4Bq2001IKD9Qf 4dzw== X-Received: by 10.182.20.112 with SMTP id m16mr5596662obe.25.1414543362568; Tue, 28 Oct 2014 17:42:42 -0700 (PDT) Received: from belanger-home (184-155-90-233.cpe.cableone.net. [184.155.90.233]) by mx.google.com with ESMTPSA id yp6sm1280356obc.19.2014.10.28.17.42.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 28 Oct 2014 17:42:41 -0700 (PDT) From: Jay Belanger To: 18469-done@debbugs.gnu.org Subject: Re: bug#18469: 24.4.50; quick-calc: Insert result into the current buffer References: <87r3zfpdn1@ristopher.com> Date: Tue, 28 Oct 2014 19:42:52 -0500 In-Reply-To: <87r3zfpdn1@ristopher.com> (Christopher Schmidt's message of "Sat, 13 Sep 2014 14:40:54 -0400 (EDT)") Message-ID: <87ioj3d7ub.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18469-done Cc: jay.p.belanger@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: jay.p.belanger@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) The patch has been committed. From unknown Tue Aug 19 05:11:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 26 Nov 2014 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator