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: Tips for quick jumping back and forth Date: Sat, 07 Jul 2012 08:45:36 +0200 Message-ID: <4FF7DB10.2010909@easy-emacs.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341645363 10241 80.91.229.3 (7 Jul 2012 07:16:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2012 07:16:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 07 09:16:03 2012 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 1SnPFE-0000BM-S9 for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 09:15:56 +0200 Original-Received: from localhost ([::1]:49800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnPFD-0000dI-Jj for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 03:15:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnPF5-0000cr-4D for help-gnu-emacs@gnu.org; Sat, 07 Jul 2012 03:15:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnPF3-0003vL-6Y for help-gnu-emacs@gnu.org; Sat, 07 Jul 2012 03:15:46 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]:55860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnPF2-0003uH-Mi for help-gnu-emacs@gnu.org; Sat, 07 Jul 2012 03:15:45 -0400 Original-Received: from [192.168.178.27] (brln-4dbc5166.pool.mediaWays.net [77.188.81.102]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0MAo9v-1SfxGI3Ejb-00Bshc; Sat, 07 Jul 2012 09:15:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120601 Thunderbird/13.0 In-Reply-To: X-Provags-ID: V02:K0:WCQfBvhfCV+dQQ3unt/RQjbN5+TOr2jpRBs3ReQG6LV 0+9wam59xxk5XMuojWH+hX2nLBJ96fGWMe6cvOvLLvlPyqtpL/ 3QtoshnAvANHzhmIWAB8+bghwE13ZpRS59+o3Lrl/E5kejZNr7 018+BJMU5WQkpclA1B7xv5CyTRi5ois0mT9aF07RvUeSsR87Zj 2cofU63x9a6JZgXUX6wQCOT3qvDSEbIjIpJsm9xei83dWSUc3g 7di8rDoIZN43tE6+UyDA2RdUEpa8F0p5Z9KVyBLh6oycmSnGze ZzyMq41PDr5iwpO8Mw8CDEYtPMQa8sugtO7/jIGc7xwtDj5aQJ B60IIWOWHAgJNgDByAXWVNzCmzauJq+69rpxNeqso X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.186 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:85710 Archived-At: Am 07.07.2012 07:43, schrieb C K Kashyap: > Dear Emacs friends, > > I need some tips for quick jumping around. As in, say I'm editing a line > and need to go up a couple of paragraphs to edit something and then resume > at my original position. > The way I used to accomplish this in Vi was using mm to mark the current > position into m register and then go somewhere and come back by pressing 'm > > Now, I know that in emacs I can do it using C-x-r- to mark a position > into a register and then jump back to it usng C-x-r-j ... is there a better > way? Rather, what's a better way? > > Regards, > Kashyap > use a couple of hard-coded register-commands which got keys for example (global-set-key [(control kp-1)] 'gehe-zu-register-x) with (control u) (control kp-1) the point is registered (control kp-1) will jump back to it (defun gehe-zu-register-x (&optional arg) "With C-u remember buffer and point" (interactive "P") (if arg (progn (window-configuration-to-register ?x) (message "%s" "Jump back with \[C-kp-1] or \\C-x j x")) (jump-to-register ?x) (message "%s" "With Arg: remember point and buffer"))) Cheers, Andreas