From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 03:23:47 2023 Received: (at submit) by debbugs.gnu.org; 8 May 2023 07:23:47 +0000 Received: from localhost ([127.0.0.1]:39016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvvDn-00089n-1g for submit@debbugs.gnu.org; Mon, 08 May 2023 03:23:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:46954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjHe-0008SN-4M for submit@debbugs.gnu.org; Sun, 07 May 2023 14:38:58 -0400 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 ) id 1pvjHd-0006c4-Ud for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 14:38:57 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvjHc-00063r-AF for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 14:38:57 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4eed764a10cso4104268e87.0 for ; Sun, 07 May 2023 11:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683484734; x=1686076734; h=to:subject:message-id:date:from:sender:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+oziFH6jzWkhC9oJcm/cxzhLKteOGwkyMEdPexPRf6Y=; b=k1/uRdBp4qTNbsQv8QuNYw8pDiGIt/fAWbFic2KZTwu0YB1NBZsfLH9n8p1XrGQXtQ BqbqASmupYp+FiCMREwGPTUA8pCiTrQhJdRtnHCnDFgsp2V5Q0vOKY34XubPAgnxkQNN 93eRJCGX8xwNkMLStNXEDHAb66/jIAEWBEQVBZ4kkg3JDmgJ/mgUwSDGu302zozxfGUX Da7l+c4PM4cV6AMIW8oJp51oHedYdJW+As2QGPA5Bl6MT3JeChSjivPFHSk82GwpX2to T0edpqG2zGFhGfwyWjk/TQEDW938WRj6jpOniqaG2Cv0o92BmkWB0TPeCs5nWqmL0mko wyVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683484734; x=1686076734; h=to:subject:message-id:date:from:sender:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+oziFH6jzWkhC9oJcm/cxzhLKteOGwkyMEdPexPRf6Y=; b=dUkb826n6qPntdC6wZA/rWExauQiawNKLpx1AWehdVMlfgLOiW8vFrVIbaNd8R6vHZ q9ysk0jjTQBzibI6yVvbpoCTxc1+dyKmpN+ni9fFGNrNNy3bYuge/zJMl/By2D6DIlQ2 5bJbrVPecBFUZz7hdut6DY2uH+RXb3Bk1TW9Gf26REzIrLLOwN1HQFSKu2yR8Td0BrtO A2nhaCm/G0HLtBWDGHkWfKyoydImmGN5vUD5GEsxZbclOJJBaTH9H+24K/HWZYSj+Q3t K+pbSwsyTFOdjt51f438z3jFRg7IVZfT169m+8QKXKMfqCGa31JqeO139Gv2v93Y8Zw+ pITg== X-Gm-Message-State: AC+VfDxM5MA7QeIVsez8I8bNnzHGUAlW0y0wI5r9R5ClpkKs/sWAvs1p h1nlLYHUYvLhP2HfPqnqE+Cc3OLrYYGWrvc1p2yAeqU8JOc= X-Google-Smtp-Source: ACHHUZ5kL6PO6m1GnE+aH5fHHiPhr1km1PuWzJ3kvefLx10yKeWCtKy5j0tcBL7CdIdzODSnMG7sqbrsz/EyuIyvajo= X-Received: by 2002:ac2:4c30:0:b0:4f1:3e97:4486 with SMTP id u16-20020ac24c30000000b004f13e974486mr1903465lfq.57.1683484733865; Sun, 07 May 2023 11:38:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: X-Google-Sender-Delegation: alexkoz@gmail.com From: Alexander Kozhevnikov Date: Sun, 7 May 2023 18:38:42 +0000 X-Google-Sender-Auth: VSjNa7KjE7ORayjiBkG3qOG6Xow Message-ID: Subject: Re: Bug+fix for eshell-hist-ignore-dups 'erase To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=mentalisttraceur@gmail.com; helo=mail-lf1-x12e.google.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 08 May 2023 03:23:39 -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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Ah! The second bug (the case where there are zero history entries) is due to the immediately surrounding lines: (unless (ring-empty-p eshell-history-ring) ... t) Same exact steps to reproduce, just don't add one entry to the history ring - leave it empty. The cause is that these lines are inside a big condition of a big `when` - but that "condition" is complecting two things: 1. the actual predicate - should we add this input to the history ring? and 2. the history management side-effects that need to happen if that predicate is true, before the history addition is made. So the key observation is that this `(unless ...)` is part of the surrounding `(and ...)` but is not actually there to influence the condition! It's there to catch a case which requires a different side-effect. But when the inner `(unless ...)` was added, the `t` got accidentally/wrongly scooped into the `(unless ...)` along with the side-effect. I think the ideal fix here is a refactor that makes the big picture clearer (I can provide one if asked, but that would almost certainly have enough creative substance to require copyright assignment, and would need to wait on the paperwork). But a good-enough, minimally disruptive fix that is too mechanical and small to be copyrightable is just to change the `(unless ... t)` to a `(progn (unless ...) t)`: (progn (unless (ring-empty-p eshell-history-ring) ...) t) From debbugs-submit-bounces@debbugs.gnu.org Mon May 15 00:46:40 2023 Received: (at 63362) by debbugs.gnu.org; 15 May 2023 04:46:40 +0000 Received: from localhost ([127.0.0.1]:42443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyQ6a-0006cn-De for submit@debbugs.gnu.org; Mon, 15 May 2023 00:46:40 -0400 Received: from mail-pg1-f172.google.com ([209.85.215.172]:54417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyQ6Y-0006cb-Vp for 63362@debbugs.gnu.org; Mon, 15 May 2023 00:46:39 -0400 Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-52c30fbccd4so11281271a12.0 for <63362@debbugs.gnu.org>; Sun, 14 May 2023 21:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684125993; x=1686717993; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=Nxx4JDbPnjkP4zIXqE+TauS1/pcPRYJUaxWfPndQCQg=; b=rm5EdI2ZHCrAJ/wRQ5uYDPMi71Pl7HEqaYSKyMltRZPyG0YWLg1oKsYzOR8aLPPvRx gEtlQkeHov12Cin45qmzdJyJikOTQqH8CV29O7oGGGc4jbSuenYJ6oswHl/RQq/lhZpN oGS1MeBQdenpMDrWjlK4r+t8jljMoS60b6jQei4a+lZ/PzsPmBUQcTa2l46jB6dI05FH /9N14gxraLREWD4ldZeUl2cEZpVkrTr0bgizxu+0neyj5snTQQaIUWYImcwmxXFmB/2t 6n02ruqy9Wfs8LIX02deIwENSgkif1T67k5ut3h+T94d9f6yAbajuypK7HxOLHAz4pyt kTIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684125993; x=1686717993; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Nxx4JDbPnjkP4zIXqE+TauS1/pcPRYJUaxWfPndQCQg=; b=SZg2lYpXlGVaFxJ0Skj1SUBM9u93W4ycrkwT2MWcRQ7/hGeMLc0WZxhJp0kiK0mZX7 NKS60KeM29xmeb9+E/1ZXUD6bjbQgVU+2Bnt6dtlyqXrVQVOpnX2ZP7Skgf4wVZ77jmZ cdkyXCP3IacyW8HDptxLeKOkzXHxwDionuwK4husOjG8f35n3dtSXNasMYSMd+nc1IWt f58Sjz7YkSXvEPOwjHzRUgJ+mRRk7K8+owyEiSUPT98CD06cDVMi/VwzHFqZ9gEnQd5f iyhdoWmP1r2J4aRB6SuisKJjJ4qp9iWfOgHi+8yAJxslFu5dBE0H2TrnCN5HgXNh72LW xzXA== X-Gm-Message-State: AC+VfDx6VGgmCO3SLbrfFBshwQdqSgcnfvfmxRFSI0HtfOZWHcQ48CcV nInbMoAfbA2PtpYcHLsCeXd8En5RFWc= X-Google-Smtp-Source: ACHHUZ7V7OTsQl4+1tMXBBtW7UFTz7XlN1RDiZWbnmQ/ESA4bcEAk5fHV8s9aehpD5+9VkssOUUpkA== X-Received: by 2002:a05:6a21:7891:b0:101:209e:bc57 with SMTP id bf17-20020a056a21789100b00101209ebc57mr27799141pzc.50.1684125993047; Sun, 14 May 2023 21:46:33 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id f13-20020aa782cd000000b0062e63cdfcb6sm11149665pfn.94.2023.05.14.21.46.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 May 2023 21:46:32 -0700 (PDT) Message-ID: <7744f544-d4d0-5975-b960-e5a967a4d8e9@gmail.com> Date: Sun, 14 May 2023 21:46:32 -0700 MIME-Version: 1.0 Subject: Re: bug#63362: Bug+fix for eshell-hist-ignore-dups 'erase Content-Language: en-US To: Alexander Kozhevnikov , 63362@debbugs.gnu.org References: From: Jim Porter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63362 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 (-) On 5/7/2023 11:38 AM, Alexander Kozhevnikov wrote: > I think the ideal fix here is a refactor that makes the big picture > clearer (I can provide one if asked, but that would almost certainly > have enough creative substance to require copyright assignment, and > would need to wait on the paperwork). Thanks for this analysis. I'll try and take a look at this in more detail, and perhaps refactor things a bit in this part of the code as you suggest. (I've wanted to clean up the Eshell history logic a bit already, since I'd like to make it a bit more usable when you have multiple Eshell buffers.) First step though is for me to write up a few regression tests, I think. That should make it easier to do some refactoring without breaking anything. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 23 20:18:12 2023 Received: (at control) by debbugs.gnu.org; 24 Aug 2023 00:18:12 +0000 Received: from localhost ([127.0.0.1]:35644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYy3A-0003vF-IF for submit@debbugs.gnu.org; Wed, 23 Aug 2023 20:18:12 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:57852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYy35-0003uw-Kp for control@debbugs.gnu.org; Wed, 23 Aug 2023 20:18:10 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-68a529e1974so2898440b3a.3 for ; Wed, 23 Aug 2023 17:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692836278; x=1693441078; h=content-transfer-encoding:subject:from:to:content-language :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=HIu0EWoVLh7fZKCu8IqWfvI4e2jARBKuZMJmSFOZ2c8=; b=nnnAswXeWqq+1jSai4uRMrY+3m7BrOBV6QicTYNP1iabGc6MjcFSVOGzcW4X6RUBfj hXxWfq7rPSk1gfRaNpnNrkRiR2SVWcHIXmTk6EOMEMRmAGlnGm/lbLda7jKsJR8fkgfw qmNwC6FancsjK/M006XF3V2ufbYtrf8ycV7ArKHh96Elbv3Rlb57lobcI8CkoE8vw9uR qxIx0A0/ODJHpMES3/Xuc1Rb1aHlhm68tTjtgV2ITldBD/1BgleDFZg5OzdEgKwc1o1e n6BFL+snNmId/s03XvSuimCX8lDzShlD2iT18Tbx3sf0Rw+feDs1Dx8B6Df6QQKdMLul 67iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692836278; x=1693441078; h=content-transfer-encoding:subject:from:to:content-language :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=HIu0EWoVLh7fZKCu8IqWfvI4e2jARBKuZMJmSFOZ2c8=; b=Rsw8fdJSUe2pHLDU/M2/VVrRHJ55iX2SqqAtvFSdrGFXJf6NoDWL42YlO7jXRzmCN9 MJ+47OeYQMuycLLC8foFxg2vUOgl4ENNNbb3kHGU58X4Cg/gg+JTfWpkHvCRnTbzpB1E DSYdUE/zGyvlL45qIxE69PC9wRHVL1QznCDMXHTJFoRMTC2C6rsDyszqNuQjEcJHfeHr EEmqv52pUxJzn+Pa5WV5BZMd8JS8FTr5w0A53cWCGrPfm7yZBGeKMObuVQRxCkt3qvdh LV9n15DVxJQghXvNC5BwJhWzibMpCTt7laKifAOvVFTDIWFUUK4Imw2EPKaoRHLMGJZI KZsA== X-Gm-Message-State: AOJu0YzEyRCERpS1aQ7YW2JXPNnUih5SDbQAZQQUcXnaamdpcpi8RDj9 agcKKWpHdG4Lziev+4hSWjmn+cT2y7U= X-Google-Smtp-Source: AGHT+IHH9NaXlr/Uv2YJ3DLk6lybLij3fTXv3gotL0bGhzqnegyvZDinTKDf2JVskDV77S/q0uBWBg== X-Received: by 2002:a05:6a20:8e0b:b0:13e:14f9:294d with SMTP id y11-20020a056a208e0b00b0013e14f9294dmr14844602pzj.58.1692836277939; Wed, 23 Aug 2023 17:17:57 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id i10-20020a636d0a000000b0056c2f1a2f6bsm5837243pgc.41.2023.08.23.17.17.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Aug 2023 17:17:57 -0700 (PDT) Message-ID: <697621a6-211a-54c9-236a-c77cf9ccef38@gmail.com> Date: Wed, 23 Aug 2023 17:17:56 -0700 MIME-Version: 1.0 X-Mozilla-News-Host: news://news.gmane.io:119 Content-Language: en-US To: control@debbugs.gnu.org From: Jim Porter Subject: Merging bugs Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 (-) merge 63360 63362 From unknown Thu Jun 19 16:22:46 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, 21 Sep 2023 11:24:08 +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