From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31211: 27.0.50; Pruning of command-history in command-execute is off by one Date: Fri, 20 Apr 2018 08:53:23 -0400 Message-ID: <87d0yurqd8.fsf@gmail.com> References: <87sh7s1hvv.fsf@tcd.ie> <87lgdk1hk6.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524228735 17119 195.159.176.226 (20 Apr 2018 12:52:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Apr 2018 12:52:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: 31211@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 20 14:52:11 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9VWL-0004Ln-KC for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Apr 2018 14:52:09 +0200 Original-Received: from localhost ([::1]:54909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9VYS-0001Pp-B9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Apr 2018 08:54:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9VYD-0001NK-Bx for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2018 08:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9VYA-00041N-9n for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2018 08:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53914) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9VYA-00040G-4X for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2018 08:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f9VY9-0004pN-Qu for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2018 08:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Apr 2018 12:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31211 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 31211-submit@debbugs.gnu.org id=B31211.152422881618524 (code B ref 31211); Fri, 20 Apr 2018 12:54:01 +0000 Original-Received: (at 31211) by debbugs.gnu.org; 20 Apr 2018 12:53:36 +0000 Original-Received: from localhost ([127.0.0.1]:33578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9VXj-0004oc-TE for submit@debbugs.gnu.org; Fri, 20 Apr 2018 08:53:36 -0400 Original-Received: from mail-io0-f175.google.com ([209.85.223.175]:44878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9VXf-0004oI-TA; Fri, 20 Apr 2018 08:53:33 -0400 Original-Received: by mail-io0-f175.google.com with SMTP id d11-v6so2561972iof.11; Fri, 20 Apr 2018 05:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=wVY68Jb5z/zgn6Ajy55r0qXI0ge4EhB+Trc1Ltlr+ig=; b=gTG80PcEPMalK1vGrpjbt9qSdVvaAp3j/diJXm0K6hq06ViOUjJPgVPjxhXQ/QKEM3 8aqhfuQffIwBOSm1U0KTn3hdcgCbw1SO67v5TWPapc3PeLF1WrVtOtom5C2x6j+42M4V r22HQ/dTqqkTSZVd8vCw/N2eBCsSXtOTdGAGbYMSYXndMQudNQ6pZe2LqMiKWqmDhNhv UnZsYd85XgLNkNFT9x2FXlQNJ9/UHpw8JpB5lRDuOLD/Hw5EfkMBbN1utGQQanYD6cWO DiU5Hki0pXN0xEwVf4E5S+BlUpu44T7BoZ9xOhsRMLdorhcoAYOd4Oh7WryRMwDLqRiO GRMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=wVY68Jb5z/zgn6Ajy55r0qXI0ge4EhB+Trc1Ltlr+ig=; b=fCbAZrXnaHFsIFnAT1BfU0MY3oFxpa/PoaXCU/E4DlyIytcFDZ+WCltxHs9Wvj/dAD hejK6ZrQGuZDW/x/Tzdwu6WKj41IqnIOmsN/wdnDN3wOIdrQTyKjAcnPJjGc1CIJCNnO Hq8EEjSXQhNBAOMTwECnXWvhBGpocBEkeEI4uHM4Zh01WUAQE5NQg/RvWK4uuhXqiGCq OIls4NLXnE62JPSWWhdLBSwNc9Y/u19kAp4ooUO9HprEYx+8hjfhoRRddTXwRcJE4JWn 6IG7YxjGIOvvXwTfzfnMa/7Um5iBBQ7g0zhH86EyGfWu6Ub/jX0HqsFdzijrXq5cPQO4 y61w== X-Gm-Message-State: ALQs6tARkipASLQIYLOeGWtXfVWwJtZuNDjRTJ5Cx2UBlXXQ3AhpSBVx NOfajI8wTyv20RHngEW1/WFRfw== X-Google-Smtp-Source: AIpwx495F8JVHx+t1R3KWvbC/jItrLVzyjIepX9WHPTeuvq+82KY8dTRoVpkhbx+IBebw2JucTXYmw== X-Received: by 2002:a6b:200e:: with SMTP id g14-v6mr5658653iog.161.1524228806117; Fri, 20 Apr 2018 05:53:26 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id g16-v6sm1301371ita.0.2018.04.20.05.53.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Apr 2018 05:53:24 -0700 (PDT) In-Reply-To: <87lgdk1hk6.fsf@tcd.ie> (Basil L. Contovounesios's message of "Wed, 18 Apr 2018 19:43:37 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145640 Archived-At: severity 31211 minor quit "Basil L. Contovounesios" writes: > Subject: [PATCH 1/2] Improve simple.el history and ring pruning > > * lisp/simple.el (command-execute): > Fix off-by-one error in command-history pruning. (bug#31211) > (kill-new, push-mark): Prune kill-ring, mark-ring and > global-mark-ring in a single pass, as add-to-history does. You need to change call-interactively in callint.c in order to fix the test case from your OP though, right? This part: /* Don't keep command history around forever. */ if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0) { Lisp_Object teml = Fnthcdr (Vhistory_length, Vcommand_history); if (CONSP (teml)) XSETCDR (teml, Qnil); }