* something like ring.el needed, but not circular
@ 2008-03-09 18:44 Michal
2008-03-09 18:59 ` Drew Adams
0 siblings, 1 reply; 3+ messages in thread
From: Michal @ 2008-03-09 18:44 UTC (permalink / raw)
To: emacs mailing list
hallo Group Members
Is there in emacs a package that allows walking through
a list in both directions, like ring.el, but which is NOT a ring (I mean circular)?
Regards,
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: something like ring.el needed, but not circular
2008-03-09 18:44 something like ring.el needed, but not circular Michal
@ 2008-03-09 18:59 ` Drew Adams
2008-03-10 9:00 ` Michal
0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2008-03-09 18:59 UTC (permalink / raw)
To: 'Michal', 'emacs mailing list'
> Is there in emacs a package that allows walking through
> a list in both directions, like ring.el, but which is NOT a
> ring (I mean circular)?
Might one ask "why"? What do you have against rings? ;-)
If you mean that you want the behavior of, say, Emacs input-history
traversal: two directions, but two endpoints, then take a look at the
input-history code. Look for command `next-history-element' in library
simple.el.
Or you can use a ring and define an endpoint position on it - have your code
stop when it reaches that point from either direction.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: something like ring.el needed, but not circular
2008-03-09 18:59 ` Drew Adams
@ 2008-03-10 9:00 ` Michal
0 siblings, 0 replies; 3+ messages in thread
From: Michal @ 2008-03-10 9:00 UTC (permalink / raw)
To: Drew Adams; +Cc: 'emacs mailing list'
Thanks
"Drew Adams" <drew.adams@oracle.com> writes:
>> Is there in emacs a package that allows walking through
>> a list in both directions, like ring.el, but which is NOT a
>> ring (I mean circular)?
>
> Might one ask "why"? What do you have against rings? ;-)
>
> If you mean that you want the behavior of, say, Emacs input-history
> traversal: two directions, but two endpoints, then take a look at the
> input-history code. Look for command `next-history-element' in library
> simple.el.
>
> Or you can use a ring and define an endpoint position on it - have your code
> stop when it reaches that point from either direction.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-10 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-09 18:44 something like ring.el needed, but not circular Michal
2008-03-09 18:59 ` Drew Adams
2008-03-10 9:00 ` Michal
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.