From: "Drew Adams" <drew.adams@oracle.com>
To: "'Karl Fogel'" <kfogel@red-bean.com>, <raman@users.sourceforge.net>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: RE: howto: rotate a ring
Date: Fri, 29 Feb 2008 23:37:48 -0800 [thread overview]
Message-ID: <000901c87b6f$266b4650$0600a8c0@us.oracle.com> (raw)
In-Reply-To: <878x132hug.fsf@red-bean.com>
> > The documentation for ring.el implies that there must be a
> > ring-rotate function -- but there doesn't appear to be an
> > explicit ring-rotate function?
>
> Indeed. I don't see anything either -- I think the documentation is
> just wrong. Maybe it's referring to the wraparound property of rings
> (that if you pass too high an index, the appropriate modulo will be
> performed, that sort of thing).
>
> Do you need `ring-rotate', or can we just remove that bit from the
> documentation?
If by "rotate" is meant traverse the ring in either direction, then there
are functions to do that, `ring-next' and `ring-previous'. However, I see
that the doc lists both rotation and traversal operations. To me, they are
the same thing, since a ring is circular (turn the ring = advance along it).
I sent a ring.el patch on 2007-10-08 with those functions. Richard installed
it on 2007-10-14:
Revision 1.26 - (view) (download) (annotate) - [select for diffs]
Sun Oct 14 22:52:59 2007 UTC (4 months, 2 weeks ago) by rms
Branch: MAIN
Changes since 1.25: +72 -0 lines
Diff to previous 1.25
(ring-convert-sequence-to-ring)
(ring-insert+extend, ring-remove+insert+extend, ring-member)
(ring-next, ring-previous): New functions.
prev parent reply other threads:[~2008-03-01 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-01 3:01 howto: rotate a ring T. V. Raman
2008-03-01 4:23 ` Karl Fogel
2008-03-01 7:37 ` Drew Adams [this message]
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='000901c87b6f$266b4650$0600a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=kfogel@red-bean.com \
--cc=raman@users.sourceforge.net \
--cc=rms@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.