X-Loop: help-debbugs@HIDDEN Subject: bug#75789: [PATCH Debbugs] Factor cache accesses into dedicated functions Resent-From: Morgan Smith <Morgan.J.Smith@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: michael.albinus@HIDDEN, bug-gnu-emacs@HIDDEN Resent-Date: Thu, 23 Jan 2025 18:35:01 +0000 Resent-Message-ID: <handler.75789.B.173765724521894 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 75789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 75789 <at> debbugs.gnu.org Cc: Morgan Smith <Morgan.J.Smith@HIDDEN>, Michael Albinus <michael.albinus@HIDDEN> X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN X-Debbugs-Original-Xcc: Michael Albinus <michael.albinus@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.173765724521894 (code B ref -1); Thu, 23 Jan 2025 18:35:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2025 18:34:05 +0000 Received: from localhost ([127.0.0.1]:42335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tb21l-0005h4-2N for submit <at> debbugs.gnu.org; Thu, 23 Jan 2025 13:34:05 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43240) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <Morgan.J.Smith@HIDDEN>) id 1tb21i-0005gR-1g for submit <at> debbugs.gnu.org; Thu, 23 Jan 2025 13:34:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Morgan.J.Smith@HIDDEN>) id 1tb21V-0007Ln-8S for bug-gnu-emacs@HIDDEN; Thu, 23 Jan 2025 13:33:49 -0500 Received: from mail-bn8nam12olkn2081a.outbound.protection.outlook.com ([2a01:111:f403:2c18::81a] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Morgan.J.Smith@HIDDEN>) id 1tb21S-0003UW-Tu for bug-gnu-emacs@HIDDEN; Thu, 23 Jan 2025 13:33:48 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IgYNK5/v4E/6WwZp+/n9RIuCNiDoCbYlK8fIEF4XnXgHPygbYg2jz83FERcTZyG3cjwulNDPDBz9iuNZpfQqf0CTsQ7LQdzqJYPlfBe5nrbuVxLzs175wKoFx+1lSyJnTEiJZYUhDZNz17qVL2wLW2ZQxpAAe+62o1WXN3JEeyX9DGV1QFUuW7S6HSctae4HTr3HvXFMrfKOK/9upGMl3ooi69jVMcgkuEWDcxdqgjeS+r9Xepu6nqvsnkfW1g2TbYyG01LJKDy2r/nrE+VZ526qojTiDMrrB742FKi8es5uS0woAItmG0AV5gSWXAQtmyvWVlst5oqK2IXeGPMvHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zXQh28F5PmCpsYpiUxFJ65uYn5T2jkNUsGXBzNvxSAI=; b=Y2Z+cf5HicpbABFm/arYmDyqAuD3Jxqji1zhaIa/41yoCKt/7Hfspe5gRzK7kj5d5z6O6KlDVkSQTwIjHDH24cKWrs6XLVNE0keWp28Ism4oUlMxJld3Cbs5VuHYS925f7nQB0Kfu/xB7bdtXqWE1TNw39gmtogyLTqTCFsVPOu+q0X1yfp7Vk4JWi2Uvie7/Lyyl6ituJGwBARKDEKI5Qb/2nBA0di8hAL7ixtFidNfZP5LtKgxXjYvLidGiQA5dXH3AYZyPl5kJqlxnX4rA/GWBoxAqfr0MhcUVgyR4VHZGRWAbc3yh+cY1ToOB9RPhYS2m26gGzycq//rAGHYCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zXQh28F5PmCpsYpiUxFJ65uYn5T2jkNUsGXBzNvxSAI=; b=QtY4E7ZsODjW6QqU8nl4t2/rGRF6h6m9nXo1cpDw/RAPe6nRmdxOliM+AD8Sq/Xjb8KZ2wA3il2M3aVsGUG33XNWgLVUW2O0r1DB3Xoj8f8TWWwW0gPVWtrVegIgSvs/mCHij7PR4t4hiJkHIFQN0ES6y53tA+sRXfwoY8tRgeEOHtx7QIFuA7Gf3Ghi3NuCoDZb9LD7uIgfpMgjfmCKPBuCsRoiRzfd5ih8NFjv9s0sNGIm0XsEpsceAqMfNz4btaRxcvWbo9CWXYEZc4XegR7uI6f1UCzU9+OzDeT3VOeSPDYA7ipOo1NoQclaao7x8atzKN6FGBjUHvDbICznbg== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by PH0PR84MB1478.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:171::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.16; Thu, 23 Jan 2025 18:28:41 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef%7]) with mapi id 15.20.8356.020; Thu, 23 Jan 2025 18:28:41 +0000 From: Morgan Smith <Morgan.J.Smith@HIDDEN> Date: Thu, 23 Jan 2025 13:22:18 -0500 Message-ID: <CH3PR84MB342425F4DDC526B5A474FC52C5E02@HIDDEN> X-Mailer: git-send-email 2.47.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT1P288CA0024.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01::37) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: <20250123182217.24448-2-Morgan.J.Smith@HIDDEN> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|PH0PR84MB1478:EE_ X-MS-Office365-Filtering-Correlation-Id: bffe0ac8-808c-4e7b-c084-08dd3bdbc2f2 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199028|5072599009|7092599003|19110799003|15080799006|8060799006|440099028|3412199025|41001999003|1710799026; X-Microsoft-Antispam-Message-Info: rBHRX/QT/d2JcQjRW8+6o4ODuFs7Vl0duJY4WNhnsjFiwYShFEIyNDGLEFWu7F+IyB/XJy8fXItK6xT+mt1zMKFER6BNtlSkpCuHAb7oDrOTjHhzuDqs0R9A15kp6MihLniB2Gh+mYGicfKS66gaLceoJTdeQmssuux7L4wz5+kd16zxkXTivYeKPkDzyqkzcF3qMLeoifPPkHc//15iCS43ssK8zHXR49Pg8JdZ4oYNeJ7XgR9rPOHuUR+huQUiM1mByAyT8lsxMMnoQgfwRDP6x423B/jCQV8EyRcnUVsD91ifCotz5qrlMT3GXZupPa3kMjfXNgqnyAoAdhRNoJNPSKQJIsD71laLOFGH4lFjdgNAovNqT6C1zhV8pQO3wBKrCfha2wkonGA9MQMecl+ertevbJdR4andWZ/rWsNk6RQNu9rvok3YvV1UJOV+XTRVJUYt4bVHBO2rDIYyF+/Z2kAAaLXNaeYWy/dNPacvZL4IL4tvnIUCpjbIPC4mYsbAje2ZX8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IVFACy/bu2fN0S9I6XZ9pK6r2WN9zpHEOSqt/pW10dCxUBktDR2GzSa/02t9A5mEUzv40k18DlmIPrJd3S382iBIhAaTsg+4nqCm1MFfWUg9dXutZW2ZgDWIDRRd3wR3e/5fUXrUApIyu47h4txPpUp+FiUwyOt5Tt/oS/CanU2Gu36fSbWM0oJMxCW3pjsCgZwppXhO4MPs6GzECqIRsjJgv0mdBDbyQH8obgtXX8AvKpqDFxx1YymbeHp1DCWZEr3i7sj7kQ0sPMnyZZHPOtJ8WsOU/F/0TpGv0UxrFVw6ao1QqyWzME9yN0vYx0JRp1x/8nJuXK7LrVyHwyJBFH2lHzi62ibvf9JUYFdyDxXKbNmzSMXqxKHNv4QMR0FuJfyIGx0YQj7vrLvN62gOuwcnTpgIO3K636dCemJoROsPr2r9Z9GnUEDTEbeT6z3V4AZqyjLl6m1ozuRIIrZn2qOb6I4/dzqikhBJLbFJq9V9K7JeM17i2yZB5oFRIgUjhmjntCr8TRU0TVD33LtpA9hwVQEEX/rZL1hEmSUxaj4mbgUecUDYC9c7GCHkzZmoUKqA3haThGpHdmwOkdcRQbNPIPMMXRxDcKTmn3xpk3VJ5JAyppGHf1oCLqk8i+WiYvJC6UWAyuqg7oz2rGwoynQKkz6mluvk8LfFejirDl6nnDORLh4GAxb7+rqnyR9j4eZubl1czvvisJrrPM2wAmsS/fXoBVCbRk/z989vnq4QL9F/fTCTWfzYAS+S0rcCseT28SwYxPnEwApa6WMZMUqvvwzaq5rsydf89vik8P9TKl3tNg3CsXnfp/OgzdHl31G1Dz7Kyht4dW8nkDpgtG9b4zGeQy2V62v4t4aaV5+lqvmNO7Ugd5hgLw77FZWq5wx+4IVCeNYMqoto1PelQlb3/VCZu X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bffe0ac8-808c-4e7b-c084-08dd3bdbc2f2 X-MS-Exchange-CrossTenant-AuthSource: CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2025 18:28:41.4556 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR84MB1478 Received-SPF: pass client-ip=2a01:111:f403:2c18::81a; envelope-from=Morgan.J.Smith@HIDDEN; helo=NAM12-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) * debbugs.el (debbugs-get-cache, debbugs-put-cache): New functions. (debbugs-newest-bugs, debbugs-get-status): Use new functions. * test/debbugs-tests.el: Use advice to set the `cache_time' around the new functions. (debbugs-test-newest-bug-cached): New test. (debbugs-test-get-status): Add test for caching behavior. --- Hello! Just a little bit of code cleanup. I hope this is helpful. You'll notice I removed a bit in `debbugs-newest-bugs' that was supposed to temporarily generate a null value. I'm not entirely certain but I don't believe that actually does anything right? Immediately after that we make a synchronous soap call anyways and then return that value. debbugs.el | 80 +++++++++++++++++++------------------------ test/debbugs-tests.el | 50 +++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 51 deletions(-) diff --git a/debbugs.el b/debbugs.el index 5ab1dfc4ba..36fdca8ff0 100644 --- a/debbugs.el +++ b/debbugs.el @@ -118,6 +118,28 @@ t or 0 disables caching, nil disables expiring." (const :tag "Forever" nil) (integer :tag "Seconds"))) +(defun debbugs-get-cache (bug-number) + "Return the cached status entry for the bug identified by BUG-NUMBER." + (let ((status (gethash bug-number debbugs-cache-data))) + (when (and status + (or (null debbugs-cache-expiry) + (and + (natnump debbugs-cache-expiry) + (> (alist-get 'cache_time status) + (- (float-time) debbugs-cache-expiry))))) + status))) + +(defun debbugs-put-cache (bug-number status) + "Put the STATUS entry for the bug BUG-NUMBER in the cache. +Return STATUS." + (if (or (null debbugs-cache-expiry) + (and (natnump debbugs-cache-expiry) + (not (zerop debbugs-cache-expiry)))) + (puthash bug-number + (cons (cons 'cache_time (float-time)) status) + debbugs-cache-data) + status)) + (defun debbugs-soap-invoke (operation-name &rest parameters) "Invoke the SOAP connection. OPERATION-NAME and PARAMETERS are as described in `soap-invoke'." @@ -325,38 +347,20 @@ patch: (defun debbugs-newest-bugs (amount) "Return the list of bug numbers, according to AMOUNT (a number) latest bugs." (if (= amount 1) - ;; We cache it as bug "0" in `debbugs-cache-data'. - (let ((status (gethash 0 debbugs-cache-data))) - (unless (and - status - (or - (null debbugs-cache-expiry) - (and - (natnump debbugs-cache-expiry) - (> (alist-get 'cache_time status) - (- (float-time) debbugs-cache-expiry))))) - ;; Due to `debbugs-gnu-completion-table', this function - ;; could be called in rapid sequence. We cache temporarily - ;; the value nil, therefore. - (when (natnump debbugs-cache-expiry) - (puthash - 0 - (list (cons 'cache_time (1+ (- (float-time) debbugs-cache-expiry))) - (list 'newest_bug)) - debbugs-cache-data)) + ;; We cache it as bug "0" + (let ((status (debbugs-get-cache 0))) + (unless status ;; Compute the value. (setq status - (list - (cons 'cache_time (float-time)) - (cons 'newest_bug - (caar - (debbugs-soap-invoke - debbugs-wsdl debbugs-port "newest_bugs" amount))))) + (list + (cons 'newest_bug + (caar + (debbugs-soap-invoke + debbugs-wsdl debbugs-port "newest_bugs" amount))))) ;; Cache it. - (when (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry)) - (puthash 0 status debbugs-cache-data))) + (debbugs-put-cache 0 status)) ;; Return the value, as list. (list (alist-get 'newest_bug status))) @@ -477,15 +481,8 @@ Example: (delq nil (mapcar (lambda (bug) - (let ((status (gethash bug debbugs-cache-data))) - (if (and - status - (or - (null debbugs-cache-expiry) - (and - (natnump debbugs-cache-expiry) - (> (alist-get 'cache_time status) - (- (float-time) debbugs-cache-expiry))))) + (let ((status (debbugs-get-cache bug))) + (if status (progn (setq cached-bugs (append cached-bugs (list status))) nil) @@ -582,14 +579,9 @@ Example: (when (stringp (cdr y)) (setcdr y (split-string (cdr y) ",\\| " t)))) ;; Cache the result, and return. - (if (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry)) - (puthash - (alist-get 'key x) - ;; Put also a time stamp. - (cons (cons 'cache_time (float-time)) (alist-get 'value x)) - debbugs-cache-data) - ;; Don't cache. - (alist-get 'value x)))) + (debbugs-put-cache + (alist-get 'key x) + (alist-get 'value x)))) debbugs-soap-invoke-async-object)))) (defun debbugs-get-usertag (&rest query) diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el index ce6489ca39..d0aa9e87b4 100644 --- a/test/debbugs-tests.el +++ b/test/debbugs-tests.el @@ -28,6 +28,10 @@ (require 'debbugs) +;; TODO: This shouldn't be necessary but I get the error +;; "(void-variable debbugs-gnu-use-threads)" without this +(require 'debbugs-gnu) + ;;; Helper Data: ;; Generated using this: @@ -93,6 +97,20 @@ :override (symbol-function #'soap-invoke-internal) #'debbugs-test--soap-invoke-internal) +(defun debbugs-test--override-float-time (func &rest rest) + "Override `float-time' for FUNC with args REST." + (cl-letf (((symbol-function #'float-time) + (lambda (&optional _specified-time) 5000))) + (apply func rest))) + +(add-function + :around (symbol-function #'debbugs-get-cache) + #'debbugs-test--override-float-time) + +(add-function + :around (symbol-function #'debbugs-put-cache) + #'debbugs-test--override-float-time) + ;;; Tests: (ert-deftest debbugs-test-get-bugs () @@ -115,16 +133,34 @@ (should (string-equal debbugs-test--soap-operation-name "newest_bugs")) (should (equal debbugs-test--soap-parameters '(4))))) +(ert-deftest debbugs-test-newest-bug-cached () + "Test getting the newest bug from the cache." + (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters) + ;; First time we get it from the server. + (should (equal (debbugs-newest-bugs 1) '(0))) + (should (equal debbugs-test--soap-operation-name "newest_bugs")) + (should (equal debbugs-test--soap-parameters '(1))) + (setq debbugs-test--soap-operation-name nil) + (setq debbugs-test--soap-parameters nil) + ;; Now it's cached + (should (equal (debbugs-newest-bugs 1) '(0))) + (should (equal debbugs-test--soap-operation-name nil)) + (should (equal debbugs-test--soap-parameters nil)))) + (ert-deftest debbugs-test-get-status () "Test \"get_status\"." (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters) - (cl-letf (((symbol-function #'float-time) - (lambda (&optional _specified-time) 5000))) - (should (= (float-time) 5000)) - (should (equal (sort (car (debbugs-get-status 64064))) - (sort (car debbugs-test--bug-status)))) - (should (string-equal debbugs-test--soap-operation-name "get_status")) - (should (equal debbugs-test--soap-parameters '([64064])))))) + (should (equal (sort (car (debbugs-get-status 64064))) + (sort (car debbugs-test--bug-status)))) + (should (string-equal debbugs-test--soap-operation-name "get_status")) + (should (equal debbugs-test--soap-parameters '([64064]))) + (setq debbugs-test--soap-operation-name nil) + (setq debbugs-test--soap-parameters nil) + ;; cached + (should (equal (sort (car (debbugs-get-status 64064))) + (sort (car debbugs-test--bug-status)))) + (should (equal debbugs-test--soap-operation-name nil)) + (should (equal debbugs-test--soap-parameters nil)))) (ert-deftest debbugs-test-get-usertag () "Test \"get_usertag\"." -- 2.47.1
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Morgan Smith <Morgan.J.Smith@HIDDEN> Subject: bug#75789: Acknowledgement ([PATCH Debbugs] Factor cache accesses into dedicated functions) Message-ID: <handler.75789.B.173765724521894.ack <at> debbugs.gnu.org> References: <CH3PR84MB342425F4DDC526B5A474FC52C5E02@HIDDEN> X-Gnu-PR-Message: ack 75789 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 75789 <at> debbugs.gnu.org Date: Thu, 23 Jan 2025 18:35:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Michael Albinus <michael.albinus@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 75789 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 75789: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75789 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 25 Jan 2025 00:16:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 24 19:16:53 2025 Received: from localhost ([127.0.0.1]:47722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tbTr2-0007GL-P1 for submit <at> debbugs.gnu.org; Fri, 24 Jan 2025 19:16:52 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:44489) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tbTr0-0007G3-B3 for control <at> debbugs.gnu.org; Fri, 24 Jan 2025 19:16:50 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5d3bdccba49so4844376a12.1 for <control <at> debbugs.gnu.org>; Fri, 24 Jan 2025 16:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737764204; x=1738369004; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=XAmjPYh1dBMbyeb7zd6QCdp+NFahTXBofm9AghLhdp4=; b=KnXY3O6g2bxsC71kv8XVu+1U1/yr4eC5WsIHz5B1roixuF2iDvGtJJqNPjiJ5SH8VR 08KqC89QWSfjs2nyJaSjpJ8S9gT20Lo60/Tsu4ImjQr8EWk1WJjtQ93Z3MfiL5zmXhs1 m47v7ISINFqarmVtGQWp+YaGcaSf7qbyMSJJfIWybmgKp5qq3KW6t7q/29Om6ni9U4Z0 kQwkuWV6oqWQSzxHzIyaChHcLHGgqfg562shbKYxdfdQj1lcZb1spNwuhQXAvY5uuPAy e4n/QKljgDjgZiepuiNKX+4p1eSpqTkqvLgFf1k4MJYRimWX3zA61IkRjG0Jo8MaGojo PNTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737764204; x=1738369004; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XAmjPYh1dBMbyeb7zd6QCdp+NFahTXBofm9AghLhdp4=; b=r3DXDXMO2vTQlfY3JysK/MIMqoVsU9zK270gJKiKCe/1qOzsNGor4p85zP+Swl1AiG iOCLAjEqIJGawr6VVkKYF/fqsXau92bpZqiUfDF9SIyg5Z/Gx0FBbqO00/8JL8iL1kF1 5med8tMyxxTPMgbcwG2m1C4kkyQacQkCkJRLYka09gaFLFDtvE1WNOZBQ4FzoIA8HEK/ KiaTvkK7n2npd4CXwRlte2j3bqkmk8ccWm38Okz60OWTggeXQNFI5QwbSCscPQAJXAs9 2tVv4UHnQPi7g2QaD+h6Heone3lla4s33rGChmZaIgbS5aJLC6f5MB9hg8IwogjuXWJR sYXA== X-Gm-Message-State: AOJu0Yy+H7iF12OdT2YrOIG5tQfCJR8X1wUZ7fyB0EEiOC6MVTCKJEi+ YD6gnWxVvu2KAmRj8tRmHlNggXO8vXYU0AMtT9eIvxb224qRWx0WDuEN69/EWapC4FKud6zFVFf QEGflyW5cHI6C/SoRNFTZFnToH+ZWfKYu X-Gm-Gg: ASbGnctlQKmb/QHDwU0JrMOnz9xMLT9RWD70rZQ/x9e4u4rr3cDEud5vypovsT1yfWe 18c9/hz1XtPyp3NAlO8ZIABAvfRha1SzSUdR8W1areKqtMb3igsA+hDIrGaSDdkU= X-Google-Smtp-Source: AGHT+IFK9t0KBpffWXj9yPnVE+FSRsGO6trxl3QoJ/A3aD3wSv+3WtHjiJigED5ztKwwN+cWjsZSXstFlbIouUbXWFM= X-Received: by 2002:a05:6402:2790:b0:5d9:b8a:9e08 with SMTP id 4fb4d7f45d1cf-5db7d3189f5mr28160816a12.16.1737764204174; Fri, 24 Jan 2025 16:16:44 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 24 Jan 2025 16:16:43 -0800 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Fri, 24 Jan 2025 16:16:43 -0800 X-Gm-Features: AWEUYZmN9bguE-Y5iaQFoCUQvt7soeMawCpEsFH-yq9Bb63JjbzG-ETZmxfmkIk Message-ID: <CADwFkmkLQ2W7OBcGQqgRDGZZ-FLCoQf0uiLsj=74n=s0T3z2oQ@HIDDEN> Subject: control message for bug #75789 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 75789 wishlist quit
X-Loop: help-debbugs@HIDDEN Subject: bug#75789: [PATCH Debbugs] Factor cache accesses into dedicated functions Resent-From: Michael Albinus <michael.albinus@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 26 Jan 2025 10:46:01 +0000 Resent-Message-ID: <handler.75789.B75789.173788834631725 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Morgan Smith <Morgan.J.Smith@HIDDEN> Cc: 75789 <at> debbugs.gnu.org Received: via spool by 75789-submit <at> debbugs.gnu.org id=B75789.173788834631725 (code B ref 75789); Sun, 26 Jan 2025 10:46:01 +0000 Received: (at 75789) by debbugs.gnu.org; 26 Jan 2025 10:45:46 +0000 Received: from localhost ([127.0.0.1]:54832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tc09C-0008Fd-1E for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 05:45:46 -0500 Received: from mout.gmx.net ([212.227.15.18]:53065) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>) id 1tc098-0008FH-Pj for 75789 <at> debbugs.gnu.org; Sun, 26 Jan 2025 05:45:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1737888336; x=1738493136; i=michael.albinus@HIDDEN; bh=0oRU1xoUtrZfX7rUf1UixsMwKyww3Cgjek2IS4na+/c=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=cEnnxWqQ3oowobKFtQRvJ1pGLWDO/18aXSUjAXIn8c6Odi+j0Hk09W7OWaU7WeJz RQ8IBP193gElIcfD+ijJngIpQIKyavKcOoGFlqnALg/5qbH8emk66R26pK22TR3ag rNXF3nzHCEdca1HnQ5p1/W/kAYQMaVeKTJT37mbrbVJoUaFR74/KkECMCAQrTnFas KPE9HxcEPSkGnSCVmO6ycPcHJgpB9oWWKmZT5Vm7Tb/NNkvRNcw92YnjeetLl3dk+ SzRLv7uyM635mi/yU2FqVk0DQ11Fxi7sK6yy5FoGYp1UHuG9RlKTXoiBa082OI0Av 6FrL/AbEyrk88s8ikw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MLi8g-1ttfWK1PvM-00RQpa; Sun, 26 Jan 2025 11:45:36 +0100 From: Michael Albinus <michael.albinus@HIDDEN> In-Reply-To: <CH3PR84MB342425F4DDC526B5A474FC52C5E02@HIDDEN> (Morgan Smith's message of "Thu, 23 Jan 2025 13:22:18 -0500") References: <CH3PR84MB342425F4DDC526B5A474FC52C5E02@HIDDEN> Date: Sun, 26 Jan 2025 11:45:29 +0100 Message-ID: <874j1llupi.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:83IQ9ashUtuK5ruXkS9sIBCdJwpcj/LhZ2jnocB96A5a5eMKazi PbtSkQdLALgsQoUSBNgxvldBgviGIy+fS7vAn9PAJrNo/sMVrK+2ZF6Adzd0urFCHXv61zH 11qBk8K6QWme1yekCt6x+OdsVB3lRLAGl78UevOJQjYZ2X5fGDQvtuC6bpKT9Kb9NearTGc 14fL+SnUv3FRx0jGThD0g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:SHa7RtqCWvw=;ix77M9GSjO6aeXu4CW0W2jqv6eI U7cSgHy+pyb5N5qftqJ4I0n+7OEbYLj1D4YeTfYTkOeqFTroqeXtgRQZEkm+WQfT1ZsMJY5I5 W1ErxYnNCub+Be75K0eWyZPQKHM7FqstZJ300jjlAVMpYy/aG08D+x7zp6mv9UoBJxOIFIe22 auOhOb3Wdmd42410aTHOYUhNKDLM+rvNCXLqak4LpQN2qyUVT94k9CxnjzBM7FMRibKOeHBJ1 ulpDV8swkYEqszqh6pWYnXwFE9uglGl3upcdffJygj8xVAFsluLA8muIQBnx6N+UAAt9gq7IY z6bUarcj93PgBKismREDhIN/RKrMpeE0tLaxbB4I7uFLhnnGJZ3at4gVpkya/qKLjRDu/y4NF tWuC9pJ6/N9xCYUPWCx95iE9yH1qi7Zpe4a2eCML00LRkqeuB8z0VAe3Yo246sYhrM8qlJMWy jdKZv9fsHNYCnRz6e8ItOQELzIVm7vUxMcx7taxtFI73h10fKGAR0qxA1I5Dll3Ony8Gfjc25 rUsMDNKWtWVHATeYOrbLjvZZZs6MAtPsVpp4qYUX9xDKx2e2neK0aWmSli8e/Q51NrUOsXVOn G20q+I3XwXivrOc8GEy3M06nb3EE4tOd9U+J+cSH6UyWKw3Eus05lUyVsEqGhSJc/+Wv4R6w9 R8sBeJ0gPeS2kFy30bxphRgDhj6npBgCW7nKKbw2uOwkMsR/pwktLI7nz/+rVcpC5eCqHYSz9 /NjkiugLot3+gZBx5zws3mqkzjM01iU70zPDe/RgJH+lUtAF8pVdNNGsCCkOoMpcqWbWJ31T4 vR25m0nnyaq3UaWLruWtASGzpdGv3kY5NEb/wA0WVzt1wLbUPeAw1OhmLMUwmT6vSdPoGP++Y ugHULKZuvOhsQQRHH0JEtlFlqxZfAe0SmA6oS6CiCRN0UWDWdc4dSwx1iR3GhRz0gMVZXXtP0 DXjt+kTC188wQrxx2r2km6/FaADl7bir3PYKLfHWji03OHF4WTlTWHdAlvTye/9NtMhGnmEmy dhaCh1nzK697ZxkPmWlLIGx4o9pqvW69xjC4Es1MKVBwa3sWRFdey8fnzfzLyCMdHCdIiq//X buOSjdxHEO6BD0aUfwu/HmCq186V6qJVGgz/w2dAxJiOvPQP+zZ+acsNHiacFqVGG6ypeXGgB VCU4OHTbETaCAFJ5+arJieLywKue2DbXIe11LnJrAr9kb0u76md3GgLyvd46S/b57D0xgJPHx XwXma6hP6tdM4OedYpQKycoFETlzy29HMI6PQGrLjsHBC0HRBL0n06LV5pp44CiiAonFkGEfX CS/Se1lFyrrrs5oZnZ+Y/U6qUQ96nq4Z+ylZZmJ7c5w2Ks= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Morgan Smith <Morgan.J.Smith@HIDDEN> writes: > Hello! Hi Morgan, > Just a little bit of code cleanup. I hope this is helpful. > > You'll notice I removed a bit in `debbugs-newest-bugs' that was supposed= to > temporarily generate a null value. I'm not entirely certain but I don't > believe that actually does anything right? Immediately after that we ma= ke a > synchronous soap call anyways and then return that value. I don't know. See the comment you've removed as well: =2D-8<---------------cut here---------------start------------->8--- > - ;; Due to `debbugs-gnu-completion-table', this function > - ;; could be called in rapid sequence. We cache temporarily > - ;; the value nil, therefore. =2D-8<---------------cut here---------------end--------------->8--- Have you checked that this doesn't happen without the temporary setting? Some few comments: > index ce6489ca39..d0aa9e87b4 100644 > --- a/test/debbugs-tests.el > +++ b/test/debbugs-tests.el > @@ -28,6 +28,10 @@ > > (require 'debbugs) > > +;; TODO: This shouldn't be necessary but I get the error > +;; "(void-variable debbugs-gnu-use-threads)" without this > +(require 'debbugs-gnu) Oops. This is an existing bug. I will try to fix it later. > +(add-function > + :around (symbol-function #'debbugs-get-cache) > + #'debbugs-test--override-float-time) > + > +(add-function > + :around (symbol-function #'debbugs-put-cache) > + #'debbugs-test--override-float-time) This is wrong as-it-is. The extended definitions of debbugs-*-cache will persist after running the tests. A strict rule is, that all changes must be reverted after running the tests. I don't believe you need this. Keep the (cl-letf (((symbol-function #'float-time) ...))) clause in debbugs-test-get-status, and do the same in debbugs-test-newest-bug-cached. Otherwise, it looks good to me. Please push to the debbugs repo; I'll play with it for a while before making a new release. Thanks, and best regards, Michael.
X-Loop: help-debbugs@HIDDEN Subject: bug#75789: [PATCH Debbugs] Factor cache accesses into dedicated functions Resent-From: Michael Albinus <michael.albinus@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 27 Jan 2025 17:14:02 +0000 Resent-Message-ID: <handler.75789.B75789.173799799525150 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Morgan Smith <Morgan.J.Smith@HIDDEN> Cc: 75789 <at> debbugs.gnu.org Received: via spool by 75789-submit <at> debbugs.gnu.org id=B75789.173799799525150 (code B ref 75789); Mon, 27 Jan 2025 17:14:02 +0000 Received: (at 75789) by debbugs.gnu.org; 27 Jan 2025 17:13:15 +0000 Received: from localhost ([127.0.0.1]:34316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tcSfi-0006XZ-NJ for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 12:13:15 -0500 Received: from mout.gmx.net ([212.227.17.21]:59947) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>) id 1tcSff-0006XK-Mt for 75789 <at> debbugs.gnu.org; Mon, 27 Jan 2025 12:13:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1737997985; x=1738602785; i=michael.albinus@HIDDEN; bh=DvrV7aUzhpoUVMI6VtpKNQivWu5yqcXvbFtRUXZl7tE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=CbvUVUIHXsyoXv9pjrhQU41LFhGx0fkL+x6VOdA/BuiY6ACKui9+o1nkraeshteS LD4QdMrBwaxOlquiVeLM1Zktzovq/vZ+h9MwtlXIhPYbG7p+dRA4Nk+YKHIpklj0u 61ASr6o0W2g+nWsDl3iZpxBxlpNlLrb/vxA27VRYnPybXU+lBxszXfos/D25QK3Ra +8nIFGNk4oacu8yMkhjoZfytKtdz3+rPxXRvU7ssgXWe+RfgdaYTnrrzisjbUEUiq IjZrxAB4MnReILc2ytDLjOUBwrfWipMUan/dKj/SEidRVo76OVaeh6XERSTWAanQU LYkmExf545bQKjXSmw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MSc1B-1u4oNk13Yf-00OfP5; Mon, 27 Jan 2025 18:13:05 +0100 From: Michael Albinus <michael.albinus@HIDDEN> In-Reply-To: <874j1llupi.fsf@HIDDEN> (Michael Albinus's message of "Sun, 26 Jan 2025 11:45:29 +0100") References: <CH3PR84MB342425F4DDC526B5A474FC52C5E02@HIDDEN> <874j1llupi.fsf@HIDDEN> Date: Mon, 27 Jan 2025 18:13:01 +0100 Message-ID: <87a5bcmb8i.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:QLUHRY7BuFpXDY1SglJfpLPQAwlYmIYnpUPjBfPXKOiJhrlJ4lR 97KptTAPqh93vUt1KXO0KDnaUu4/MrXcF/cq1z7/h2/2jJJG8Cd5lxnFm+auiJnz3mo2H8T v4yZefas3/z9C2rOkcf61ABSHOeRgbqcbp6Zdqz5VbWnpC+mGNEfOZ8h7+NXhIhVuiyRK0T 0XPtYCPhItCIOroJhNRQA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:wtexb51KSR8=;pFv5ud2qsJ43ceyLK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4mYMCtjZ1s4FTWQBHFdA4XPno8R29yp5OzP2qpiEfJkuFphw GV7yVzlG0bEsgD5kn39o0P2WrA/FcgveE7+dPol5nV3/JbifZdwv9RjDkDJOWZXiVLBfeToAQ UDExzGtYEPw2RBG9A1BPXsvOHMvwqr/Mx9lJvja6XxQ== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Michael Albinus <michael.albinus@HIDDEN> writes: Hi Morgan, >> +;; TODO: This shouldn't be necessary but I get the error >> +;; "(void-variable debbugs-gnu-use-threads)" without this >> +(require 'debbugs-gnu) > > Oops. This is an existing bug. I will try to fix it later. This is fixed now in the git repo. You don't need to require debbugs-gnu anymore. Best regards, Michael.
X-Loop: help-debbugs@HIDDEN Subject: bug#75789: [PATCH Debbugs] Factor cache accesses into dedicated functions Resent-From: Morgan Smith <morgan.j.smith@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 10 Feb 2025 02:02:02 +0000 Resent-Message-ID: <handler.75789.B75789.173915290131838 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Albinus <michael.albinus@HIDDEN> Cc: 75789 <at> debbugs.gnu.org Received: via spool by 75789-submit <at> debbugs.gnu.org id=B75789.173915290131838 (code B ref 75789); Mon, 10 Feb 2025 02:02:02 +0000 Received: (at 75789) by debbugs.gnu.org; 10 Feb 2025 02:01:41 +0000 Received: from localhost ([127.0.0.1]:47181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1thJ7D-0008HQ-Rn for submit <at> debbugs.gnu.org; Sun, 09 Feb 2025 21:01:40 -0500 Received: from mail-mw2nam12olkn20829.outbound.protection.outlook.com ([2a01:111:f403:2805::829]:16224 helo=NAM12-MW2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <morgan.j.smith@HIDDEN>) id 1thJ7A-0008H9-GB for 75789 <at> debbugs.gnu.org; Sun, 09 Feb 2025 21:01:38 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X1V+NzeUmc7+YwEmMoipIhIJUuY5nEyXH2/Dx9oupV/EKwYBDh1uWE39d8CcM4WoHnjkUg9lhZsceue8MBEbEekCS8ji2fyIqxchKzC6nxHwPy/F+xzZxkcMT0qmsX2cgnO6znB/5X+0ptDjs+JaVHCFXz4b13WcouIGY5LA7ENKFDsV7dqCSlowQ/1d7X2zMJFxoeqj2oOU9QW6/BCWVBNNF5zzvzdcZ+2p9FDqk4EejjlgD52Z6Tb9FQEgQ4h9PYCFgHHT3GVLyGf/zO3aWolTppSbjEecDfSYTvaV6vi7MN14vIYFRO/BPleN7zNZBSikjSZ3Ntwh636KJZxkRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XYc1l0vsp29Ti83kJgw0cscD/KEqdPAz9NW7olHCsZo=; b=ZBCWR3uNDq8qbMfH6V4YeZXTmmBxZAT8tinHgzhDFjF7WFYCta2aKYgmVyibenQT/Hpxjp6E9D0FCJqjHxL8T2qmF84mtS1Cpc/+v3k7ZbADxEtpjL/iZZ/huyefGR9IppUcdMaUK0aXgt1CVOcDaqRkgCcsFGc1QnT3CxJ/7qP2umsjT3ceee6NqD2IkwXHkrfBNJG2MEeOpeTEFwr6dZ2zGoRZT/4YQPGBZ+kE5JYLPizLjKrdhKfYyQ6hvpmz2PuxEwL/topifheZFxx8X8t/ug0TMnSPCg4JpUeHPiTxDxvBgILJiFzbPWkw1WRiYquCmI+SI0AdQpCiQYMNzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XYc1l0vsp29Ti83kJgw0cscD/KEqdPAz9NW7olHCsZo=; b=X/v3+9PQ8qp5CllKq9veYe5F383XOcvqYUc9OtDUZAfiFh355OIe3FJHSVfe8K62SvM6Ros8o6p4aif2+VWC1BQzH4+sL5vpBbhumBTxqig+GzB5pMWuQ0zBUW6wo9Tu6ui+wq1kGgyRIQNa1GigJJs1pIub8o+XP/2411MAIk9fBzL64rnojqOfDnkjBR1Si48//r6wTIAAv0QAkK3VJ/sf0YLw7sKff/ZYDS+NE30ADm5mx8Zy+VK+3pZeIK6Dk+jafOggR37eWG0rTpTI19khjN9nvyyF5pYfU3uLfEtFSQMM6ZLYfCWaQIgDSsC1OcTMESZO0Qp7dgDG19LexQ== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by PH7PR84MB3550.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:2fa::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.18; Mon, 10 Feb 2025 02:01:28 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef%7]) with mapi id 15.20.8422.010; Mon, 10 Feb 2025 02:01:27 +0000 From: Morgan Smith <morgan.j.smith@HIDDEN> In-Reply-To: <874j1llupi.fsf@HIDDEN> (Michael Albinus's message of "Sun, 26 Jan 2025 11:45:29 +0100") References: <CH3PR84MB342425F4DDC526B5A474FC52C5E02@HIDDEN> <874j1llupi.fsf@HIDDEN> X-Hashcash: 1:20:250210:michael.albinus@HIDDEN::RxJtzzsrBngu2JNL:Hak X-Hashcash: 1:20:250210:75789 <at> debbugs.gnu.org::HbSu0ubzaLgWOjEc:3IJF Date: Sun, 09 Feb 2025 21:01:30 -0500 Message-ID: <CH3PR84MB34244F1E4014FF6A331ED388C5F22@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Content-Type: multipart/mixed; boundary="=-=-=" X-ClientProxiedBy: YQ1P288CA0012.CANP288.PROD.OUTLOOK.COM (2603:10b6:c01:9e::6) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: <877c5ymubp.fsf@HIDDEN> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|PH7PR84MB3550:EE_ X-MS-Office365-Filtering-Correlation-Id: 373e64d5-0e19-4c6e-9c15-08dd4976d43e X-Microsoft-Antispam: BCL:0; ARA:14566002|19110799003|5072599009|8060799006|6092099012|7092599003|15080799006|461199028|440099028|3412199025|13095399003|41001999003; X-Microsoft-Antispam-Message-Info: ip+BnflowohPYmdjvM69jVUWpjsHceIPE6CQf6RRPka6rayikN4g9hVordO2oIVgoWaAGjKHpuAD1PVa+0bVFh/4W1Rc3P6P2IIgw8qdj1IMWVyAnkBjpnZKeB/8e1H7E22WIK0C4cy44Q2qaxC0swux/5K+Zqowz4STL0b72cyeMs9HEWQ9b8BbHEhETjOMC6zmIZVpQ4/fcIoHJLkwKkVyrL/TGNrs9R8X5XeyuidDQhqLEFwb+R2SGeakAJNF7QyCcy43yRn+Uq0kJafg1IukLyW5IuflyV1qyiXbgnJlE1+Prda6X0oo3qOz3uLShnMwI63CbGt7y+vI1Ej41amEtFfKE3h7J8kOoqLxtHMWFSBLLwoQjmLYYRLm8O2qPsWUNIVVs8yY5vSPSbSYcoJJ5Hbv8HU6HRKVBIzDARDjDUixWb4/x7zxVzGONRwXZY4mrbKz8mMes/hVHvNb79cavUnD9PLP3FX1+7Wkq3NDOBJlSBmSOU1EozvExhfM+18rk1FuHh6F2YhBOLbYp6XKWzP78FA//Rta7O1TC/+CZ2Vw7fBZ1bJ4QWh7dOBsAOzDR0l/1OgOfN+CKFDJTqLAwAol2E90uNWU2RebwVZ8tysOnLKsA1+l7bh694Df/QiWaU0YOXwFj33HijseS5+eUxAiA67r1JXpiVGjso8kuLzjyTFBWKPhCKCAurQvG1Y4QOLrMTS9RWYiDEOBV49F7Cj4IFT+6qgmfECFdtapo/hDazJyWZfTJ1ffy4j3l+9ACmV90db4zE7UBxWaSLtAejQ/ptFvS31WeW9w8S+ETV3njyy1anTZ17oshdQ9BLbN6sTCqsmwEyi8Os1VRdQo4P4lRXmTiuXjid7DcJ6WxgQfSbGxGH1zZfCyZEb3tPLqcy7kRBz38o1R8PenXcg4y9c5nUm8erT+WRwOwJTvw9AYFVidYvr4LwFr5GgfNpk2/7Dff4JEUFLT1ESbEVgFUGqt6/lfytimAfYZdWcf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zJ60QDCzBXE3wXTaNjB5bwrQnPDeMN1WxY+d2M9SlzBVy7arSllasopGAW9IkL2TPZ1ci/9WS1LBgy3fB/ngxTgs+j2aUpnSHo2O7JntYWNZ9poj13WHRXBW9aIkb6y+gzUvbIaOGNKp2bdYQeQeBZ+b1Xb26q0mshg1Vz97BVEHRWltMGAa1wKVFhjIGRD1pMo6A7VOdw34OKI1vne8Q4pgWQq/Qu1yLJNBgw2DYT8eg4aOjB4uQ+PW3AXh2LAXXMvyW0HH6jUMPyE+jbLSn2xUihaP6UlSMhcPnQSWFW/kYDmqIoAEYnmHXDbgvne1AmW8DLwAbGwAm8G1VD0gEbhit6g9YcJ7wmmsMWKgAUz7pP52+DF63qeBrtKALkyZ4o9q+T/NjrIzN+H9sty81OCZX4HZHHeFz5wLQGfgfrL3Tqv6y6PjkdRDPbZ1VEk+LOopBZQ2YtyxvKDC7wBSXZg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 373e64d5-0e19-4c6e-9c15-08dd4976d43e X-MS-Exchange-CrossTenant-AuthSource: CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2025 02:01:27.7182 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR84MB3550 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Michael Albinus <michael.albinus@HIDDEN> writes: > Morgan Smith <Morgan.J.Smith@HIDDEN> writes: > >> Hello! > > Hi Morgan, > Hi Michael, Apologies for the delay. I started a new job the day after I sent this email! >> Just a little bit of code cleanup. I hope this is helpful. >> >> You'll notice I removed a bit in `debbugs-newest-bugs' that was supposed to >> temporarily generate a null value. I'm not entirely certain but I don't >> believe that actually does anything right? Immediately after that we make a >> synchronous soap call anyways and then return that value. > > I don't know. See the comment you've removed as well: > > --8<---------------cut here---------------start------------->8--- >> - ;; Due to `debbugs-gnu-completion-table', this function >> - ;; could be called in rapid sequence. We cache temporarily >> - ;; the value nil, therefore. > --8<---------------cut here---------------end--------------->8--- > > Have you checked that this doesn't happen without the temporary > setting? I'm honestly still not sure. Maybe it's a simple test but I'm still scared of completion tables from a bad experience a few years back. I've just made some modifications so the same logic is in place. > > Some few comments: > >> index ce6489ca39..d0aa9e87b4 100644 >> --- a/test/debbugs-tests.el >> +++ b/test/debbugs-tests.el >> @@ -28,6 +28,10 @@ >> >> (require 'debbugs) >> >> +;; TODO: This shouldn't be necessary but I get the error >> +;; "(void-variable debbugs-gnu-use-threads)" without this >> +(require 'debbugs-gnu) > > Oops. This is an existing bug. I will try to fix it later. > Thanks for fixing that! >> +(add-function >> + :around (symbol-function #'debbugs-get-cache) >> + #'debbugs-test--override-float-time) >> + >> +(add-function >> + :around (symbol-function #'debbugs-put-cache) >> + #'debbugs-test--override-float-time) > > This is wrong as-it-is. The extended definitions of debbugs-*-cache will > persist after running the tests. A strict rule is, that all changes must > be reverted after running the tests. This is being violated in the current tests by the stubbing out of `soap-invoke-internal'. Please see the first attached patch where I fix this. > I don't believe you need this. Keep the (cl-letf (((symbol-function > #'float-time) ...))) clause in debbugs-test-get-status, and do the same > in debbugs-test-newest-bug-cached. I wanted a clean wrapper around the cache functions to make it easy for future testing. Specifically, I want to add a feature so the cache survives an emacs restart. > Otherwise, it looks good to me. Please push to the debbugs repo; I'll > play with it for a while before making a new release. I don't believe I have push access to the repository. > Thanks, and best regards, Michael. Thanks for reviewing my patches! Morgan --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-tests-Call-new-setup-and-teardown-functions-in-tests.patch From 5b0e08f4659ee871bca62987530ff13a88d3c4b5 Mon Sep 17 00:00:00 2001 From: Morgan Smith <Morgan.J.Smith@HIDDEN> Date: Sun, 9 Feb 2025 19:51:36 -0500 Subject: [PATCH 1/2] tests: Call new setup and teardown functions in tests * test/debbugs-tests.el: Create new functions `debbugs-test--setup' and `debbugs-test--teardown' to be run before and after each test. Create new macro `ert-deftest--debbugs' to automatically call the new functions. Adjust tests to use the new macro --- test/debbugs-tests.el | 91 ++++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 35 deletions(-) diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el index ce6489ca39..8402a4fff9 100644 --- a/test/debbugs-tests.el +++ b/test/debbugs-tests.el @@ -89,49 +89,70 @@ nil) return))) -(add-function - :override (symbol-function #'soap-invoke-internal) - #'debbugs-test--soap-invoke-internal) +(defun debbugs-test--setup () + "Mock network and time functions. +These mock functions are needed to make the tests reproducible." + (setq debbugs-test--soap-operation-name nil) + (setq debbugs-test--soap-parameters nil) + + (add-function + :override (symbol-function #'soap-invoke-internal) + #'debbugs-test--soap-invoke-internal)) + +(defun debbugs-test--teardown () + "Restore functions to as they where before." + (setq debbugs-test--soap-operation-name nil) + (setq debbugs-test--soap-parameters nil) + + (remove-function + (symbol-function #'soap-invoke-internal) + #'debbugs-test--soap-invoke-internal)) + +(defmacro ert-deftest--debbugs (name args docstring &rest body) + "The same as `ert-deftest' but runs setup and teardown functions." + (declare + (doc-string 3) + (indent 2)) + `(ert-deftest ,name ,args ,docstring + (debbugs-test--setup) + ,@body + (debbugs-test--teardown))) ;;; Tests: -(ert-deftest debbugs-test-get-bugs () +(ert-deftest--debbugs debbugs-test-get-bugs () "Test \"get_bugs\"." - (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters) - (debbugs-get-bugs - :tag "patch" - :severity "critical" - :status "open" - :status "forwarded") - (should (string-equal debbugs-test--soap-operation-name "get_bugs")) - (should (equal debbugs-test--soap-parameters - '(["tag" "patch" "severity" "critical" - "status" "open" "status" "forwarded"]))))) - -(ert-deftest debbugs-test-newest-bugs () + (debbugs-get-bugs + :tag "patch" + :severity "critical" + :status "open" + :status "forwarded") + (should (string-equal debbugs-test--soap-operation-name "get_bugs")) + (should (equal debbugs-test--soap-parameters + '(["tag" "patch" "severity" "critical" + "status" "open" "status" "forwarded"])))) + +(ert-deftest--debbugs debbugs-test-newest-bugs () "Test \"newest_bugs\"." - (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters) - (debbugs-newest-bugs 4) - (should (string-equal debbugs-test--soap-operation-name "newest_bugs")) - (should (equal debbugs-test--soap-parameters '(4))))) + (debbugs-newest-bugs 4) + (should (string-equal debbugs-test--soap-operation-name "newest_bugs")) + (should (equal debbugs-test--soap-parameters '(4)))) -(ert-deftest debbugs-test-get-status () +(ert-deftest--debbugs debbugs-test-get-status () "Test \"get_status\"." - (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters) - (cl-letf (((symbol-function #'float-time) - (lambda (&optional _specified-time) 5000))) - (should (= (float-time) 5000)) - (should (equal (sort (car (debbugs-get-status 64064))) - (sort (car debbugs-test--bug-status)))) - (should (string-equal debbugs-test--soap-operation-name "get_status")) - (should (equal debbugs-test--soap-parameters '([64064])))))) - -(ert-deftest debbugs-test-get-usertag () + (cl-letf (((symbol-function #'float-time) + (lambda (&optional _specified-time) 5000))) + (should (= (float-time) 5000)) + (should (equal (sort (car (debbugs-get-status 64064))) + (sort (car debbugs-test--bug-status)))) + (should (string-equal debbugs-test--soap-operation-name "get_status")) + (should (equal debbugs-test--soap-parameters '([64064]))))) + +(ert-deftest--debbugs debbugs-test-get-usertag () "Test \"get_usertag\"." - (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters) - (should (equal (debbugs-get-usertag :user "emacs") '("hi"))) - (should (string-equal debbugs-test--soap-operation-name "get_usertag")) - (should (equal debbugs-test--soap-parameters '("emacs"))))) + (should (equal (debbugs-get-usertag :user "emacs") '("hi"))) + (should (string-equal debbugs-test--soap-operation-name "get_usertag")) + (should (equal debbugs-test--soap-parameters '("emacs")))) (provide 'debbugs-tests) -- 2.48.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Factor-cache-accesses-into-dedicated-functions.patch From 7bc3aa8a32a0185400423504a15368b3865d1ca3 Mon Sep 17 00:00:00 2001 From: Morgan Smith <Morgan.J.Smith@HIDDEN> Date: Wed, 22 Jan 2025 18:19:13 -0500 Subject: [PATCH 2/2] Factor cache accesses into dedicated functions * debbugs.el (debbugs-get-cache, debbugs-put-cache): New functions. (debbugs-newest-bugs, debbugs-get-status): Use new functions. * test/debbugs-tests.el: Use advice to set the `cache_time' around the new functions. (debbugs-test-newest-bug-cached): New test. (debbugs-test-get-status): Add test for caching behavior. --- debbugs.el | 107 ++++++++++++++++++++++-------------------- test/debbugs-tests.el | 57 ++++++++++++++++++---- 2 files changed, 103 insertions(+), 61 deletions(-) diff --git a/debbugs.el b/debbugs.el index 5ab1dfc4ba..dd9b6dc09f 100644 --- a/debbugs.el +++ b/debbugs.el @@ -118,6 +118,33 @@ t or 0 disables caching, nil disables expiring." (const :tag "Forever" nil) (integer :tag "Seconds"))) +(defun debbugs-get-cache (bug-number) + "Return the cached status entry for the bug identified by BUG-NUMBER." + (let ((status (gethash bug-number debbugs-cache-data))) + (when (and status + (or (null debbugs-cache-expiry) + (and + (natnump debbugs-cache-expiry) + (> (alist-get 'cache_time status) + (- (float-time) debbugs-cache-expiry))))) + status))) + +(defun debbugs-put-cache (bug-number status &optional ttl) + "Put the STATUS entry for the bug BUG-NUMBER in the cache. +Return STATUS." + (if (or (null debbugs-cache-expiry) + (and (natnump debbugs-cache-expiry) + (not (zerop debbugs-cache-expiry)))) + (let ((cache-time (float-time))) + ;; Kind of a hack for TTL that assume that `debbugs-cache-expiry' + ;; doesn't change + (when (and ttl (natnump debbugs-cache-expiry)) + (setq cache-time (+ ttl (- cache-time debbugs-cache-expiry)))) + (puthash bug-number + (cons (cons 'cache_time cache-time) status) + debbugs-cache-data)) + status)) + (defun debbugs-soap-invoke (operation-name &rest parameters) "Invoke the SOAP connection. OPERATION-NAME and PARAMETERS are as described in `soap-invoke'." @@ -325,41 +352,29 @@ patch: (defun debbugs-newest-bugs (amount) "Return the list of bug numbers, according to AMOUNT (a number) latest bugs." (if (= amount 1) - ;; We cache it as bug "0" in `debbugs-cache-data'. - (let ((status (gethash 0 debbugs-cache-data))) - (unless (and - status - (or - (null debbugs-cache-expiry) - (and - (natnump debbugs-cache-expiry) - (> (alist-get 'cache_time status) - (- (float-time) debbugs-cache-expiry))))) - ;; Due to `debbugs-gnu-completion-table', this function - ;; could be called in rapid sequence. We cache temporarily - ;; the value nil, therefore. - (when (natnump debbugs-cache-expiry) - (puthash - 0 - (list (cons 'cache_time (1+ (- (float-time) debbugs-cache-expiry))) - (list 'newest_bug)) - debbugs-cache-data)) - ;; Compute the value. - (setq - status - (list - (cons 'cache_time (float-time)) - (cons 'newest_bug - (caar - (debbugs-soap-invoke - debbugs-wsdl debbugs-port "newest_bugs" amount))))) - - ;; Cache it. - (when (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry)) - (puthash 0 status debbugs-cache-data))) - - ;; Return the value, as list. - (list (alist-get 'newest_bug status))) + ;; We cache it as bug "0" + (let ((status (debbugs-get-cache 0))) + (unless status + ;; Due to `debbugs-gnu-completion-table', this function + ;; could be called in rapid sequence. We cache temporarily + ;; the value nil, therefore. + (when (natnump debbugs-cache-expiry) + (debbugs-put-cache 0 (list 'newest_bug) 1)) + + ;; Compute the value. + (setq + status + (list + (cons 'newest_bug + (caar + (debbugs-soap-invoke + debbugs-wsdl debbugs-port "newest_bugs" amount))))) + + ;; Cache it. + (debbugs-put-cache 0 status)) + + ;; Return the value, as list. + (list (alist-get 'newest_bug status))) (sort (car (debbugs-soap-invoke @@ -477,15 +492,8 @@ Example: (delq nil (mapcar (lambda (bug) - (let ((status (gethash bug debbugs-cache-data))) - (if (and - status - (or - (null debbugs-cache-expiry) - (and - (natnump debbugs-cache-expiry) - (> (alist-get 'cache_time status) - (- (float-time) debbugs-cache-expiry))))) + (let ((status (debbugs-get-cache bug))) + (if status (progn (setq cached-bugs (append cached-bugs (list status))) nil) @@ -582,14 +590,9 @@ Example: (when (stringp (cdr y)) (setcdr y (split-string (cdr y) ",\\| " t)))) ;; Cache the result, and return. - (if (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry)) - (puthash - (alist-get 'key x) - ;; Put also a time stamp. - (cons (cons 'cache_time (float-time)) (alist-get 'value x)) - debbugs-cache-data) - ;; Don't cache. - (alist-get 'value x)))) + (debbugs-put-cache + (alist-get 'key x) + (alist-get 'value x)))) debbugs-soap-invoke-async-object)))) (defun debbugs-get-usertag (&rest query) diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el index 8402a4fff9..f3abea2837 100644 --- a/test/debbugs-tests.el +++ b/test/debbugs-tests.el @@ -89,6 +89,12 @@ nil) return))) +(defun debbugs-test--override-float-time (func &rest rest) + "Override `float-time' for FUNC with args REST." + (cl-letf (((symbol-function #'float-time) + (lambda (&optional _specified-time) 5000))) + (apply func rest))) + (defun debbugs-test--setup () "Mock network and time functions. These mock functions are needed to make the tests reproducible." @@ -97,7 +103,15 @@ These mock functions are needed to make the tests reproducible." (add-function :override (symbol-function #'soap-invoke-internal) - #'debbugs-test--soap-invoke-internal)) + #'debbugs-test--soap-invoke-internal) + + (add-function + :around (symbol-function #'debbugs-get-cache) + #'debbugs-test--override-float-time) + + (add-function + :around (symbol-function #'debbugs-put-cache) + #'debbugs-test--override-float-time)) (defun debbugs-test--teardown () "Restore functions to as they where before." @@ -106,7 +120,15 @@ These mock functions are needed to make the tests reproducible." (remove-function (symbol-function #'soap-invoke-internal) - #'debbugs-test--soap-invoke-internal)) + #'debbugs-test--soap-invoke-internal) + + (remove-function + (symbol-function #'debbugs-get-cache) + #'debbugs-test--override-float-time) + + (remove-function + (symbol-function #'debbugs-put-cache) + #'debbugs-test--override-float-time)) (defmacro ert-deftest--debbugs (name args docstring &rest body) "The same as `ert-deftest' but runs setup and teardown functions." @@ -138,15 +160,32 @@ These mock functions are needed to make the tests reproducible." (should (string-equal debbugs-test--soap-operation-name "newest_bugs")) (should (equal debbugs-test--soap-parameters '(4)))) +(ert-deftest--debbugs debbugs-test-newest-bug-cached () + "Test getting the newest bug from the cache." + ;; First time we get it from the server. + (should (equal (debbugs-newest-bugs 1) '(0))) + (should (equal debbugs-test--soap-operation-name "newest_bugs")) + (should (equal debbugs-test--soap-parameters '(1))) + (setq debbugs-test--soap-operation-name nil) + (setq debbugs-test--soap-parameters nil) + ;; Now it's cached + (should (equal (debbugs-newest-bugs 1) '(0))) + (should (equal debbugs-test--soap-operation-name nil)) + (should (equal debbugs-test--soap-parameters nil))) + (ert-deftest--debbugs debbugs-test-get-status () "Test \"get_status\"." - (cl-letf (((symbol-function #'float-time) - (lambda (&optional _specified-time) 5000))) - (should (= (float-time) 5000)) - (should (equal (sort (car (debbugs-get-status 64064))) - (sort (car debbugs-test--bug-status)))) - (should (string-equal debbugs-test--soap-operation-name "get_status")) - (should (equal debbugs-test--soap-parameters '([64064]))))) + (should (equal (sort (car (debbugs-get-status 64064))) + (sort (car debbugs-test--bug-status)))) + (should (string-equal debbugs-test--soap-operation-name "get_status")) + (should (equal debbugs-test--soap-parameters '([64064]))) + (setq debbugs-test--soap-operation-name nil) + (setq debbugs-test--soap-parameters nil) + ;; cached + (should (equal (sort (car (debbugs-get-status 64064))) + (sort (car debbugs-test--bug-status)))) + (should (equal debbugs-test--soap-operation-name nil)) + (should (equal debbugs-test--soap-parameters nil))) (ert-deftest--debbugs debbugs-test-get-usertag () "Test \"get_usertag\"." -- 2.48.1 --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#75789: [PATCH Debbugs] Factor cache accesses into dedicated functions Resent-From: Michael Albinus <michael.albinus@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 11 Feb 2025 11:05:02 +0000 Resent-Message-ID: <handler.75789.B75789.173927186932564 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Morgan Smith <morgan.j.smith@HIDDEN> Cc: 75789 <at> debbugs.gnu.org Received: via spool by 75789-submit <at> debbugs.gnu.org id=B75789.173927186932564 (code B ref 75789); Tue, 11 Feb 2025 11:05:02 +0000 Received: (at 75789) by debbugs.gnu.org; 11 Feb 2025 11:04:29 +0000 Received: from localhost ([127.0.0.1]:54557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tho42-0008T6-DA for submit <at> debbugs.gnu.org; Tue, 11 Feb 2025 06:04:29 -0500 Received: from mout.gmx.net ([212.227.15.15]:39847) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>) id 1tho3z-0008Sg-Mf for 75789 <at> debbugs.gnu.org; Tue, 11 Feb 2025 06:04:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1739271857; x=1739876657; i=michael.albinus@HIDDEN; bh=S0TtanLHQGZnvhZPJX/LgxzTATfk5WNyvqnHwikHJao=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=cUTfPKVVeaRuasQT1d5VZG1zXf/DHcDTPP4N3WlrC1oTPZlPvGUcFy+JAx8PQydN RHRFjyR0dDCULnW4XU+7HBw+nAYuga+sZqJzI+8ypqfeVduZhUJt6iq8s4xRR6fvb rXWgyTSfprtuHuu1UhcQtwMgsBs/E3SH+PoodwtngzqLlYP3ynSTAm3fpHZP9WbSu /jiRS/gEf04FquNkwwhpa+mMTWqcTPs2KRg+2OFfLo3iEzVBCASfCOQFLjLM13YAw KKAocGMRkJ/f6JLhQ0KkHyh6+tN37/LfZUilN8xut+VTOORghUVBeNpymZ6LQIKcW 1gw19wNJx5QuVkb0Ig== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M3lY1-1tgyqg1GeR-006st7; Tue, 11 Feb 2025 12:04:17 +0100 From: Michael Albinus <michael.albinus@HIDDEN> In-Reply-To: <CH3PR84MB34244F1E4014FF6A331ED388C5F22@HIDDEN> (Morgan Smith's message of "Sun, 09 Feb 2025 21:01:30 -0500") References: <CH3PR84MB342425F4DDC526B5A474FC52C5E02@HIDDEN> <874j1llupi.fsf@HIDDEN> <CH3PR84MB34244F1E4014FF6A331ED388C5F22@HIDDEN> Date: Tue, 11 Feb 2025 12:04:16 +0100 Message-ID: <87pljoagjz.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:iG33WhvJuPAh/EyxC/aNJOb4n+da6gBYow3Y+Q7HG6DXiDlODO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TZorJHt6YuAxKAuznL2Nr7julQ2Bh8zPIKI1rokJA790/KdUV tmyPymvKynqvIzuDJ9kqjaWDcj4H59YDe9d3hIc8QvZqvHcEFqSi4j39TbmEBxYEiGQvz2NUS e64t0BPcEWZzGcWRAJOe60fAu+ce+y7H525duwv1IQr0kJ5FTX/Smw6EkGchTuGv9ufzz3bgV g2YaCSWMfAQDrdx9lqvi5LvR3F4AmzuD21s+rE2bXV+REa4e7T9u9HKYyoE7m/I6Dob/9xvVU FvABvQNgLKEr4cVV2k+2Giu7jzbW0oRETohQbdkT5xsbB3XS5HKeaq8hkn5Zr3cg9aZ96t53B Xerf5w+7mUMFzINcBjAhKmSqGT0JVMaI9FS/UqxhN2cW2kA3g6RVFEvvGO/YaPzos3BNSh/xf MuS+WT+wiR+ZH0HSw0ZXuXQusdpIaZzKnXULYIf/kcKRXantoyjl6hKepN0RlxbsvbysABCjS mT2RpmHO1rlimoj2Bftp8MjAXZAOY1zpkZ+Xg1gDuUsi3q9mtaBSpAgpMJCwVrfuBXQwjs7cR u6g6LkAM6uID4BhrV9xdLveYh4EVNMhnhc/NSuSDSmkL2E/nK/rR7IqYQt X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Morgan Smith <morgan.j.smith@HIDDEN> writes: > Hi Michael, Hi Morgan, > Apologies for the delay. I started a new job the day after I sent this > email! Congrat! I wish you will fun with the new job! >> Otherwise, it looks good to me. Please push to the debbugs repo; I'll >> play with it for a while before making a new release. > > I don't believe I have push access to the repository. I've pushed it to the git repo. > Thanks for reviewing my patches! > > Morgan Best regards, Michael.
Received: (at control) by debbugs.gnu.org; 11 Feb 2025 13:02:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 11 08:02:41 2025 Received: from localhost ([127.0.0.1]:54949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1thpuS-0000kK-OH for submit <at> debbugs.gnu.org; Tue, 11 Feb 2025 08:02:40 -0500 Received: from mout.gmx.net ([212.227.17.22]:52407) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>) id 1thpuP-0000jv-3W for control <at> debbugs.gnu.org; Tue, 11 Feb 2025 08:02:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1739278948; x=1739883748; i=michael.albinus@HIDDEN; bh=L29IVOfOzM637U3plStI6lCliEWdB7Y8fyXsL0Eyp8U=; h=X-UI-Sender-Class:Date:Message-Id:To:From:Subject:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=VkzjdtLcwpznF8/Zs85bXT9xm7otCNV32gtXOfot8NGNO5fE5VGxnEwdjXkwW63V 1WepdOJpBbBU4DsYIDUqHYjJ7yRTUyLFT8XXjh0DcdDmHMqK8ORsa+8eFUlGQna2E xEFooi9MQh6cRQAmp0e5oAbm6ZHXGLNGZ6YxrnyELfLJFktMgE1pUGnBOEFVChHvF Q/6+3DGM2jkuCgXzLVlpQcp+icTxg4fmBDdDQXbUayp/HK03xQ/HL2ZEYnsuz0fiQ iwEG6A7QsiLWGbDwnDR2pViL9l1JP70tOMfx6gXtCgfTtIH74BTC0FVWilTaTQ2TX L7u8vUgGrZ3Qj/LCQA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mf0BG-1tAQu13tms-00kn2A for <control <at> debbugs.gnu.org>; Tue, 11 Feb 2025 14:02:28 +0100 Date: Tue, 11 Feb 2025 14:02:26 +0100 Message-Id: <87jz9wab31.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: Michael Albinus <michael.albinus@HIDDEN> Subject: control message for bug #75789 X-Provags-ID: V03:K1:RE3BrW61moTXi1Sy8PNhlOSVU2VMPayB1xe7oQP6nGwQb93Z5al aH33fo3Z6+Zn1KLkBk1hPfOZa0a8zMXbxoW70L4UNz7bRj1sakD9L/ra5rnC0kxd2ybo5lN jDut7j9lMe07um3AiJfwUrCMnYWsy8BjSfIxSIq3Ri3kxC8Mi6hm49cU5GqCisi+XBEdu42 8ItRClMi2kuSpxPP/UBDg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:N8Qv/Owyg5o=;auU0bSNpjkLpS6ABJB52ajeN1MC qe6ks7EQ3LbzSFyLc4nuzy1Ny7c/Tt6QdXr+SMGQMjscT2y0BlHXiFmx8htMd5PUA8s590YYX Q9IfhFUOPXDnFCub8xlC3LirtRIBXH+1QKObUHk7qS+7M3ZNmd9sKSYJrz4BE/0WOwMz25MuA 07q2CdqOz31hYM/kBVKFajf61h1wn4rTFpIo9c9S2wgwHc8KYhz8xgqKPVCMiUvM5uezqsjqM gPzHptYG/uJN98QigMVcW40rXQD6uUXw2KGjfcUKtmFWNXuxUPyYWmbe+vMRWmm6nRP8TjXLg tNnUxSRzxhqu6mZMD4P2OWhD81Jp1L1FJ5ZbhCKGvdP3yw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xFnkiBDqjABNS98yKaLTJeEp4Zk91uoXdH3RGMl0WFbsvK X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 75789 31.1 quit
X-Loop: help-debbugs@HIDDEN Subject: bug#75789: bug#75143: debbugs info manual name Resent-From: Michael Albinus <michael.albinus@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 15 Feb 2025 17:39:01 +0000 Resent-Message-ID: <handler.75789.D75789.173964109920550 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Morgan Smith <Morgan.J.Smith@HIDDEN> Cc: 75789-done <at> debbugs.gnu.org Received: via spool by 75789-done <at> debbugs.gnu.org id=D75789.173964109920550 (code D ref 75789); Sat, 15 Feb 2025 17:39:01 +0000 Received: (at 75789-done) by debbugs.gnu.org; 15 Feb 2025 17:38:19 +0000 Received: from localhost ([127.0.0.1]:57717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tjM7O-0005LM-JT for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 12:38:18 -0500 Received: from mout.gmx.net ([212.227.15.15]:35989) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>) id 1tjM7L-0005L2-9I for 75789-done <at> debbugs.gnu.org; Sat, 15 Feb 2025 12:38:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1739641085; x=1740245885; i=michael.albinus@HIDDEN; bh=JKsMuPhORcCCZL7hMFyJgxMQe3CpwgAmv/F9GkBbowU=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=ubVWwGXhF5zwJeEMj60XBQibPOYiJsyx2eA/t9o3+6VQX+L+cSbx8oIzGBm5ilQf yT3lMfSXa0W2A6HcBZmj5PjkpPK4bBOb1/HkqWtShyViQ9a8UJ9/vXqU52t9MZn/4 YmH4LxspCyOUg76z4zjnk4D43ut9p8NcVJi6nLCyxfzBvPga/RT2JRSMfZUllD84t wgWxGgsaSogoAp/gC+BF9fTHkwybK5jZKwaDEUNrfWjieu/mLV8/wc4rPVP25MnFR XEA7FM5uMG7Y4zQ+cIkQQ/JF59KJ4AAOR/bG17Nho8mgE2mvPvAJfYXrxiIdyFcMw LK23qfnrHjKZeq3gkA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M4JqV-1tjdEK2689-005bmh; Sat, 15 Feb 2025 18:38:05 +0100 From: Michael Albinus <michael.albinus@HIDDEN> In-Reply-To: <CH3PR84MB34242A4861B0865B23D9A98DC5FE2@HIDDEN> References: <CH3PR84MB3424068D214C8E11FA0D2A6FC50E2@HIDDEN> <87cyhd6ohz.fsf@HIDDEN> <CH3PR84MB3424EDE1E5FC9A4F68015AA0C50E2@HIDDEN> <877c7k6o26.fsf@HIDDEN> <87ikpgtvxr.fsf@HIDDEN> <CH3PR84MB34242A4861B0865B23D9A98DC5FE2@HIDDEN> Date: Sat, 15 Feb 2025 18:38:05 +0100 Message-ID: <87wmdrcdmq.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:sL/Ldrln5ctaoyiKoG6Sy+ZY95zjgMUsfBVdw3fJJYT7NvQUiec KHPvx3H2EOUmTCmBiKYaT2yPyy+xZ82NYJK+ctuYm8q7UkOIs/fUt04c1glNiJo6WIBnKR0 Ddp8c5fgfsYeC69EazMT+SFeDAzARWz/2CwJQvt6khiC3FNFoRL7Y1rXIpKgahs+Qpw1bML j0l2HGg/YckAniyaN59+A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:tYU831b7nZ0=;ambiB1C8hGJFlt8X7Etlla3pdQ5 62AjeXahwRIYcxbDaPdrZpUfVhtjbYFW4arsPx+s5ZHz+Fkcc0h9z9EtVmxB7ObFL2Y9lp7tr QjaVxvmlhWnvVCyNVmArjZnRL5KrD0EE9k50kaNoz6wVN74VbsfwY456rk9xvGx/sCV0l6+eG Y1hu/z5jU3vG8v6cOLOibkasdett8DJmbQEhOhgUpgqaqwRPw7tKu++8c8PA808Iz50inDOay L/MRcQH1nfyhLKJ8fhi2gYS6+rtNeK04nsFA1bexfyiJYMSsytchGzFGuIX25zEPW9itAy6MW 5SuK+rdkY5AIZSARHIEHl0dmCudDcKCZZOClEM4OxB9c8hBE/Zj6egqaRpQ3VCqt3xKbYoKNw ECMSXR9amy7VNAmmPrwt3smkJKCb/HIwwj4hCvnarhJJiN7Rc4roYeUUEkFVOATlYSZguP7Ei 8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 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Morgan Smith <Morgan.J.Smith@HIDDEN> writes: > Hi Michael, Hi Morgan, > However, I think I did come up with a way to simply change the user > facing name of the manual without breaking links. I'm not super well > versed in texinfo but after applying the attached changes and installing > them on my system, I have been able to access the manuals using new > names yet the links within the manual that link to each other seem to > remain functional. > > Let me know what you think! LGTM, thanks! I've pushed both patches to the ELPA git repo. In a couple of days I'll release a new debbugs version. Closing the bug. > Thanks, > > Morgan Best regards, Michael.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.