unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1505: duplicate entries in compile-history
@ 2008-12-06 14:12 Tom Tromey
  2008-12-06 17:50 ` Dan Nicolaescu
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2008-12-06 14:12 UTC (permalink / raw)
  To: bug-gnu-emacs


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 bug-gnu-emacs@gnu.org 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-unwin
 d-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







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#1505: duplicate entries in compile-history
@ 2008-12-06 15:14 richardeng
  0 siblings, 0 replies; 4+ messages in thread
From: richardeng @ 2008-12-06 15:14 UTC (permalink / raw)
  To: Tom Tromey, 1505

This is not a bug.

add following in your .emacs:
(setq history-delete-duplicates t)
(setq history-length 1000)













^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#1505: duplicate entries in compile-history
  2008-12-06 14:12 bug#1505: duplicate entries in compile-history Tom Tromey
@ 2008-12-06 17:50 ` Dan Nicolaescu
  2008-12-06 20:22   ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Nicolaescu @ 2008-12-06 17:50 UTC (permalink / raw)
  To: Tom Tromey; +Cc: 1505

Tom Tromey <tromey@redhat.com> writes:

  > 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.

C-h v history-delete-duplicate RET

history-delete-duplicates is a variable defined in `C source code'.
Its value is t

Documentation:
*Non-nil means to delete duplicates in history.
If set to t when adding a new history element, all previous identical
elements are deleted from the history list.

(inspired by tcsh's histdup)

This works on all histories, not only compile-history.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#1505: duplicate entries in compile-history
  2008-12-06 17:50 ` Dan Nicolaescu
@ 2008-12-06 20:22   ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2008-12-06 20:22 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 1505

Dan> C-h v history-delete-duplicate RET

Thanks, I didn't know about this.

Dan> *Non-nil means to delete duplicates in history.
Dan> If set to t when adding a new history element, all previous identical
Dan> elements are deleted from the history list.

Dan> This works on all histories, not only compile-history.

I'll try it and see whether there are cases where I want the other
behavior.

Tom






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-06 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-06 14:12 bug#1505: duplicate entries in compile-history Tom Tromey
2008-12-06 17:50 ` Dan Nicolaescu
2008-12-06 20:22   ` Tom Tromey
  -- strict thread matches above, loose matches on Subject: below --
2008-12-06 15:14 richardeng

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).