help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving "relative point" in a paragraph or line


From: Andreas Röhler
Subject: Re: Saving "relative point" in a paragraph or line
Date: Thu, 12 Sep 2013 10:49:37 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Am 12.09.2013 10:06, schrieb Suvayu Ali:
Hi,

I'm trying to write a few wrappers for transpose functions.  I would
like to restore the point to the relative position of the element I am
trying to transpose.  Are there any standard ways/functions people use
for something like this?

An example (cursor at -!-):

- Lorem ipsum dolor -!- sit amet, consectetur adipiscing elit.
- Vestibulum porttitor metus sed est varius, id dapibus est rhoncus.

                            |
                            v

- Vestibulum porttitor metus sed est varius, id dapibus est rhoncus.
- Lorem ipsum dolor -!- sit amet, consectetur adipiscing elit.

Thanks for any ideas.

Cheers,


Not sure IIUC, what about storing location with

(setq my-point (copy-marker (point)))

Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]