unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ken Manheimer" <ken.manheimer@gmail.com>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: need option so line-move-to-column ignores fields, plus patch
Date: Wed, 27 Sep 2006 13:18:16 -0400	[thread overview]
Message-ID: <2cd46e7f0609271018y6d304c40m50f1fd59f22873e0@mail.gmail.com> (raw)
In-Reply-To: <8764fbhbag.fsf@stupidchicken.com>

On 9/25/06, Chong Yidong <cyd@stupidchicken.com> wrote:

> Richard Stallman <rms@gnu.org> writes:
>
> >     > | 1. With the cursor adjacent to the right of any bar,
> >     >  |   if you move forwards a line (^N), the cursor slips to column 0.
> >     >   | 2. Moving backwards (^P) with the cursor in the same place, however,
> >     >    |   doesn't have this problem - it sticks near the boundary.
> >     >
> >     > #1 is clearly a bug.  C-n should be symmetrical with C-p.
> >
> >     I don't see where else the cursor can possibly go in #1.
> >
> > It can go to after the bar.  That's where it should go.
>
> This logic is wrong.  Consider the case where there is a field' in the
> region denoted XXXXXX; everywhere else, the `field' property is null.
> Point is initially located at the position indicated by `|'.
>
>   |
> XXXXXXXXX
>
> Clearly, pressing C-n should move point to the start of the field.
> The trouble is that the example given by Ken is a particular case
> where it *looks* as though the behavior you describe makes sense; but
> in the more general case, it is wrong.

the difference here is that, in my model for #1, above, the "|" cursor
is starting from within a field marked XXXXXX.  if you implement what
you describe below, column-sticky would be provided, as i wish.

> >       The logic of
> >     line-move is like this: "Try to naively move the cursor vertically
> >     down.  If this moves us into a new field, go instead to the beginning
> >     of the field (if going forward) or the end of the field (if going
> >     backward)."
> >
> > I'm saying we need to change that logic, so that the results
> > will be good.
> >
> > I think we need a concept of temporary goal fields to go with the
> > temporary goal column.  When you type the first line-move command
> > it should record some info about the field you're in when you start.
> > Then if a field with the same property appears on the line you move to,
> > it should be handled as if it were -- in some sense -- "the same".
>
> This is a feature, not a bug.

in the situation as it's been, i was in a bind.  i wanted to use
fields to get ^A to respect the boundary between the content and
structure parts of the item head lines.  i didn't want to sacrifice
column-stickiness when moving between successive head lines.  as far
as i can see, by calling this a feature, you're suggesting that i
should either give up on the ^A functionality or column-stickiness.

i originally suggested a setting that would stop this misbehavior, and
give me both.  it's not an ideal solution, but it stops line moves
from being disruptive without sacrificing the ^A respect for the
boundary.  richard suggested instead seeking refinements to the
fields/line-move model that would extend it to accomodate my concerns.
 i think the model extension that he suggested (and that you are
accepting, below) does that.  moreover, i think this extension fixes a
deficiency in the model.

to me, the bug or feature question is, is my content/structure
demarcation for ^A a misuse of fields?  if so, then i'm asking for a
new fields feature.  if not (and i think not), then i'm asking for a
fix in the fields model.

> But if this behavior (i.e., treating non-contiguous fields as
> identical for the purpose of line-motion) is really the behavior you
> want, and we agree that it will close this bug, I can implement this
> even more simply than that, by comparing `field' properties at the
> relevant places inside line-move-finish.

thanks - i think this will work well for my purposes.

-- 
ken
ken.manheimer@gmail.com
http://myriadicity.net

  reply	other threads:[~2006-09-27 17:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 15:48 need option so line-move-to-column ignores fields, plus patch Ken Manheimer
2006-08-31 16:25 ` Ken Manheimer
2006-08-31 17:11 ` David Kastrup
2006-08-31 22:57 ` Richard Stallman
2006-09-01  4:17   ` Miles Bader
2006-09-01  6:39     ` Ken Manheimer
2006-09-03 15:17       ` Richard Stallman
2006-09-04  4:43         ` Ken Manheimer
2006-09-04 17:18           ` Richard Stallman
2006-09-04 19:56             ` Ken Manheimer
2006-09-06  8:49               ` Richard Stallman
2006-09-06 16:52                 ` Ken Manheimer
2006-09-07  6:54                   ` Richard Stallman
2006-09-07 14:47                     ` Ken Manheimer
2006-09-23 23:29                       ` Ken Manheimer
2006-09-24 16:28                         ` Richard Stallman
2006-09-24 20:17                           ` Ken Manheimer
2006-09-25 20:48                             ` Richard Stallman
2006-09-24 22:04                           ` Chong Yidong
2006-09-24 22:10                             ` Chong Yidong
2006-09-25  1:53                               ` Ken Manheimer
2006-10-11  4:13                                 ` Ken Manheimer
2006-10-11 18:50                                   ` Richard Stallman
2006-10-11 19:19                                     ` Ken Manheimer
2006-10-12 22:37                                       ` Richard Stallman
2006-09-25  1:31                             ` Ken Manheimer
2006-09-25  8:36                             ` Slawomir Nowaczyk
2006-09-25 20:48                             ` Richard Stallman
2006-09-25 21:43                               ` Chong Yidong
2006-09-27 17:18                                 ` Ken Manheimer [this message]
2006-09-29 16:32                                 ` Richard Stallman
2006-09-29 18:21                                   ` Chong Yidong
2006-09-07  6:54                   ` Richard Stallman
2006-09-07 14:27                     ` Ken Manheimer
2006-09-05  4:48         ` Miles Bader
2006-09-01  6:30   ` Ken Manheimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cd46e7f0609271018y6d304c40m50f1fd59f22873e0@mail.gmail.com \
    --to=ken.manheimer@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).