unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to examine the mark ring?
@ 2015-04-21  9:53 gnuist006
  2015-04-21 10:17 ` tomas
  0 siblings, 1 reply; 4+ messages in thread
From: gnuist006 @ 2015-04-21  9:53 UTC (permalink / raw)
  To: help-gnu-emacs

Hi All,

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.

This would help me debug the problem. 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to examine the mark ring?
  2015-04-21  9:53 How to examine the mark ring? gnuist006
@ 2015-04-21 10:17 ` tomas
  2015-04-21 13:45   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: tomas @ 2015-04-21 10:17 UTC (permalink / raw)
  To: gnuist006; +Cc: help-gnu-emacs

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

On Tue, Apr 21, 2015 at 02:53:19AM -0700, gnuist006@gmail.com wrote:
> Hi All,
> 
> 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.

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.

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

iEYEARECAAYFAlU2I6EACgkQBcgs9XrR2kaSEwCfbPLvA6SLshLwMYDsAPfercn+
+FAAmwU45eQ7pRSsE7gJb+qp2yByjMgX
=RFn8
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: How to examine the mark ring?
  2015-04-21 10:17 ` tomas
@ 2015-04-21 13:45   ` Drew Adams
  2015-04-21 14:10     ` tomas
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2015-04-21 13:45 UTC (permalink / raw)
  To: tomas, gnuist006; +Cc: help-gnu-emacs

> > 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.
> 
> 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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to examine the mark ring?
  2015-04-21 13:45   ` Drew Adams
@ 2015-04-21 14:10     ` tomas
  0 siblings, 0 replies; 4+ messages in thread
From: tomas @ 2015-04-21 14:10 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs, gnuist006

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

On Tue, Apr 21, 2015 at 06:45:46AM -0700, Drew Adams wrote:
> There are two rings of markers: [...]

Thanks :-)

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlU2WlIACgkQBcgs9XrR2kY8TgCferQdSE+bNcy3n0uyEF4FO4eP
sv8An3/igxAOesDMgpxCGY1++Ajz9MAV
=Wnl0
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-21 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21  9:53 How to examine the mark ring? gnuist006
2015-04-21 10:17 ` tomas
2015-04-21 13:45   ` Drew Adams
2015-04-21 14:10     ` tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).