all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: jidanni@jidanni.org
Cc: 2989@emacsbugs.donarmstrong.com
Subject: bug#2989: implement bash's ignoredups
Date: Mon, 13 Apr 2009 19:01:09 -0700 (PDT)	[thread overview]
Message-ID: <200904140201.n3E219Rx007518@godzilla.ics.uci.edu> (raw)
In-Reply-To: <878wm4t3xi.fsf@jidanni.org> (jidanni@jidanni.org's message of "Tue, 14 Apr 2009 09:33:13 +0800")

jidanni@jidanni.org writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > > *** New user option `history-delete-duplicates'.
  > Well, OK, but see, there they still are at the <escape> p's below.
  > $ cd /tmp
  > $ echo a:\;date>Makefile
  > $ emacs -Q -eval '(setq history-delete-duplicates t)' Makefile
  > <escape> x c o m p i l e <return> <return> <escape> x <up>
  > <return> <return> <escape> x <up> <return> <return>
  > C-x <escape> <escape> <escape> p <escape> p <escape> p
  > emacs-version "22.3.1" (Yes, I still use <escape>).

You probably want to open another bug saying that
history-delete-duplicates does not apply to command history.

You can try this (not even compile tested) patch:

--- callint.c.~1.172.~	Tue Mar 31 16:28:30 2009
+++ callint.c	Mon Apr 13 18:54:56 2009
@@ -370,8 +370,12 @@
 	     and turn them into things we can eval.  */
 	  values = quotify_args (Fcopy_sequence (specs));
 	  fix_command (input, values);
-	  Vcommand_history
-	    = Fcons (Fcons (function, values), Vcommand_history);
+	  {
+	    Lisp_Object this_cmd = Fcons (function, values);
+	    if (history_delete_duplicates) 
+	      Vcommand_history = Fdelete (this_cmd, Vcommand_history);
+	    Vcommand_history = Fcons (this_cmd, Vcommand_history);
+	  }
 
 	  /* Don't keep command history around forever.  */
 	  if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0)






  reply	other threads:[~2009-04-14  2:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200904140120.n3E1Kbm2006695@godzilla.ics.uci.edu>
2009-04-14  0:00 ` bug#2989: implement bash's ignoredups jidanni
2009-04-14  1:30   ` bug#2989: marked as done (implement bash's ignoredups) Emacs bug Tracking System
2009-04-15  0:20   ` bug#2989: marked as done (history-delete-duplicates does not apply to command history) Emacs bug Tracking System
2009-04-14  1:33 ` bug#2989: implement bash's ignoredups jidanni
2009-04-14  2:01   ` Dan Nicolaescu [this message]
2009-04-14  2:07     ` bug#2989: history-delete-duplicates does not apply to command history jidanni
2009-04-14  2:15       ` Processed: " Emacs bug Tracking System
2009-04-14  5:14       ` bug#2989: " Jason Rumney
2009-04-14  5:42         ` jidanni
2009-04-14  5:33       ` Dan Nicolaescu
2009-04-14 13:04         ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=200904140201.n3E219Rx007518@godzilla.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=2989@emacsbugs.donarmstrong.com \
    --cc=jidanni@jidanni.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.