Subject: bug#1505: duplicate entries in compile-history

From: Tom Tromey <[email-masked]>
Date: Sat, 06 Dec 2008 07:12:41 -0700

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the [email-masked] mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I ran into the following situation yesterday:

I ran one compile command in the morning.  Then, for the rest of the
day, I ran a couple of different compile command, alternating them
many times.  Near the end of the day, I wanted to re-run the first
command, but it had been removed from history.

It would be nice if there were a way to eliminate duplicates from
compile-history, so that older commands were not completely dropped.
For instance, a command could still be put at the front of the list;
but all duplicates of it elsewhere in the list could be removed at the
same time.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.2/etc/DEBUG for instructions.

In GNU Emacs 22.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.12.9)
 of 2008-05-23 on xenbuilder4.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10500000
configured using `configure  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-x-toolkit=gtk' '--with-sound' '--with-toolkit-scroll-bars' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  auto-fill-function: do-auto-fill
  compilation-in-progress: (gid)
  shell-dirtrack-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-spelling-mode: t
  erc-truncate-mode: t
  flyspell-mode: t
  eldoc-mode: t
  erc-status-mode: t
  erc-services-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-readonly-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-p C-p C-k I <backspace> I t ' s SPC b e e n SPC a 
SPC w h i l e SPC . . . SPC y o u SPC o k ? C-c C-c 
M SPC = q s M-v C-u C-u C-p n n n n M-g M-g M-g s <switch-frame> 
C-h v c o m p i l <tab> a t <tab> <tab> <tab> <tab> 
C-g <switch-frame> <switch-frame> C-x C-f ~ / . e m 
a c s <return> M-> C-r c o m p C-h v <return> C-x k 
<return> C-x o C-x 1 C-c b C-h v c o m p i l e - <tab> 
h i <tab> <return> C-x o C-x 1 M-> C-c b C-z o C-z 
o C-h v M-p <return> <help-echo> <down-mouse-1> <mouse-2> 
C-x 1 C-l C-s c o m C-w C-w C-s C-a C-z o C-x C-f g 
n <tab> E m <tab> e m <tab> l i s <tab> p r o <tab> 
c o m <M-backspace> p r o g <tab> c o m <tab> <return> 
C-s c o m p i l e - h i s t o r y C-s C-p C-a M-f C-h 
f <return> C-h f r e a C-g C-z o C-z o C-x C-g M-x 
l g r e p <return> <return> <return> <M-backspace> 
<return> C-x o C-x 1 C-u C-n C-u C-n C-u C-n C-n C-c 
C-c C-x 1 C-l C-u C-n C-u C-n C-l <help-echo> C-n C-n 
M-f C-p C-h f <return> C-x o C-x 1 <help-echo> <switch-frame> 
<help-echo> <switch-frame> <switch-frame> <help-echo> 
<switch-frame> <help-echo> <next> <prior> C-c b C-z 
o <switch-frame> C-h l C-x o C-x 1 C-c b M-x r e p 
o r t - e m <tab> b <tab> <M-backspace> <tab> b <tab> 
<return>

Recent messages:
Note: file is write protected
Mark saved where search started
Making completion list...
Mark saved where search started
You didn't specify a function
QuitError during redisplay: (quit)
Mark set
Type C-x 1 to remove help window.   [2 times]
Making completion list...
Loading emacsbug...done

Tom