From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: howto: rotate a ring Date: Fri, 29 Feb 2008 23:37:48 -0800 Message-ID: <000901c87b6f$266b4650$0600a8c0@us.oracle.com> References: <18376.50975.406822.881715@gargle.gargle.HOWL> <878x132hug.fsf@red-bean.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204357257 19491 80.91.229.12 (1 Mar 2008 07:40:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2008 07:40:57 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: "'Karl Fogel'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 01 08:41:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVMLS-0005B8-FW for ged-emacs-devel@m.gmane.org; Sat, 01 Mar 2008 08:41:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVMKv-0004lf-UW for ged-emacs-devel@m.gmane.org; Sat, 01 Mar 2008 02:40:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVMKs-0004kc-7p for emacs-devel@gnu.org; Sat, 01 Mar 2008 02:40:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVMKq-0004kQ-7P for emacs-devel@gnu.org; Sat, 01 Mar 2008 02:40:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVMKq-0004kN-3H for emacs-devel@gnu.org; Sat, 01 Mar 2008 02:40:44 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JVMKm-0004bL-0n; Sat, 01 Mar 2008 02:40:40 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JVMKe-0003IG-0j; Sat, 01 Mar 2008 02:40:32 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m217dWSL031791; Sat, 1 Mar 2008 01:39:32 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m217dVXw006925; Sat, 1 Mar 2008 00:39:31 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3596543311204357069; Fri, 29 Feb 2008 23:37:49 -0800 Original-Received: from dradamslap1 (/141.144.64.1) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 29 Feb 2008 23:37:49 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <878x132hug.fsf@red-bean.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: Ach7U/0qGL9J2cdCSyqFnEqYhRgdqgAFuG0g X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by mx20.gnu.org: Linux 2.4-2.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90957 Archived-At: > > 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.