From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Saving "relative point" in a paragraph or line Date: Thu, 12 Sep 2013 12:06:55 +0200 Message-ID: <5231923F.1020804@easy-emacs.de> References: <20130912080605.GQ20690@kuru.dyndns-at-home.com> <52318021.4040108@easy-emacs.de> <20130912095104.GB2369@kuru.dyndns-at-home.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1378980322 32655 80.91.229.3 (12 Sep 2013 10:05:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Sep 2013 10:05:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 12 12:05:25 2013 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 1VK3m5-0001pq-SK for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Sep 2013 12:05:21 +0200 Original-Received: from localhost ([::1]:40786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK3m5-0008Ja-Dr for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Sep 2013 06:05:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK3ln-0008E6-LT for help-gnu-emacs@gnu.org; Thu, 12 Sep 2013 06:05:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VK3lg-00027L-CX for help-gnu-emacs@gnu.org; Thu, 12 Sep 2013 06:05:03 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:52985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK3lg-00027D-3E for help-gnu-emacs@gnu.org; Thu, 12 Sep 2013 06:04:56 -0400 Original-Received: from purzel.sitgens (brln-4db92018.pool.mediaWays.net [77.185.32.24]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0M1XmT-1WCiel0EEj-00tUsG; Thu, 12 Sep 2013 12:04:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <20130912095104.GB2369@kuru.dyndns-at-home.com> X-Provags-ID: V02:K0:bIqH55S4si193DJi/isy+J2uIpi2cGZVMoHpA7SAgd+ kACpA1U8oG3wTrLKF7svN5EzlrcHMOPsvA12K4V3/degg+UEoI /3hIsXJhozlv1hgpRZQ937b7nYFjsLHTPUsA+zRlMDrjsVto+7 kjc2NwGxJPMhvcqHwp7mVDo28RlkwBIPtaxg16YFN5e1X1lIJz jJElxCr5Yum72qZwrx7JjojJVYpJWB5aRUC0K/h+0xA0Lj4PjA +hm6/lCxhf2gsW1ZjOzY7NyIEPufDQzgSnYFQRpi804Kdk7But WU2bL1N7PpVRS4bf26M184VdCfgQobHtEFtsPV3RZry5uJdcs3 RNVdsEhAVURcp09OLAeo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.126.187 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:93347 Archived-At: Am 12.09.2013 11:51, schrieb Suvayu Ali: > On Thu, Sep 12, 2013 at 10:49:37AM +0200, Andreas Röhler wrote: >> 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))) > > After the transpose my-point will be somewhere inside the other line. > Hence my use of the terminology "relative point". > > :) > Hmm, you example shows point after "dolor" as in start. That's what copy-marker would provide. Maybe move the point indicated in example after change, i.e. end-of "porttitor"? Cheers