Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remove duplicates in comint-mode command history

17 views
Skip to first unread message

Denis Bueno

unread,
Dec 7, 2005, 4:17:45 PM12/7/05
to help-gn...@gnu.org
I've been programming in SML for a class I'm taking at school. This
involved firing up Emacs and a sml-mode buffer with the source code,
and another Emacs buffer with inferor-sml-mode, which uses comint.

Is there any way (simple, preferably, but otherwise is fine) to
remove duplicate command history entries? When I hit M-p, I want to
see the last *unique* command I typed, not the last 25 times I typed
the command to run my program.

Ideas?

-Denis


Peter Dyballa

unread,
Dec 7, 2005, 5:04:05 PM12/7/05
to Denis Bueno, help-gn...@gnu.org

Am 07.12.2005 um 22:17 schrieb Denis Bueno:

> Is there any way (simple, preferably, but otherwise is fine) to remove
> duplicate command history entries?

(setq history-delete-duplicates t), or in customisation.

--
Greetings

Pete

The world would be a better place if Larry Wall had been born in
Iceland, or any other country where the native language actually
has syntax.
-- Peter da Silva

Johan Bockgård

unread,
Dec 7, 2005, 6:30:05 PM12/7/05
to
Denis Bueno <dbu...@gmail.com> writes:

`comint-input-ignoredups'

--
Johan Bockgård

Denis Bueno

unread,
Dec 7, 2005, 9:55:05 PM12/7/05
to Peter Dyballa, help-gn...@gnu.org
On 12/7/05, Peter Dyballa <Peter_...@web.de> wrote:
>
> Am 07.12.2005 um 22:17 schrieb Denis Bueno:
>
> > Is there any way (simple, preferably, but otherwise is fine) to remove
> > duplicate command history entries?
>
> (setq history-delete-duplicates t), or in customisation.

For the record, the above did not work, but the below did.

(add-hook 'comint-mode-hook
'(lambda () (setq comint-input-ignoredups t)))

-Denis


Peter Dyballa

unread,
Dec 8, 2005, 5:07:00 AM12/8/05
to Denis Bueno, Emacs help

Well, I took it out of my customisation clause where it is recorded as:

'(history-delete-duplicates t)


--
Greetings

Pete

The human animal differs from the lesser primates in his passion for
lists of "Ten Best".
-- H. Allen Smith

0 new messages