From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Suvayu Ali Newsgroups: gmane.emacs.help Subject: Re: Saving "relative point" in a paragraph or line Date: Thu, 12 Sep 2013 11:51:04 +0200 Message-ID: <20130912095104.GB2369@kuru.dyndns-at-home.com> References: <20130912080605.GQ20690@kuru.dyndns-at-home.com> <52318021.4040108@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1378979479 22339 80.91.229.3 (12 Sep 2013 09:51:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Sep 2013 09:51:19 +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 11:51:22 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 1VK3YX-0004r2-E5 for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Sep 2013 11:51:21 +0200 Original-Received: from localhost ([::1]:40713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK3YX-0005fK-0G for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Sep 2013 05:51:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK3YL-0005fF-OC for help-gnu-emacs@gnu.org; Thu, 12 Sep 2013 05:51:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VK3YK-0006g5-Lc for help-gnu-emacs@gnu.org; Thu, 12 Sep 2013 05:51:09 -0400 Original-Received: from mail-ee0-x236.google.com ([2a00:1450:4013:c00::236]:63708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK3YK-0006g0-D0 for help-gnu-emacs@gnu.org; Thu, 12 Sep 2013 05:51:08 -0400 Original-Received: by mail-ee0-f54.google.com with SMTP id e53so5145215eek.41 for ; Thu, 12 Sep 2013 02:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=kMKTey48Xzx8cf3P08bcZsvnZAEq2q5jX2PgEgHTAlg=; b=WCgYpNH9XfPyU4OmaD9cyHQOODF991Usg6k+9vF7eost1KybCaQl/j1G5iohN9xDLw klkiDsQCgW3vONOHVJq3loh+fWiZMJWDpBwFRDKrb0/n+W/Ovn8Fh1bfk1XybnUu1/AE wOGj8Sojm/kdhd9uS3pJudCc/xKO01p8DoVfhAZ7gHFHN/8CQ96ZItdaucuMEPUvbF7m FSIyIHkLaolQ7VM1KTsvJybA9qYMvk1KH5QmTT8qad3ghwNKEX4dAaD+iyUy3KFe3mBi gEpfs/uC2ca70mwi6xBFiRB/afvh6NVs/YUk6JOzyw+ItKFYgFIMvaL301Mqut3isCxD 3USg== X-Received: by 10.14.93.134 with SMTP id l6mr88050eef.112.1378979467315; Thu, 12 Sep 2013 02:51:07 -0700 (PDT) Original-Received: from kuru.dyndns-at-home.com ([2001:610:120:3001:f2de:f1ff:fe37:c76c]) by mx.google.com with ESMTPSA id j7sm4286900eeo.15.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 12 Sep 2013 02:51:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <52318021.4040108@easy-emacs.de> User-Agent: Mutt/1.5.21 (2012-12-30) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::236 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:93346 Archived-At: 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". :) -- Suvayu Open source is the future. It sets us free.