From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ken Manheimer" Newsgroups: gmane.emacs.devel Subject: need option so line-move-to-column ignores fields, plus patch Date: Thu, 31 Aug 2006 11:48:10 -0400 Message-ID: <2cd46e7f0608310848l743430e9ia7a1d45e22428083@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3949_22786886.1157039290952" X-Trace: sea.gmane.org 1157039437 23914 80.91.229.2 (31 Aug 2006 15:50:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2006 15:50:37 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 31 17:50:35 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIomL-0002LW-NI for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2006 17:48:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIomL-0000qV-9F for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2006 11:48:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIom7-0000oc-69 for emacs-devel@gnu.org; Thu, 31 Aug 2006 11:48:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIom4-0000nX-Qq for emacs-devel@gnu.org; Thu, 31 Aug 2006 11:48:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIom4-0000nU-Lf for emacs-devel@gnu.org; Thu, 31 Aug 2006 11:48:12 -0400 Original-Received: from [64.233.184.233] (helo=wr-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GIovi-000896-Qv for emacs-devel@gnu.org; Thu, 31 Aug 2006 11:58:10 -0400 Original-Received: by wr-out-0506.google.com with SMTP id 71so234184wra for ; Thu, 31 Aug 2006 08:48:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=b/U/fAAPL1G9Neq0fu/f50BQ7pLutF9DrI4XNkFvjQgOPnsrZz2cFIIjC4j7sdqmsez7tTVtEmNwXkdJlsEuK7+IPBexPsvbMZChiuyXjEJ2LIEAC33SbhS/IbTy07PtoDS3CTHoRbbnipGOkeXb46mLXLPF/F4aGD4kuHi3uBI= Original-Received: by 10.90.119.15 with SMTP id r15mr216615agc; Thu, 31 Aug 2006 08:48:11 -0700 (PDT) Original-Received: by 10.90.105.4 with HTTP; Thu, 31 Aug 2006 08:48:10 -0700 (PDT) Original-To: Emacs-Devel X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59163 Archived-At: ------=_Part_3949_22786886.1157039290952 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline i propose a change to the way line-move-to-column to enable insensitivity to fields. without this change, modes that make certain uses of fields sacrifice column retention in line motion. i consider that a bug, and this a bug fix. in my under-development allout extensions, i'm using field boundaries to distinguish between an outline item's structural elements (the guide lines and topic bullet area) and the item's content, specifically the content on the item's head line: | | | > here's the content. the stuff before "here's" is the bullet and guidelines. this is working exactly as i need - cursor motion from within the headline content stops when it first hits the start of the content, yet will move into the structure area (for hot-spot navigation) with a subsequent ^A. the bug is that i can't use text fields this way without sacrificing column retention on line moves, as far as i can tell. line-move-to-column is hard-wired to respect fields when seeking the prior positions column, so that moving the cursor between topics usually leaves the cursor at column 0, which is almost always not what the user wants. my patch introduces a new lisp-level variable, `line-move-ignore-fields', and a condition in line-move-to-column to obey that variable. the default setting of line-move-ignore-fields is nil, so the current behavior remains. my allout extension sets it to get the behavior it needs. (i made it a lisp-level rather than customization variable because i expect that it's a modal, not user policy. i feel the same way about line-move-ignore-invisible, though, so i'm breaking with that precedent, and could be persuaded to have the variable i'm introducing be customizable.) i would be interested to hear if i missed some better way to achieve either the cursor motion i want in the headline, without using fields, or have column retention without adding the field sensitivity inhibition, as i'm doing. barring that, i think this is a necessary bug fix. the patch is attached, and here's the ChangeLog entry: 2006-08-22 Ken Manheimer * simple.el (line-move-ignore-fields): New lisp-level variable for overriding line-move-to-column's sensitivity to fields when doing column positioning. (line-move-to-column): Respect line-move-ignore-fields. -- ken ken.manheimer@gmail.com http://myriadicity.net ------=_Part_3949_22786886.1157039290952 Content-Type: text/plain; name=line-move-patch.txt; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_erjb6crx Content-Disposition: attachment; filename="line-move-patch.txt" LS0tIHNpbXBsZS5lbAkyMiBBdWcgMjAwNiAxNzo1NDo1MiAtMDQwMAkxLjgxMgorKysgc2ltcGxl LmVsCTMxIEF1ZyAyMDA2IDExOjQzOjUyIC0wNDAwCQpAQCAtMzQ2Niw2ICszNDY2LDkgQEAKICAg OnR5cGUgJ2Jvb2xlYW4KICAgOmdyb3VwICdlZGl0aW5nLWJhc2ljcykKIAorKGRlZnZhciBsaW5l LW1vdmUtaWdub3JlLWZpZWxkcyBuaWwKKyAgIipOb24tbmlsIG1lYW5zIFxcW25leHQtbGluZV0g YW5kIFxcW3ByZXZpb3VzLWxpbmVdIGlnbm9yZSBmaWVsZHMuIikKKwogKGRlZnVuIGxpbmUtbW92 ZS1pbnZpc2libGUtcCAocG9zKQogICAiUmV0dXJuIG5vbi1uaWwgaWYgdGhlIGNoYXJhY3RlciBh ZnRlciBQT1MgaXMgY3VycmVudGx5IGludmlzaWJsZS4iCiAgIChsZXQgKChwcm9wCkBAIC0zNzAy LDcgKzM3MDUsOCBAQAogICAgIChsZXQgKChvcG9pbnQgKHBvaW50KSkpCiAgICAgICAobW92ZS10 by1jb2x1bW4gY29sKQogICAgICAgOzsgbW92ZS10by1jb2x1bW4gZG9lc24ndCByZXNwZWN0IGZp ZWxkIGJvdW5kYXJpZXMuCi0gICAgICAoZ290by1jaGFyIChjb25zdHJhaW4tdG8tZmllbGQgKHBv aW50KSBvcG9pbnQpKSkpCisgICAgICAoaWYgKG5vdCBsaW5lLW1vdmUtaWdub3JlLWZpZWxkcykK KyAgICAgICAgICAoZ290by1jaGFyIChjb25zdHJhaW4tdG8tZmllbGQgKHBvaW50KSBvcG9pbnQp KSkpKQogCiAgICh3aGVuIChhbmQgbGluZS1tb3ZlLWlnbm9yZS1pbnZpc2libGUKIAkgICAgIChu b3QgKGJvbHApKSAobGluZS1tb3ZlLWludmlzaWJsZS1wICgxLSAocG9pbnQpKSkpCg== ------=_Part_3949_22786886.1157039290952 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ------=_Part_3949_22786886.1157039290952--