all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tomas@tuxteam.de
To: David Kastrup <dak@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs Lisp Programming Questions
Date: Wed, 7 Oct 2009 18:42:26 +0200	[thread overview]
Message-ID: <20091007164226.GA28790@tomas> (raw)
In-Reply-To: <87d44zk360.fsf@lola.goethe.zz>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Oct 07, 2009 at 10:40:23AM +0200, David Kastrup wrote:
> "clint.laskowski" <clint.laskowski@gmail.com> writes:

[...]

> > 2. I want to write an interactive Elisp program to remove sequential
> > duplicate lines from a buffer [...]

[...]

> You can just walk through the buffer line and enter each line into a
> hashtable.

If I understood the OP correctly, by "sequential duplicate lines" he
means duplicates which are neighbours. The hash table approach would
remove duplicates over the whole file, AFAIU you.

I.e.

A        A
B        B
B   -->  C
C        B
B        C
C

versus

A        A
B        B
B   -->  C
C
B
C

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKzMTyBcgs9XrR2kYRApIgAJ4r8ZIlKh6YSIN7nB0MOfwDByqyKwCfa/+O
OMKXMs3xvhWibsu1VGYdcQg=
=7OSQ
-----END PGP SIGNATURE-----




  reply	other threads:[~2009-10-07 16:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 22:40 Emacs Lisp Programming Questions clint.laskowski
2009-10-07  0:14 ` Pascal J. Bourguignon
2009-10-07  7:53 ` mdj
2009-10-07  8:40 ` David Kastrup
2009-10-07 16:42   ` tomas [this message]
2009-10-07  8:55 ` djc
2009-10-07 13:19 ` Kevin Rodgers
2009-10-07 20:54 ` Xah Lee
2009-10-08 13:36 ` clint.laskowski
2009-10-08 14:35   ` Andreas Politz
     [not found] ` <mailman.8228.1254921577.2239.help-gnu-emacs@gnu.org>
2009-11-01  6:59   ` David Combs
2009-11-02 16:29     ` David Kastrup
2009-11-04  6:43     ` Kevin Rodgers
2009-11-04  9:24     ` Andreas Röhler
2009-11-04  9:26     ` Andreas Röhler

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=20091007164226.GA28790@tomas \
    --to=tomas@tuxteam.de \
    --cc=dak@gnu.org \
    --cc=help-gnu-emacs@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 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.