unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: 31211@debbugs.gnu.org
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	[thread overview]
Message-ID: <87d0yurqd8.fsf@gmail.com> (raw)
In-Reply-To: <87lgdk1hk6.fsf@tcd.ie> (Basil L. Contovounesios's message of "Wed, 18 Apr 2018 19:43:37 +0100")

severity 31211 minor
quit

"Basil L. Contovounesios" <contovob@tcd.ie> 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);
        }





  parent reply	other threads:[~2018-04-20 12:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 18:36 bug#31211: 27.0.50; Pruning of command-history in command-execute is off by one Basil L. Contovounesios
2018-04-18 18:43 ` Basil L. Contovounesios
2018-04-18 18:52   ` Basil L. Contovounesios
2018-04-20 12:53   ` Noam Postavsky [this message]
2018-04-29 19:54     ` Basil L. Contovounesios
2018-04-29 22:43       ` Noam Postavsky
2018-04-30  0:51         ` Basil L. Contovounesios
2018-05-03  0:37           ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0yurqd8.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=31211@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).