From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: Can I type text without changing my current cursor point? Date: Sun, 15 Mar 2009 12:25:55 -0600 Message-ID: <0bidnZF4-vhTpCDUnZ2dnUVZ_h6WnZ2d@posted.cpinternet> References: <2a024660903112346ncdb86e1uf62f063c644fd6ba@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1237139103 10933 80.91.229.12 (15 Mar 2009 17:45:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Mar 2009 17:45: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 Sun Mar 15 18:46:20 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LiuPi-0003dm-P3 for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Mar 2009 18:46:19 +0100 Original-Received: from localhost ([127.0.0.1]:53506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiuOM-0007sk-FE for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Mar 2009 13:44:54 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.posted.cpinternet!news.posted.cpinternet.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 15 Mar 2009 12:24:29 -0500 User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 33 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 64.61.220.223 Original-X-Trace: sv3-8XrIMwLCOqgjlfgifpGQWZSvdFahJ49KbKrf4ZWbFSkXf2Z9BQvwXN8t+IcABBgzGkuq3dN1e+Mp4Gs!0cj4LqXnzCytIbzih8HmesSDqK8V2BMmu71UVx6M/6oqs3Hc1pAi0yylboHa6ScdXAq4fDaGtZN0!TeCHxAromjVMQvNUS8E= Original-X-Complaints-To: abuse@cpinternet.com X-DMCA-Complaints-To: abuse@cpinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:167640 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62940 Archived-At: dIbMx2 wrote: > ithai levi writes: > >> I'm almost sure I saw this once, I just can recall the sequence. >> What I want to do is to hit C+something and then type but have my cursor stay in its current point >> and not move forward. Then I can somehow exit this mode (ESC) and type some text which will be >> inserted in between. This could be useful to type a prefix, a suffix and then the content without >> having to move the cursor back. >> >> Example: >> >> I would type "obj.method(" then press C+? then type "); // a comment", press ESC and type "1,2,3" >> without moving the cursor. >> >> (what I do now is use C+SPC to set the mark, type and then press C+x C+SPC to go back to the mark) >> >> TIA :) > > cua-set-rectangle-mark C+return > > obj.method("C-spc"); // comment C-x C-x will put you after the first quotation mark via exchange-point-and-mark-nomark. This isn't exactly the same as pop-global-mark, which you are using now. C-x C-x is slightly easier than C-x C-spc. I put it on one keychord with: (global-set-key [(super )] 'exchange-point-and-mark-nomark) but I'm a little hazy on the vector notation. The .... -nomark feature may be an artifact of pc-selection-mode. Ed