From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: How to examine the mark ring? Date: Tue, 21 Apr 2015 06:45:46 -0700 (PDT) Message-ID: References: <20150421101705.GA24384@tuxteam.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1429623990 5740 80.91.229.3 (21 Apr 2015 13:46:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Apr 2015 13:46:30 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de, gnuist006@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 21 15:46:13 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YkYV9-0004f0-Nw for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Apr 2015 15:46:11 +0200 Original-Received: from localhost ([::1]:58615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkYV4-0006Fx-5m for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Apr 2015 09:46:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkYUs-0006Fh-Ln for help-gnu-emacs@gnu.org; Tue, 21 Apr 2015 09:45:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkYUp-0005NB-EV for help-gnu-emacs@gnu.org; Tue, 21 Apr 2015 09:45:54 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:19732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkYUp-0005Mw-2P for help-gnu-emacs@gnu.org; Tue, 21 Apr 2015 09:45:51 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t3LDjmwi014580 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 21 Apr 2015 13:45:48 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t3LDjleO023636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 21 Apr 2015 13:45:48 GMT Original-Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t3LDjlWH005300; Tue, 21 Apr 2015 13:45:47 GMT In-Reply-To: <20150421101705.GA24384@tuxteam.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103906 Archived-At: > > What I need is a method to examine the mark ring for which I could > > not locate a command. C-@ is used to push the point or posn into the > > mark ring stack or LIFO. > > > > I tried with apropos to find a suitable command or variable but as a > > newbie, I could not find one. >=20 > There is a variable "mark-ring", so I'd try "C-h v RET mark-ring RET". > This'll show its current (buffer-local) value. There are two rings of markers: `global-mark-ring' and `mark-ring'. The latter is buffer-local: all markers (except the current mark) in a given buffer. The former is global: (at most) one marker per buffer. `mark-ring' does not include the current mark - that is the value of `(mark-marker)'. So if you want all markers in the current buffer then use something like this: (if (and (mark-marker) (marker-buffer (mark-marker))) (cons (mark-marker) (copy-sequence mark-ring)) (copy-sequence mark-ring)) (The reason you might want to use `copy-sequence' is in case you want to do something to/with the list of markers, and you don't want to modify the original list.