From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 03:34:19 2020 Received: (at submit) by debbugs.gnu.org; 26 Aug 2020 07:34:19 +0000 Received: from localhost ([127.0.0.1]:37242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kApwo-00081U-08 for submit@debbugs.gnu.org; Wed, 26 Aug 2020 03:34:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:37534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAnzm-0004mn-2i for submit@debbugs.gnu.org; Wed, 26 Aug 2020 01:29:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAnzl-0006s4-Sf for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2020 01:29:13 -0400 Received: from wilbur.contactoffice.com ([212.3.242.68]:35894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAnzj-0002Sg-Kc for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2020 01:29:13 -0400 Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id 315ED11A1 for ; Wed, 26 Aug 2020 07:29:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailfence.com; s=20160819-nLV10XS2; t=1598419747; bh=ZT1j9yl1CKEvEyHZpvi89yfPIAg6i52Q9KUZl5VHhTU=; h=Date:Subject:Reply-To:From:To:From; b=RQnYbqb4qU7B+NUf7QHlutMizhAyinqpry88DQ+9WCt6fLEkeuKsXfMc2E7mEadbZ ngI8y9PaKgyOMWBiv7BmVC4WiBX/dQPjHhYyQcYYY82Lvn3fClal8o1ennVYO1wA7o 5TwWj131bNBTbdjuN2yRa/ljastaoO4DnRTWM355OMMLsEYJ5hLCW1bgCucGNqeCrU 4D2PrdB0gFE4bmPipF2Ogqc8T4eBjRCQ+nTcJ0x9QVW+Yk3QGX70VtQGROAEdJTKAg P3VSZTSfHTZdPGWQWMXFMdbVIQ3J2+ZTjKAGI9DiJT00gIuP3UAexd/cvP8xUXmAiO 7Ol4Iu8xdyt1g== Date: Wed, 26 Aug 2020 07:29:03 +0200 (CEST) Message-ID: <527934444.146287.1598419743729@ichabod.co-bxl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_146172_1068100156.1598419612919" Subject: [PATCH] eshell/em-hist.el: Remove unnecessary check X-Priority: 3 From: Brian Leung To: bug-gnu-emacs@gnu.org X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:225491745 Received-SPF: pass client-ip=212.3.242.68; envelope-from=leungbk@mailfence.com; helo=wilbur.contactoffice.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/26 01:29:07 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 26 Aug 2020 03:34:17 -0400 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: , Reply-To: Brian Leung Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) ------=_Part_146172_1068100156.1598419612919 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable There's no need to check n here since we're always taking the mod. --=C2=A0 Sent with https://mailfence.com Secure and private email ------=_Part_146172_1068100156.1598419612919 Content-Type: text/x-diff; charset=us-ascii; name=0001-eshell-Remove-unnecessary-check-in-em-hist.patch Content-Transfer-Encoding: 7bit Content-Description: File Attachment: 0001-eshell-Remove-unnecessary-check-in-em-hist.patch Content-Disposition: attachment; filename=0001-eshell-Remove-unnecessary-check-in-em-hist.patch >From 7d4843ecc817036158e77a3819f1545604602543 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Tue, 25 Aug 2020 22:06:51 -0700 Subject: [PATCH] eshell: Remove unnecessary check in em-hist Both before and within the while loop, n is always between [0, len] inclusive. Copyright-paperwork-exempt: yes --- lisp/eshell/em-hist.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 267936583e..5cee1bad36 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -862,7 +862,7 @@ eshell-previous-matching-input-string-position (setq prev n n (mod (+ n motion) len)) ;; If we haven't reached a match, step some more. - (while (and (< n len) (not tried-each-ring-item) + (while (and (not tried-each-ring-item) (not (string-match regexp (eshell-get-history n)))) (setq n (mod (+ n motion) len) ;; If we have gone all the way around in this search. -- 2.28.0 ------=_Part_146172_1068100156.1598419612919-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 06:01:54 2020 Received: (at 43056) by debbugs.gnu.org; 26 Aug 2020 10:01:54 +0000 Received: from localhost ([127.0.0.1]:37403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAsFe-0005Rd-3z for submit@debbugs.gnu.org; Wed, 26 Aug 2020 06:01:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAsFc-0005RQ-IJ for 43056@debbugs.gnu.org; Wed, 26 Aug 2020 06:01:53 -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=YND/qLblrgGIgEANkQ4al0RaIwolEdcQA0HS9m9WjVM=; b=nQcGr4qzu6CVlbCNTYYFJbVtHc 8SSax+qKf3WN6kohsIaDamHNsmBVnafUNGbMFLfYVfQftcVAaPg2Ep9jnGY8sQh8y9+GZIFx4KdgZ fultFc7Oc13ZHMiS7xRaIDGwAMwUHr/RRW4AxBLRJ3weq8Kp3V41kkrJlc4dBJg5bdTA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAsFQ-0003yb-Mp; Wed, 26 Aug 2020 12:01:46 +0200 From: Lars Ingebrigtsen To: Brian Leung Subject: Re: bug#43056: [PATCH] eshell/em-hist.el: Remove unnecessary check References: <527934444.146287.1598419743729@ichabod.co-bxl> X-Now-Playing: Various's _Kaleidoscope (1)_: "Tenderlonious and The 22a Arkestra - The Shakedown" Date: Wed, 26 Aug 2020 12:01:39 +0200 In-Reply-To: <527934444.146287.1598419743729@ichabod.co-bxl> (Brian Leung's message of "Wed, 26 Aug 2020 07:29:03 +0200 (CEST)") Message-ID: <87mu2h3ev0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Brian Leung writes: > There's no need to check n here since we're always taking the mod. [...] 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: 0.0 (/) X-Debbugs-Envelope-To: 43056 Cc: 43056@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: -1.0 (-) Brian Leung writes: > There's no need to check n here since we're always taking the mod. [...] > - (while (and (< n len) (not tried-each-ring-item) > + (while (and (not tried-each-ring-item) Thanks; applied to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 06:02:00 2020 Received: (at control) by debbugs.gnu.org; 26 Aug 2020 10:02:00 +0000 Received: from localhost ([127.0.0.1]:37406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAsFk-0005Ry-Bu for submit@debbugs.gnu.org; Wed, 26 Aug 2020 06:02:00 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAsFi-0005Rb-KJ for control@debbugs.gnu.org; Wed, 26 Aug 2020 06:01:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Gmf3Hn72OwsDvosXSdXbrr0KyH3xYPoPF9r78pr9oEM=; b=fHyBx0BHp77raiveIQ3y5HlmMB 7AXHZuEhv+AawmyL/i7rZsrnvmBrSSz1Ok+gqMzzczFOvacJh61B5qnLfFmwEcEMaS2gpiUhTBgLT MZb0rJ9csbcsYD33b7AGvzapzvTkJUUyUpTTR4UV06vnOI9mjbMTw6IPsj6971Lgg0Jw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAsFa-0003yj-RI for control@debbugs.gnu.org; Wed, 26 Aug 2020 12:01:53 +0200 Date: Wed, 26 Aug 2020 12:01:49 +0200 Message-Id: <87lfi13euq.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #43056 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: tags 43056 fixed close 43056 28.1 quit 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: 0.0 (/) X-Debbugs-Envelope-To: control 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.0 (-) tags 43056 fixed close 43056 28.1 quit From unknown Sun Jun 22 19:07:43 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, 23 Sep 2020 11:24:11 +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