From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Vojinovic Newsgroups: gmane.emacs.help Subject: Re: Free cursor positioning. Date: Fri, 5 Aug 2011 21:15:19 +0100 Message-ID: <201108052115.19994.vvmarko@gmail.com> References: Reply-To: vmarko@ipb.ac.rs NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1312575337 7996 80.91.229.12 (5 Aug 2011 20:15:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 5 Aug 2011 20:15:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 05 22:15:33 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QpQns-0005GO-HR for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Aug 2011 22:15:32 +0200 Original-Received: from localhost ([::1]:50342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpQnr-00009w-QI for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Aug 2011 16:15:31 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpQnm-00008T-Nv for help-gnu-emacs@gnu.org; Fri, 05 Aug 2011 16:15:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpQnl-0003Sq-Il for help-gnu-emacs@gnu.org; Fri, 05 Aug 2011 16:15:26 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:52782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpQnl-0003Sh-Dj for help-gnu-emacs@gnu.org; Fri, 05 Aug 2011 16:15:25 -0400 Original-Received: by wyg36 with SMTP id 36so2681201wyg.0 for ; Fri, 05 Aug 2011 13:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=D1yVzobKGFqarWmCVFa53e6HVNGPPkrQkXFwmZJ281w=; b=AgPIPCr8I8yUg7SZxUrxPE1ALEpM8s271nyzbH/P6YEBKn/tniKAfAmO6hfB+zIuvo qRqUaqmIcBdyIuEVVTPJ//wB8AF66f6q6pN7W4kOrULkHGeFKuuh7u9EFMQEBW6T9+Sr Gt0W7d8k0D2rY1As382E3BylEz0AB60JpaNls= Original-Received: by 10.227.157.130 with SMTP id b2mr2289725wbx.4.1312575324266; Fri, 05 Aug 2011 13:15:24 -0700 (PDT) Original-Received: from yoda.localnet (bl14-223-111.dsl.telepac.pt [85.247.223.111]) by mx.google.com with ESMTPS id fe4sm2546177wbb.28.2011.08.05.13.15.22 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Aug 2011 13:15:23 -0700 (PDT) User-Agent: KMail/1.13.7 (Linux/2.6.35.13-92.fc14.x86_64; KDE/4.6.5; x86_64; ; ) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 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:81899 Archived-At: On Friday 05 August 2011 16:40:47 Drew Adams wrote: > > Some user ask me how configure Emacs to move cursor in any position > > like this done in editor of Far file manager. > > > > So if you press RIGHT at the end of string cursor move right > > not to next > > string and so on. If you type any char after the end of line > > editor automatically add spaces from the end of line up to > > inserted new > > char. > > Sorry, I'm not sure what you're asking, or even whether you're asking a > question. I believe that the OP wants the point (ie. cursor) to maintain the column position when switching lines, regardless of the position of the end-of-line character. I've seen this behavior in some editors. For example, suppose you have the following two lines in the buffer ( is indicating end-of-line): This is the first line of text. It is very long, but does not wrap. The second line is short. Then suppose you go with the point to the letter "p" at the end of the first sentence (line 1, column 65), and press the down arrow to move the point to the second line. By default the point is placed at the end of the second line (line 2, column 25). What the OP wants is the point to be at line 2, column 65, and if he types something there, the editor should fill in the spaces between the . and the of the second line, to make it long enough for the next character to be placed where the point is, at (2,65). In other words, ignore the position of when moving the point around, and add spaces where ever necessary to allow for completely free cursor motion in the buffer region. Then, when saving the file, automatically trim trailing spaces of each line. While I don't like this kind of behavior, it is quite common and has some advantages, so I guess the OP is used to it. ;-) Unfortunately, I am an Emacs beginner, and don't know how to configure it to behave this way. HTH, :-) Marko