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: Sun, 29 Apr 2018 18:43:02 -0400 Message-ID: <874ljtprbd.fsf@gmail.com> References: <87sh7s1hvv.fsf@tcd.ie> <87lgdk1hk6.fsf@tcd.ie> <87d0yurqd8.fsf@gmail.com> <87po2hhjov.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1525042303 19938 195.159.176.226 (29 Apr 2018 22:51:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Apr 2018 22:51:43 +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 Mon Apr 30 00:51:39 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 1fCvAP-00055X-Ai for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Apr 2018 00:51:37 +0200 Original-Received: from localhost ([::1]:57073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCvCW-0002Zo-3G for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2018 18:53:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCvBM-0002TW-T7 for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 18:53:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCv34-00074I-BC for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 18:47:36 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35346) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCv34-000740-2E for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 18:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fCv33-0003I9-IL for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 18:44: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: Sun, 29 Apr 2018 22:44: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.152504179112587 (code B ref 31211); Sun, 29 Apr 2018 22:44:01 +0000 Original-Received: (at 31211) by debbugs.gnu.org; 29 Apr 2018 22:43:11 +0000 Original-Received: from localhost ([127.0.0.1]:43243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCv2F-0003Gx-Ab for submit@debbugs.gnu.org; Sun, 29 Apr 2018 18:43:11 -0400 Original-Received: from mail-io0-f171.google.com ([209.85.223.171]:42411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCv2D-0003Gk-4d for 31211@debbugs.gnu.org; Sun, 29 Apr 2018 18:43:09 -0400 Original-Received: by mail-io0-f171.google.com with SMTP id a10-v6so8326923ioc.9 for <31211@debbugs.gnu.org>; Sun, 29 Apr 2018 15:43:09 -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=RA/I2J9d1mzoMWeot2SkRPg3OAmxXdmUuuhT1Ilcaog=; b=ZwvPXvEV28pJ5bJUftha54FUOYpYZJezitybfakAG3/5TBnVneC3P1pRuWH1uRoj2i 0LfrXT3IuyGNUrb65CppVXXnZ1vZQnEnvCIatyGyV+RfZRKCmwpl4KXhx1c0buMCavps WnzLs63HK8wbiJuyaTtb3rG0zKYSzFp2C3BB5ODUL6rHZNf8R8/JEVsV8Dz0A4X5IwN7 sNrs9yC55oPkpfFw/vDkfkDW8UsRy/P7xzoFfMgfBpRBS8lXK2pjvTfZbvC+K7weEX6M bT1kVvskNTYI/1xkgWJyomDoNDYQzpVLohQM0IAsHvVmdWw9nDJZSH364e6V5UFlGEfu bZdQ== 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=RA/I2J9d1mzoMWeot2SkRPg3OAmxXdmUuuhT1Ilcaog=; b=kEStGDcOf74x0hnTmeh6DVYDXQyOXyvVeBJMVgG6coZqbeDcf65R/aEye2Xi6vl4Dk qZw7nGJ8NvUiPvTf85owfsj5werjHmhHXwb9U66h1rVVM8RushZ5fcJRMfV3f4DhnENh K9N/a/eDrHttS9iEzcCPbTIyQ9t8T0EcnQ4d7ryYa6BNYAeGsdcsAZ+jgddqaIk6D0Kv f52gPxaaSpbQ0SkGC4ckql0jPTxwhwJWBiBRtvecXc/9A1MkgxBaRA1fVVbXfQmuhT4k U5DvXKf/5dAi2PYFcemGN0FAj0CNWetKCrqsQee2hfW5ctEq/KiifhBWxYRxOWEVQDG7 zNwQ== X-Gm-Message-State: ALQs6tC1b2fEcKoXeu7wQSXXGB36nlIvU2BBZzRQnOzeP4HHjeogOdpm Uc1JVRF2AHgZncvDmvFYNRUI2Q== X-Google-Smtp-Source: AB8JxZpp40HfEXc2KhCNJLYwGkpyBIY77xcUvSWgQRXp+2Y7lmADz4ltgTCY7AEfFRc6hQuQH5rFjQ== X-Received: by 2002:a6b:4606:: with SMTP id t6-v6mr10341999ioa.158.1525041783520; Sun, 29 Apr 2018 15:43:03 -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 q21-v6sm2886702itb.4.2018.04.29.15.43.02 for <31211@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Apr 2018 15:43:02 -0700 (PDT) In-Reply-To: <87po2hhjov.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sun, 29 Apr 2018 20:54:56 +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:145843 Archived-At: "Basil L. Contovounesios" writes: > Is there any reason why we can't use add-to-history in places like > Fcall_interactively in src/callint.c and read_minibuf in src/minibuf.c, > rather than duplicating its logic and falling into off-by-one traps? Sometimes there can be bootstrapping problems (e.g., the C code tries to call Lisp code that hasn't been loaded yet). In this case, I don't think call-interactively should be needed during bootstrap, so it's probably fine. > I attach a patch which delegates to add-to-history in various such > places, on the assumption this is kosher. Please let me know whether > something like this would be acceptable and/or how it can made so. > > The second attachment comprises the same minor lisp/simple.el touch-ups > as in my last email. Thanks, I'll push to master in a few days assuming there are no objections.