From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 26 14:54:35 2022 Received: (at submit) by debbugs.gnu.org; 26 Apr 2022 18:54:35 +0000 Received: from localhost ([127.0.0.1]:40561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njQKZ-0005et-7G for submit@debbugs.gnu.org; Tue, 26 Apr 2022 14:54:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:51874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njQKY-0005em-0T for submit@debbugs.gnu.org; Tue, 26 Apr 2022 14:54:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njQKW-0002SG-R8 for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2022 14:54:33 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:56101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njQKU-00029B-Q6 for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2022 14:54:32 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 6C62A320091B for ; Tue, 26 Apr 2022 14:54:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 26 Apr 2022 14:54:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1650999268; x=1651085668; bh=BPUALYvU/fYQgUnmmxfmkPrt6rTK0jpsbx4 AbxBc8mU=; b=l56MKwDdx5DP+a1wWXrrD+a3TS+CdH3qSuO4yQxbd65TywMyaEa xoVVhXUbqdehkbsAPiu7A/ZM7/0sYVtLUGxIEadG1zeOwuwlIBseTl3WLm3MEJ7x lFViKY10C0jOfUrl/LSTm431bNqgAsmtuJy2vxu84LKWe2dQ6F54Yhhh+NlDjf30 +KHlo+31YXv5gSSVIDvL2bCVgGbcqBrz8hlhZl7FNwoGVQyCG3Wm0eksFpDiKiKg YcBJWZzAief0smnKBaja3ARz/6D92pEX3WGheBjLcJFJN58DuTtDYPCZ9UCcjPgp 79Q04e4GfuhiKoxIprV8fLoHDwpJq6H7qHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1650999268; x=1651085668; bh=BPUALYvU/fYQg UnmmxfmkPrt6rTK0jpsbx4AbxBc8mU=; b=yBC4BRlLTn8wAE3KbPY+5YNA0vRmj RW5apwkk9ADUij5RjWFJoxQ0hYtXayRF9bBkMX+T2JibgI7b022yuzvCIErsJYHS LqcS/0Uux0u/OaISLzUKchPm+fCiCmQ/z592DsQhSQuqDJXsjVUyCjc236Qyc3AS UKzmJO0vfHEAjLKm5z5/UL30o9Qm0FAANQzzYdnCtsjSP/Zlj7Kfj3xiAyO4flRg heP7ruDfpzto7qVG7O17N5G6gg1NrhImzXkNDgRztAPodXQH0BgLINhyTWEpoM3e ClHyqIX02PQo5MFHMEBNtDM6vrUpyRiUncBgQ+/ty/G4m0tZcwN7LXdLg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefgdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufgffkfggtgesmhdttdertd ertdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhp fihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeekgeegueejledugeevve evleejfffhlefhgeffhfduhefhhfekvdehfeetvdeuleenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhith htohhnrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 26 Apr 2022 14:54:28 -0400 (EDT) Received: by melete.silentflame.com (Postfix, from userid 1000) id F10EC7E1EED; Tue, 26 Apr 2022 11:54:27 -0700 (MST) From: Sean Whitton To: bug-gnu-emacs@gnu.org Subject: 29.0.50; calc kill commands should be customisable not to include line numbering User-Agent: Notmuch/0.35 Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Tue, 26 Apr 2022 11:54:27 -0700 Message-ID: <87y1zr1xr0.fsf@melete.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.147.123.20; envelope-from=spwhitton@spwhitton.name; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.7 (--) --=-=-= Content-Type: text/plain Content-Disposition: inline Tags: patch Hello, I'd like to add a new user option to exclude line numbering from the primary calc kill and copy commands. Usually what you want to have in the kill ring is just the number. Patch attached. -- Sean Whitton --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-New-user-option-calc-kill-line-numbering.patch >From 81f88eb5fe76c2e75d3dd04dc77ca36a03d0a308 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 26 Apr 2022 11:39:38 -0700 Subject: [PATCH] New user option 'calc-kill-line-numbering' * lisp/calc/calc.el (calc-kill-line-numbering): New defcustom. * lisp/calc/calc-yank.el (calc-kill): Unless calc-kill-line-numbering is non-nil, do not include line numbering in text copied to kill ring. * etc/NEWS: * doc/misc/calc.texi (Killing from the Stack): Document the change. --- doc/misc/calc.texi | 6 ++++++ etc/NEWS | 6 ++++++ lisp/calc/calc-yank.el | 2 ++ lisp/calc/calc.el | 8 ++++++++ 4 files changed, 22 insertions(+) diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index d83edc15f3..9bda6af1c5 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -29877,6 +29877,12 @@ Killing From Stack @kbd{C-k} with a prefix argument of 1 copies the number with its trailing newline. +You can customize @code{calc-kill-line-numbering} to nil to exclude +line numbering from kills and copies made by @code{calc-kill} and +@code{calc-copy-as-kill}. This option does not affect calc kill and +copy commands which operate on the region, as that would not make +sense. + @node Yanking Into Stack @section Yanking into the Stack diff --git a/etc/NEWS b/etc/NEWS index c0b9ce654e..b462d02efd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1261,6 +1261,12 @@ Lisp function. This frees you from having to keep track of whether commands are Lisp function or external when supplying absolute file name arguments. See "Electric forward slash" in the Eshell manual. +** Calc + ++++ +*** New user option 'calc-kill-line-numbering'. +This can be set to nil to exclude line numbering from kills and copies. + ** Miscellaneous +++ diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 8c6d3f51e5..172ccf1adc 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -47,6 +47,8 @@ calc-kill (calc-check-stack num) (let ((stuff (calc-top-list n (- num n -1)))) (calc-cursor-stack-index num) + (unless calc-kill-line-numbering + (re-search-forward "\\=[0-9]+:\\s-+" (point-at-eol) t)) (let ((first (point))) (calc-cursor-stack-index (- num n)) (if (null nn) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 2c139a0238..725a2b0075 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -439,6 +439,14 @@ calc-note-threshold :version "24.1" :type 'string) +(defcustom calc-kill-line-numbering t + "If non-nil, calculator kills include any line numbering. + +This option does not affect calc kill and copy commands which +operate on the region, such as `calc-copy-region-as-kill'." + :version "29.1" + :type 'boolean) + (defvar math-format-date-cache) ; calc-forms.el (defface calc-nonselected-face -- 2.30.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 09:02:09 2022 Received: (at 55133) by debbugs.gnu.org; 27 Apr 2022 13:02:10 +0000 Received: from localhost ([127.0.0.1]:41557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njhJ3-0002PT-I0 for submit@debbugs.gnu.org; Wed, 27 Apr 2022 09:02:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njhJ1-0002JX-CP for 55133@debbugs.gnu.org; Wed, 27 Apr 2022 09:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rn+knGymtFNAaOJlh5ZEsZni+KBQRlO0keK2+RPmUKA=; b=arSfe0kkg2WbScIYknd/iZ+qRL VsIsiQNxosrFXg0YwzTAoC+I3QYfwfFB5xSSbljXs5wPoEzCIM6WAN2ilr66kmw30tmw4v7gLhS+F P3bBVdXxu/+f16oKO5v6Lpn5lCQ1FEtsJtIX/aa+XmCm/kmMLC5t3QTzLJv0YlBrDvFk=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njhIs-0005RW-52; Wed, 27 Apr 2022 15:02:00 +0200 From: Lars Ingebrigtsen To: Sean Whitton Subject: Re: bug#55133: 29.0.50; calc kill commands should be customisable not to include line numbering References: <87y1zr1xr0.fsf@melete.silentflame.com> X-Now-Playing: Kate Bush's _This Woman's Work I_: "December Will Be Magic Again" Date: Wed, 27 Apr 2022 15:01:57 +0200 In-Reply-To: <87y1zr1xr0.fsf@melete.silentflame.com> (Sean Whitton's message of "Tue, 26 Apr 2022 11:54:27 -0700") Message-ID: <87mtg6bry2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Sean Whitton writes: > I'd like to add a new user option to exclude line numbering from the > primary calc kill and copy commands. Usually what you want to have in > the kill ring is just the number. Patch attached. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55133 Cc: 55133@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Sean Whitton writes: > I'd like to add a new user option to exclude line numbering from the > primary calc kill and copy commands. Usually what you want to have in > the kill ring is just the number. Patch attached. Makes sense to me; go ahead and push. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 16:28:58 2022 Received: (at 55133-done) by debbugs.gnu.org; 27 Apr 2022 20:28:58 +0000 Received: from localhost ([127.0.0.1]:44506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njoHS-0003u0-HA for submit@debbugs.gnu.org; Wed, 27 Apr 2022 16:28:58 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:54701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njoHR-0003tj-2W for 55133-done@debbugs.gnu.org; Wed, 27 Apr 2022 16:28:57 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id ED885320093B for <55133-done@debbugs.gnu.org>; Wed, 27 Apr 2022 16:28:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 27 Apr 2022 16:28:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1651091330; x=1651177730; bh=6QxTunS5FH nzwn4Wyyuy2pwZUz/eJPtW5+c58MJPLUI=; b=I94R2pc1yVkwtzJDNXa/8dYwhL uUA7pYhTVjYkC+i4lHoDUfMYsyYULDd7kpybzQ/hZgXOBuqlEYKDbinhJdO3UXu+ fr65l1oB63Do7nlpzaqdj3hfr7FJr2UrvNvHB+KV5BeqO8vdICr1o/9uksJ9zBnB sC8FSvyJDpnrXMm6pxXTnpSHtkEmwFACHn0F8qcEPTQcXMU4M9iu0vihErOP/EcB OxdqiENOkD4M4pg4eGOFIKaTe1cZQSVdINc6RIEBY7WseiH0tKRZgAoONiPojkrF x68ychBcO2GresFCqy5gtcONtn67GhIkEU32KDYYW1tMtO/9kH2lzkv0yYjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1651091330; x= 1651177730; bh=6QxTunS5FHnzwn4Wyyuy2pwZUz/eJPtW5+c58MJPLUI=; b=b hgSLn1dwKHfWcRwThJrlF+ooQR+hGUZq1v7JYh9lmYSILjFoQTv67Uc6dzhzm5Xe 02orwOLlXJJfjDw1DfoeIykrIlJRQCKGeNl2S3+NH2vaNeQ70qRYQcYC3S4BkiKp +z2jSsSRcp/g6GS6DooqNaywATO0UzZ9PVHpB4A/A0pEQ9zErEdTGadqJ6eyZ3Bu WxL+q7l/bH1G/9mnw+2vwFzzVYuNtYXHvaskJWCT8Pq7f2Onqvwb0cYTqK17sLQr QApzhbDzNxsUBteQN6KCe7+ZJH6KQYkmDFO84R1JQfvyE5ZEskwEUe5eHgmBJQoU zWRUtooCMZHW3iaxolFRg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehgddugeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesthdttd dttdertdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhes shhpfihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeelgeeggfdvieejvd fhudfggeetgfekkeeuieeljeejhedugeegfeetgefhueffkeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhh hithhtohhnrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for <55133-done@debbugs.gnu.org>; Wed, 27 Apr 2022 16:28:50 -0400 (EDT) Received: by melete.silentflame.com (Postfix, from userid 1000) id 0CEA37E52A9; Wed, 27 Apr 2022 13:28:49 -0700 (MST) From: Sean Whitton To: 55133-done@debbugs.gnu.org Subject: Re: bug#55133: 29.0.50; calc kill commands should be customisable not to include line numbering In-Reply-To: <87mtg6bry2.fsf@gnus.org> References: <87y1zr1xr0.fsf@melete.silentflame.com> <87mtg6bry2.fsf@gnus.org> User-Agent: Notmuch/0.35 Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Wed, 27 Apr 2022 13:28:48 -0700 Message-ID: <87bkwm1da7.fsf@melete.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55133-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello, On Wed 27 Apr 2022 at 03:01PM +02, Lars Ingebrigtsen wrote: > Sean Whitton writes: > >> I'd like to add a new user option to exclude line numbering from the >> primary calc kill and copy commands. Usually what you want to have in >> the kill ring is just the number. Patch attached. > > Makes sense to me; go ahead and push. Thanks for looking it over. -- Sean Whitton From unknown Thu Aug 14 22:21:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 May 2022 11:24:06 +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