dang, my fix is not as simple or straight forwards as i hoped. line-move-finish duplicates some of the provision for fields. i don't understand why, but it only changes the resulting column occasionally, but then in the same way as before. the upshot is that, without an additional change, the cursor winds up in column 0 occasionally. my additional change accounts for that without preventing proper handling of intangible text, which is mixed together with the inter-line fielded text provision in line-move-finish. i've tested it and established that the intangible provision still works regardless, and the field-insensitivity is complete when line-move-ignore-fields is t. i also made line-move-ignore-fields buffer-local, in keeping with the judgement that this is a provision for modes, not users. here's the new version of the ChangeLog entry, and the new version of the patch is attached: 2006-08-22 Ken Manheimer * simple.el (line-move-ignore-fields): New internal variable for overriding line-move-finish and line-move-to-column' sensitivity to fields when doing column positioning. (line-move-finish): Respect line-move-ignore-fields. (line-move-to-column): Respect line-move-ignore-fields. On 8/31/06, Ken Manheimer wrote: > 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